Step 3 for the initial commits for 2.5: removing src/ and python,

adding new windowmanager module, and the first bits of new editors
module.
This commit is contained in:
2007-12-24 18:27:28 +00:00
parent 8a07e665c2
commit a1c8543f2a
481 changed files with 13724 additions and 366053 deletions

View File

@@ -1,6 +1,6 @@
/* DataToC output of file <Bfont> */
/*
* $Id$
* $Id: Bfont.c 125 2002-11-25 12:02:15Z mein $
*
* ***** BEGIN GPL/BL DUAL LICENSE BLOCK *****
*

View File

@@ -0,0 +1,49 @@
#
# $Id: Makefile 14 2002-10-13 15:57:19Z hans $
#
# ***** BEGIN GPL LICENSE BLOCK *****
#
# 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
# of the License, or (at your option) any later version.
#
# 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) 2007 Blender Foundation
# All rights reserved.
#
# The Original Code is: all of this file.
#
# Contributor(s): none yet.
#
# ***** END GPL LICENSE BLOCK *****
#
# Makes module object directory and bounces make to subdirectories.
LIBNAME = editors_datafiles
DIR = $(OCGDIR)/blender/$(LIBNAME)
include nan_compile.mk
CFLAGS += $(LEVEL_1_C_WARNINGS)
CPPFLAGS += -I$(OPENGL_HEADERS)
# not very neat....
CPPFLAGS += -I../../../blenkernel
CPPFLAGS += -I../../../blenlib
CPPFLAGS += -I../../../makesdna
CPPFLAGS += -I../../../imbuf
CPPFLAGS += -I$(NAN_GUARDEDALLOC)/include
# own include
CPPFLAGS += -I../include

View File

@@ -0,0 +1,88 @@
/**
* $Id: BDR_drawaction.h 11183 2007-07-06 09:59:18Z aligorith $
*
* ***** BEGIN GPL/BL DUAL LICENSE BLOCK *****
*
* 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
* of the License, or (at your option) any later version. The Blender
* Foundation also sells licenses for use in proprietary software under
* the Blender License. See http://www.blender.org/BL/ for information
* about this.
*
* 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.
*
* ***** END GPL/BL DUAL LICENSE BLOCK *****
*/
#ifndef BDR_DRAWACTION_H
#define BDR_DRAWACTION_H
struct BezTriple;
struct Ipo;
struct IpoCurve;
struct gla2DDrawInfo;
struct bAction;
struct Object;
struct ListBase;
/* ****************************** Base Structs ****************************** */
/* Keyframe Column Struct */
typedef struct ActKeyColumn {
struct ActKeyColumn *next, *prev;
short sel, handle_type;
float cfra;
/* only while drawing - used to determine if long-keyframe needs to be drawn */
short modified;
short totcurve;
} ActKeyColumn;
/* 'Long Keyframe' Struct */
typedef struct ActKeyBlock {
struct ActKeyBlock *next, *prev;
short sel, handle_type;
float val;
float start, end;
/* only while drawing - used to determine if block needs to be drawn */
short modified;
short totcurve;
} ActKeyBlock;
/* ******************************* Methods ****************************** */
/* Action Generics */
void draw_cfra_action(void);
/* Channel Drawing */
void draw_icu_channel(struct gla2DDrawInfo *di, struct IpoCurve *icu, float ypos);
void draw_ipo_channel(struct gla2DDrawInfo *di, struct Ipo *ipo, float ypos);
void draw_action_channel(struct gla2DDrawInfo *di, bAction *act, float ypos);
void draw_object_channel(struct gla2DDrawInfo *di, Object *ob, float ypos);
/* Keydata Generation */
void icu_to_keylist(struct IpoCurve *icu, ListBase *keys, ListBase *blocks);
void ipo_to_keylist(struct Ipo *ipo, ListBase *keys, ListBase *blocks);
void action_to_keylist(bAction *act, ListBase *keys, ListBase *blocks);
void ob_to_keylist(Object *ob, ListBase *keys, ListBase *blocks);
#endif /* BDR_DRAWACTION_H */

View File

@@ -0,0 +1,84 @@
/**
* $Id: BDR_drawmesh.h 11860 2007-08-28 08:53:36Z blendix $
*
* ***** BEGIN GPL/BL DUAL LICENSE BLOCK *****
*
* 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
* of the License, or (at your option) any later version. The Blender
* Foundation also sells licenses for use in proprietary software under
* the Blender License. See http://www.blender.org/BL/ for information
* about this.
*
* 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.
*
* ***** END GPL/BL DUAL LICENSE BLOCK *****
*/
#ifndef BDR_DRAWMESH_H
#define BDR_DRAWMESH_H
struct Image;
struct MTFace;
struct Object;
struct DerivedMesh;
struct Mesh;
struct EdgeHash;
/**
* Enables or disable mipmapping for realtime images (textures).
* Note that this will will destroy all texture bindings in OpenGL.
* @see free_realtime_image()
* @param mipmap Turn mipmapping on (mipmap!=0) or off (mipmap==0).
*/
void set_mipmap(int mipmap);
/**
* Enables or disable linear mipmap setting for realtime images (textures).
* Note that this will will destroy all texture bindings in OpenGL.
* @see free_realtime_image()
* @param mipmap Turn linear mipmapping on (linear!=0) or off (linear==0).
*/
void set_linear_mipmap(int linear);
/**
* Returns the current setting for linear mipmapping.
*/
int get_linear_mipmap(void);
/**
* Resets the realtime image cache variables.
*/
void clear_realtime_image_cache(void);
void update_realtime_image(struct Image *ima, int x, int y, int w, int h);
void free_realtime_image(struct Image *ima);
void free_all_realtime_images(void);
void make_repbind(struct Image *ima);
int set_tpage(struct MTFace *tface);
void texpaint_enable_mipmap(void);
void texpaint_disable_mipmap(void);
void draw_mesh_textured(struct Object *ob, struct DerivedMesh *dm, int facesel);
struct EdgeHash *get_tface_mesh_marked_edge_info(struct Mesh *me);
void init_realtime_GL(void);
#endif /* BDR_DRAWMESH_H */

View File

@@ -0,0 +1,82 @@
/**
* $Id: BDR_drawobject.h 10455 2007-04-04 13:18:41Z campbellbarton $
*
* ***** BEGIN GPL/BL DUAL LICENSE BLOCK *****
*
* 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
* of the License, or (at your option) any later version. The Blender
* Foundation also sells licenses for use in proprietary software under
* the Blender License. See http://www.blender.org/BL/ for information
* about this.
*
* 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.
*
* ***** END GPL/BL DUAL LICENSE BLOCK *****
*/
#ifndef BDR_DRAWOBJECT_H
#define BDR_DRAWOBJECT_H
#ifdef __cplusplus
extern "C" {
#endif
struct Object;
struct Nurb;
struct Lamp;
struct ListBase;
struct BoundBox;
struct Base;
struct BPoint;
struct BezTriple;
struct EditVert;
struct EditFace;
struct EditEdge;
int set_gl_material(int nr);
int init_gl_materials(struct Object *ob, int check_alpha);
void mesh_foreachScreenVert(void (*func)(void *userData, struct EditVert *eve, int x, int y, int index), void *userData, int clipVerts);
void mesh_foreachScreenEdge(void (*func)(void *userData, struct EditEdge *eed, int x0, int y0, int x1, int y1, int index), void *userData, int clipVerts);
void mesh_foreachScreenFace(void (*func)(void *userData, struct EditFace *efa, int x, int y, int index), void *userData);
void lattice_foreachScreenVert(void (*func)(void *userData, struct BPoint *bp, int x, int y), void *userData);
void nurbs_foreachScreenVert(void (*func)(void *userData, struct Nurb *nu, struct BPoint *bp, struct BezTriple *bezt, int beztindex, int x, int y), void *userData);
void drawcircball(int mode, float *cent, float rad, float tmat[][4]);
void get_local_bounds(struct Object *ob, float *center, float *size);
/* drawing flags: */
#define DRAW_PICKING 1
#define DRAW_CONSTCOLOR 2
void draw_object(struct Base *base, int flag);
void drawaxes(float size, int flag, char drawtype);
void draw_object_ext(struct Base *base);
void drawsolidcube(float size);
extern void draw_object_backbufsel(struct Object *ob);
void draw_object_instance(struct Object *ob, int dt, int outline);
#ifdef __cplusplus
}
#endif
#endif /* BDR_DRAWOBJECT_H */

View File

@@ -0,0 +1,105 @@
/**
* $Id: BDR_editcurve.h 12519 2007-11-08 00:06:48Z campbellbarton $
*
* ***** BEGIN GPL/BL DUAL LICENSE BLOCK *****
*
* 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
* of the License, or (at your option) any later version. The Blender
* Foundation also sells licenses for use in proprietary software under
* the Blender License. See http://www.blender.org/BL/ for information
* about this.
*
* 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.
*
* ***** END GPL/BL DUAL LICENSE BLOCK *****
*/
#ifndef BDR_EDITCURVE_H
#define BDR_EDITCURVE_H
struct Object;
struct Curve;
struct Nurb;
struct BezTriple;
struct BPoint;
struct BezTripleNurb;
short isNurbsel(struct Nurb *nu);
int isNurbsel_count(struct Nurb *nu);
void printknots(void);
void load_editNurb(void);
void make_editNurb(void);
void remake_editNurb(void);
void separate_nurb(void);
short isNurbselUV(struct Nurb *nu, int *u, int *v, int flag);
void setflagsNurb(short flag);
void rotateflagNurb(short flag, float *cent, float rotmat[][3]);
void translateflagNurb(short flag, float *vec);
void weightflagNurb(short flag, float w, int mode);
void deleteflagNurb(short flag);
short extrudeflagNurb(int flag);
void adduplicateflagNurb(short flag);
void switchdirectionNurb2(void);
void switchdirection_knots(float *base, int tot);
void deselectall_nurb(void);
void hideNurb(int swap);
void revealNurb(void);
void selectswapNurb(void);
void subdivideNurb(void);
int convertspline(short type, struct Nurb *nu);
void setsplinetype(short type);
void rotate_direction_nurb(struct Nurb *nu);
int is_u_selected(struct Nurb *nu, int u);
void make_selection_list_nurb(void);
void merge_2_nurb(struct Nurb *nu1, struct Nurb *nu2);
void merge_nurb(void);
void addsegment_nurb(void);
void mouse_nurb(void);
void spinNurb(float *dvec, short mode);
void addvert_Nurb(int mode);
void extrude_nurb(void);
void makecyclicNurb(void);
void selectconnected_nurb(void);
void selectrow_nurb(void);
void selectend_nurb(short selfirst, short doswap, short selstatus);
void select_more_nurb(void);
void select_less_nurb(void);
void select_next_nurb(void);
void select_prev_nurb(void);
void select_random_nurb(void);
void select_every_nth_nurb(void);
void adduplicate_nurb(void);
void delNurb(void);
void nurb_set_smooth(short event);
int join_curve(int type);
struct Nurb *addNurbprim(int type, int stype, int newname);
void default_curve_ipo(struct Curve *cu);
void add_primitiveCurve(int stype);
void add_primitiveNurb(int type);
void clear_tilt(void);
void clever_numbuts_curve(void);
int bezt_compare (const void *e1, const void *e2);
void setweightNurb( void );
void setradiusNurb( void );
void smoothradiusNurb( void );
extern void undo_push_curve(char *name);
#endif /* BDR_EDITCURVE_H */

View File

@@ -0,0 +1,61 @@
/**
* $Id: BDR_editface.h 12139 2007-09-25 03:31:12Z campbellbarton $
*
* ***** BEGIN GPL/BL DUAL LICENSE BLOCK *****
*
* 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
* of the License, or (at your option) any later version. The Blender
* Foundation also sells licenses for use in proprietary software under
* the Blender License. See http://www.blender.org/BL/ for information
* about this.
*
* 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.
*
* ***** END GPL/BL DUAL LICENSE BLOCK *****
*/
#ifndef BDR_EDITFACE_H
#define BDR_EDITFACE_H
struct MTFace;
struct EditFace;
struct Mesh;
struct MCol;
struct MTFace *get_active_mtface(struct EditFace **efa, struct MCol **mcol, short sloppy);
void calculate_uv_map(unsigned short mapmode);
void default_uv(float uv[][2], float size);
void make_tfaces(struct Mesh *me);
void reveal_tface(void);
void hide_tface(void);
void select_linked_tfaces(int mode);
void deselectall_tface(void);
void selectswap_tface(void);
void rotate_uv_tface(void);
void mirror_uv_tface(void);
int minmax_tface(float *min, float *max);
void face_select(void);
void face_borderselect(void);
void uv_autocalc_tface(void);
void set_texturepaint(void);
void get_same_uv(void);
void seam_mark_clear_tface(short mode);
#endif /* BDR_EDITFACE_H */

View File

@@ -1,5 +1,5 @@
/**
* $Id: IDProp.h
* $Id: BDR_editmball.h 10893 2007-06-08 14:17:13Z jiri $
*
* ***** BEGIN GPL/BL DUAL LICENSE BLOCK *****
*
@@ -23,39 +23,34 @@
* The Original Code is Copyright (C) 2001-2002 by NaN Holding BV.
* All rights reserved.
*
* Contributor(s): Joseph Eagar
* The Original Code is: all of this file.
*
* Contributor(s): none yet.
*
* ***** END GPL/BL DUAL LICENSE BLOCK *****
*/
#include <Python.h>
struct ID;
struct IDProperty;
struct BPy_IDGroup_Iter;
#ifndef BDR_EDITMBALL_H
#define BDR_EDITMBALL_H
typedef struct BPy_IDProperty {
PyObject_VAR_HEAD
struct ID *id;
struct IDProperty *prop, *parent;
PyObject *data_wrap;
} BPy_IDProperty;
void make_editMball(void);
void load_editMball(void);
typedef struct BPy_IDArray {
PyObject_VAR_HEAD
struct ID *id;
struct IDProperty *prop;
} BPy_IDArray;
/**
* @attention The argument is discarded. It is there for
* compatibility.
*/
void add_primitiveMball(int);
void deselectall_mball(void);
void selectinverse_mball(void);
void selectrandom_mball(void);
void mouse_mball(void);
void adduplicate_mball(void);
void delete_mball(void);
void freeMetaElemlist(struct ListBase *lb);
void undo_push_mball(char *name);
void hide_mball(char hide);
void reveal_mball(void);
typedef struct BPy_IDGroup_Iter {
PyObject_VAR_HEAD
BPy_IDProperty *group;
struct IDProperty *cur;
int mode;
} BPy_IDGroup_Iter;
#endif /* BDR_EDITMBALL_H */
PyObject *BPy_Wrap_IDProperty(struct ID *id, struct IDProperty *prop, struct IDProperty *parent);
void IDProp_Init_Types(void);
#define IDPROP_ITER_KEYS 0
#define IDPROP_ITER_ITEMS 1

View File

@@ -0,0 +1,128 @@
/**
* $Id: BDR_editobject.h 12696 2007-11-27 19:23:26Z campbellbarton $
*
* ***** BEGIN GPL/BL DUAL LICENSE BLOCK *****
*
* 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
* of the License, or (at your option) any later version. The Blender
* Foundation also sells licenses for use in proprietary software under
* the Blender License. See http://www.blender.org/BL/ for information
* about this.
*
* 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.
*
* ***** END GPL/BL DUAL LICENSE BLOCK *****
*/
#ifndef BDR_EDITOBJECT_H
#define BDR_EDITOBJECT_H
struct Object;
struct Tex;
struct Material;
struct Base;
struct HookModifierData;
struct Scene;
void add_object_draw(int type);
void add_objectLamp(short type);
void free_and_unlink_base_from_scene(struct Scene *scene, struct Base *base);
void free_and_unlink_base(struct Base *base);
void delete_obj(int ok);
void make_track(void);
void apply_obmat(struct Object *ob);
void clear_parent(void);
void clear_track(void);
void clear_object(char mode);
void reset_slowparents(void);
void set_slowparent(void);
void make_vertex_parent(void);
int test_parent_loop(struct Object *par, struct Object *ob);
void make_parent(void);
void make_proxy(void);
#define EM_WAITCURSOR (1 << 0)
#define EM_FREEDATA (1 << 1)
#define EM_FREEUNDO (1 << 2)
void exit_editmode(int flag);
void check_editmode(int type);
void enter_editmode(int wc);
void exit_paint_modes(void);
void docenter(int centermode);
void docenter_new(void);
void docenter_cursor(void);
void movetolayer(void);
void special_editmenu(void);
void convertmenu(void);
void copy_attr_menu(void);
void copy_attr(short event);
void link_to_scene(unsigned short nr);
void make_links_menu(void);
void make_links(short event);
void make_duplilist_real(void);
void apply_object(void);
/* old transform */
void apply_keyb_grid(float *val, float fac1, float fac2, float fac3, int invert);
void headerprint(char *str);
/* used for old game engine collision optimize */
int cylinder_intersect_test(void);
int sphere_intersect_test(void);
void std_rmouse_transform(void (*xf_func)(int, int));
void rightmouse_transform(void);
void single_object_users(int flag);
void new_id_matar(struct Material **matar, int totcol);
void single_obdata_users(int flag);
void single_mat_users(int flag);
void do_single_tex_user(struct Tex **from);
void single_tex_users_expand(void);
void single_mat_users_expand(void);
void single_user(void);
void make_local_menu(void);
void make_local(int mode);
void adduplicate(int mode, int dupflag); /* when the dupflag is 0 no data is duplicated */
void selectlinks_menu(void);
void selectlinks(int nr);
void image_aspect(void);
void set_ob_ipoflags(void);
void select_select_keys(void);
int vergbaseco(const void *a1, const void *a2);
void auto_timeoffs(void);
void texspace_edit(void);
void flip_subdivison(int);
void mirrormenu(void);
void hookmenu(void); /* object mode hook menu */
void add_hook(void);
void hook_select(struct HookModifierData *hmd);
int hook_getIndexArray(int *tot, int **indexar, char *name, float *cent_r);
int object_is_libdata(struct Object *ob);
int object_data_is_libdata(struct Object *ob);
void hide_objects(int select);
void show_objects(void);
#endif /* BDR_EDITOBJECT_H */

View File

@@ -0,0 +1,44 @@
/**
* $Id: BDR_imagepaint.h 8390 2006-08-27 13:29:00Z blendix $
*
* ***** BEGIN GPL/BL DUAL LICENSE BLOCK *****
*
* 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
* of the License, or (at your option) any later version. The Blender
* Foundation also sells licenses for use in proprietary software under
* the Blender License. See http://www.blender.org/BL/ for information
* about this.
*
* 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.
*
* ***** END GPL/BL DUAL LICENSE BLOCK *****
*/
#ifndef BDR_IMAGEPAINT_H
#define BDR_IMAGEPAINT_H
void imagepaint_redraw_tool(void);
void imagepaint_pick(short mousebutton);
void imagepaint_paint(short mousebutton, short texturepaint);
void imagepaint_undo();
void free_imagepaint();
#endif /* BDR_IMAGEPAINT_H */

View File

@@ -0,0 +1,142 @@
/*
* $Id: BDR_sculptmode.h 11036 2007-06-24 22:28:28Z nicholasbishop $
*
* ***** BEGIN GPL LICENSE BLOCK *****
*
* 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
* of the License, or (at your option) any later version.
*
* 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) 2006 by Nicholas Bishop
* All rights reserved.
*
* The Original Code is: all of this file.
*
* Contributor(s): none yet.
*
* ***** END GPL LICENSE BLOCK *****
*/
#ifndef BDR_SCULPTMODE_H
#define BDR_SCULPTMODE_H
#include "DNA_listBase.h"
#include "DNA_vec_types.h"
/* For bglMats */
#include "BIF_glutil.h"
#include "transform.h"
struct uiBlock;
struct BrushData;
struct EditData;
struct IndexNode;
struct KeyBlock;
struct Mesh;
struct Object;
struct PartialVisibility;
struct Scene;
struct ScrArea;
struct SculptData;
struct SculptStroke;
typedef enum PropsetMode {
PropsetNone = 0,
PropsetSize,
PropsetStrength,
PropsetTexRot
} PropsetMode;
typedef struct PropsetData {
PropsetMode mode;
unsigned int tex;
short origloc[2];
float *texdata;
short origsize;
char origstrength;
float origtexrot;
NumInput num;
} PropsetData;
typedef struct SculptSession {
bglMats mats;
/* An array of lists; array is sized as
large as the number of verts in the mesh,
the list for each vert contains the index
for all the faces that use that vertex */
struct ListBase *vertex_users;
struct IndexNode *vertex_users_mem;
int vertex_users_size;
/* Used temporarily per-stroke */
float *vertexcosnos;
ListBase damaged_rects;
ListBase damaged_verts;
/* Used to cache the render of the active texture */
unsigned int texcache_w, texcache_h, *texcache;
PropsetData *propset;
/* For rotating around a pivot point */
vec3f pivot;
struct SculptStroke *stroke;
} SculptSession;
SculptSession *sculpt_session(void);
struct SculptData *sculpt_data(void);
/* Memory */
void sculptmode_init(struct Scene *);
void sculptmode_free_all(struct Scene *);
void sculptmode_correct_state(void);
/* Interface */
void sculptmode_draw_interface_tools(struct uiBlock *block,unsigned short cx, unsigned short cy);
void sculptmode_draw_interface_textures(struct uiBlock *block,unsigned short cx, unsigned short cy);
void sculptmode_rem_tex(void*,void*);
void sculptmode_propset_init(PropsetMode mode);
void sculptmode_propset(const unsigned short event);
void sculptmode_selectbrush_menu(void);
void sculptmode_draw_mesh(int);
void sculpt_paint_brush(char clear);
void sculpt_stroke_draw();
struct BrushData *sculptmode_brush(void);
float tex_angle(void);
void do_symmetrical_brush_actions(struct EditData *e, short *, short *);
void sculptmode_update_tex(void);
char sculpt_modifiers_active(struct Object *ob);
void sculpt(void);
void set_sculptmode(void);
/* Stroke */
void sculpt_stroke_new(const int max);
void sculpt_stroke_free();
void sculpt_stroke_add_point(const short x, const short y);
void sculpt_stroke_apply(struct EditData *);
void sculpt_stroke_apply_all(struct EditData *e);
void sculpt_stroke_draw();
/* Partial Mesh Visibility */
struct PartialVisibility *sculptmode_copy_pmv(struct PartialVisibility *);
void sculptmode_pmv_free(struct PartialVisibility *);
void sculptmode_revert_pmv(struct Mesh *me);
void sculptmode_pmv_off(struct Mesh *me);
void sculptmode_pmv(int mode);
#endif

View File

@@ -0,0 +1,51 @@
/**
* $Id: BDR_unwrapper.h 10331 2007-03-22 20:32:20Z blendix $
*
* ***** BEGIN GPL/BL DUAL LICENSE BLOCK *****
*
* 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
* of the License, or (at your option) any later version. The Blender
* Foundation also sells licenses for use in proprietary software under
* the Blender License. See http://www.blender.org/BL/ for information
* about this.
*
* 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.
*
* ***** END GPL/BL DUAL LICENSE BLOCK *****
*/
#ifndef BDR_UNWRAPPER_H
#define BDR_UNWRAPPER_H
struct Mesh;
void set_seamtface(void); /* set TF_SEAM flags in tfaces */
void select_linked_tfaces_with_seams(int mode, struct Mesh *me, unsigned int index);
void unwrap_lscm(short seamcut); /* unwrap faces selected in 3d view */
void minimize_stretch_tface_uv(void); /* optimize faces selected in uv editor */
void pack_charts_tface_uv(void);
/* for live mode: no undo pushes, caching for quicky re-unwrap */
void unwrap_lscm_live_begin(void);
void unwrap_lscm_live_re_solve(void);
void unwrap_lscm_live_end(short cancel);
#endif /* BDR_UNWRAPPER_H */

View File

@@ -1,5 +1,5 @@
/*
* $Id: windowTheme.h 8774 2006-11-07 11:24:11Z jesterking $
/**
* $Id: BDR_vpaint.h 8971 2006-11-20 12:08:06Z ton $
*
* ***** BEGIN GPL/BL DUAL LICENSE BLOCK *****
*
@@ -23,38 +23,36 @@
* The Original Code is Copyright (C) 2001-2002 by NaN Holding BV.
* All rights reserved.
*
* This is a new part of Blender.
* The Original Code is: all of this file.
*
* Contributor(s): Willian P. Germano
* Contributor(s): none yet.
*
* ***** END GPL/BL DUAL LICENSE BLOCK *****
*/
*/
#ifndef EXPP_WINDOWTHEME_H
#define EXPP_WINDOWTHEME_H
#ifndef BDR_VPAINT_H
#define BDR_VPAINT_H
#include <Python.h>
#include "DNA_screen_types.h"
#include "DNA_space_types.h"
#include "DNA_userdef_types.h"
struct Mesh;
struct MDeformVert; /* __NLA */
typedef struct {
PyObject_HEAD struct bTheme *theme;
struct ThemeUI *tui;
unsigned int rgba_to_mcol(float r, float g, float b, float a);
void do_shared_vertexcol(struct Mesh *me);
void make_vertexcol(int shade);
} BPy_ThemeUI;
void clear_vpaint(void);
void clear_vpaint_selectedfaces(void);
void vpaint_dogamma(void);
void sample_vpaint(void);
typedef struct {
PyObject_HEAD struct bTheme *theme;
struct ThemeSpace *tsp;
void free_vertexpaint(void);
void vertex_paint(void);
void set_vpaint(void);
} BPy_ThemeSpace;
void set_wpaint(void);
void clear_wpaint_selectedfaces(void);
void weight_paint(void);
typedef struct {
PyObject_HEAD struct bTheme *theme;
} BPy_Theme;
#endif /* BDR_VPAINT_H */
PyObject *Theme_Init( void );
#endif /* EXPP_WINDOWTHEME_H */

View File

@@ -0,0 +1,140 @@
/**
* $Id: BIF_butspace.h 12682 2007-11-26 22:09:57Z blendix $
*
* ***** BEGIN GPL/BL DUAL LICENSE BLOCK *****
*
* 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
* of the License, or (at your option) any later version. The Blender
* Foundation also sells licenses for use in proprietary software under
* the Blender License. See http://www.blender.org/BL/ for information
* about this.
*
* 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.
*
* ***** END GPL/BL DUAL LICENSE BLOCK *****
*/
#ifndef BIF_BUTSPACE_H
#define BIF_BUTSPACE_H
/* all internal/external calls and event codes for buttons space */
/* should be split in 2 parts... */
struct Base;
struct ID;
/* external, butspace.c */
extern void do_butspace(unsigned short event);
extern void redraw_test_buttons(struct Object *new);
extern char *image_type_pup(void);
/* buttons_editing.c */
extern void validate_editbonebutton_cb(void *bonev, void *namev);
/* buts->mainb old */
#define BUTS_VIEW 0
#define BUTS_LAMP 1
#define BUTS_MAT 2
#define BUTS_TEX 3
#define BUTS_ANIM 4
#define BUTS_WORLD 5
#define BUTS_RENDER 6
#define BUTS_EDIT 7
#define BUTS_GAME 8
#define BUTS_FPAINT 9
#define BUTS_RADIO 10
#define BUTS_SCRIPT 11
#define BUTS_SOUND 12
#define BUTS_CONSTRAINT 13
#define BUTS_EFFECTS 14
/* warning: the values of these defines are used in sbuts->tabs[7] */
/* buts->mainb new */
#define CONTEXT_SCENE 0
#define CONTEXT_OBJECT 1
#define CONTEXT_TYPES 2
#define CONTEXT_SHADING 3
#define CONTEXT_EDITING 4
#define CONTEXT_SCRIPT 5
#define CONTEXT_LOGIC 6
/* buts->tab new */
#define TAB_SHADING_MAT 0
#define TAB_SHADING_TEX 1
#define TAB_SHADING_RAD 2
#define TAB_SHADING_WORLD 3
#define TAB_SHADING_LAMP 4
#define TAB_OBJECT_OBJECT 0
#define TAB_OBJECT_PHYSICS 1
#define TAB_OBJECT_PARTICLE 2
#define TAB_SCENE_RENDER 0
#define TAB_SCENE_WORLD 1
#define TAB_SCENE_ANIM 2
#define TAB_SCENE_SOUND 3
/* buts->scaflag */
#define BUTS_SENS_SEL 1
#define BUTS_SENS_ACT 2
#define BUTS_SENS_LINK 4
#define BUTS_CONT_SEL 8
#define BUTS_CONT_ACT 16
#define BUTS_CONT_LINK 32
#define BUTS_ACT_SEL 64
#define BUTS_ACT_ACT 128
#define BUTS_ACT_LINK 256
/* buttons grid */
#define PANELX 320
#define PANELY 0
#define PANELW 318
#define PANELH 204
#define BUTW1 300
#define BUTW2 145
#define BUTW3 93
#define BUTW4 67
#define ICONBUTW 20
#define BUTH 22
#define YSPACE 6
#define XSPACE 10
#define PANEL_YMAX 210
#define PANEL_XMAX 310
#define X1CLM1 10
#define X2CLM1 X1CLM1
#define X2CLM2 165
#define X3CLM1 X1CLM1
#define X3CLM2 113
#define X3CLM3 217
#define X4CLM1 X1CLM1
#define X4CLM2 77
#define X4CLM3 165
#define X4CLM4 232
#endif

View File

@@ -0,0 +1,103 @@
/**
* $Id: BIF_cursors.h 7739 2006-06-15 14:22:59Z broken $
*
* ***** BEGIN GPL/BL DUAL LICENSE BLOCK *****
*
* 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
* of the License, or (at your option) any later version. The Blender
* Foundation also sells licenses for use in proprietary software under
* the Blender License. See http://www.blender.org/BL/ for information
* about this.
*
* 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.
*
* ***** END GPL/BL DUAL LICENSE BLOCK *****
*/
#ifndef __BLI_CURSORS_DOT_H__
#define __BLI_CURSORS_DOT_H__
void InitCursorData(void);
short GetBlenderCursor(void);
void SetBlenderCursor(short cursornum);
//typedef struct BCursor_s BCursor;
typedef struct BCursor {
char *small_bm;
char *small_mask;
char small_sizex;
char small_sizey;
char small_hotx;
char small_hoty;
char *big_bm;
char *big_mask;
char big_sizex;
char big_sizey;
char big_hotx;
char big_hoty;
char fg_color;
char bg_color;
} BCursor;
#define LASTCURSOR -2
#define SYSCURSOR -1
enum {
BC_NW_ARROWCURSOR=0,
BC_NS_ARROWCURSOR,
BC_EW_ARROWCURSOR,
BC_WAITCURSOR,
BC_CROSSCURSOR,
BC_EDITCROSSCURSOR,
BC_BOXSELCURSOR,
BC_KNIFECURSOR,
BC_VLOOPCURSOR,
BC_TEXTEDITCURSOR,
BC_PAINTBRUSHCURSOR,
BC_HANDCURSOR,
BC_NSEW_SCROLLCURSOR,
BC_NS_SCROLLCURSOR,
BC_EW_SCROLLCURSOR,
BC_EYEDROPPER_CURSOR,
/* --- ALWAYS LAST ----- */
BC_NUMCURSORS,
};
enum {
BC_BLACK=0,
BC_WHITE,
BC_RED,
BC_BLUE,
BC_GREEN,
BC_YELLOW
};
#define SMALL_CURSOR 0
#define BIG_CURSOR 1
#endif

View File

@@ -0,0 +1,74 @@
/**
* $Id: BIF_drawimage.h 12198 2007-10-03 10:36:04Z campbellbarton $
*
* ***** BEGIN GPL/BL DUAL LICENSE BLOCK *****
*
* 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
* of the License, or (at your option) any later version. The Blender
* Foundation also sells licenses for use in proprietary software under
* the Blender License. See http://www.blender.org/BL/ for information
* about this.
*
* 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.
*
* ***** END GPL/BL DUAL LICENSE BLOCK *****
*/
#ifndef BIF_DRAWIMAGE_H
#define BIF_DRAWIMAGE_H
struct ScrArea;
struct SpaceImage;
struct Render;
struct Image;
struct ImBuf;
struct uiBlock;
struct MTFace;
void do_imagebuts(unsigned short event);
void calc_image_view(struct SpaceImage *sima, char mode);
void drawimagespace(struct ScrArea *sa, void *spacedata);
void image_changed(struct SpaceImage *sima, struct Image *image);
int draw_uvs_face_check(void);
void tface_center(struct MTFace *tf, float cent[2], void * isquad);
void draw_uvs_sima(void);
void image_set_tile(struct SpaceImage *sima, int dotile);
void image_home(void);
void image_viewmove(int mode);
void image_viewzoom(unsigned short event, int invert);
void image_viewcenter(void);
void uvco_to_areaco(float *vec, short *mval);
void uvco_to_areaco_noclip(float *vec, int *mval);
void what_image(struct SpaceImage *sima);
void image_preview_event(int event);
void image_info(struct Image *ima, struct ImBuf *ibuf, char *str);
void imagespace_composite_flipbook(struct ScrArea *sa);
void imagewindow_render_callbacks(struct Render *re);
void imagewindow_toggle_render(void);
void imagewindow_swap_render_rects(void);
void imagewin_store_spare(void);
struct ImBuf *imagewindow_get_ibuf(struct SpaceImage *sima);
void image_editvertex_buts(struct uiBlock *block);
void image_editcursor_buts(struct uiBlock *block);
#endif

View File

@@ -1,5 +1,5 @@
/*
* $Id: meshPrimitive.h 7512 2006-05-25 16:45:24Z khughes $
/**
* $Id: BIF_drawoops.h 6135 2005-12-16 13:50:45Z campbellbarton $
*
* ***** BEGIN GPL/BL DUAL LICENSE BLOCK *****
*
@@ -23,24 +23,19 @@
* The Original Code is Copyright (C) 2001-2002 by NaN Holding BV.
* All rights reserved.
*
* This is a new part of Blender.
* The Original Code is: all of this file.
*
* Contributor(s): Ken Hughes
* Contributor(s): none yet.
*
* ***** END GPL/BL DUAL LICENSE BLOCK *****
*/
#ifndef EXPP_MESHPRIMITIVES_H
#define EXPP_MESHPRIMITIVES_H
#ifndef BIF_DRAWOOPS_H
#define BIF_DRAWOOPS_H
#include <Python.h>
void give_oopslink_line(Oops *oops, OopsLink *ol, float *v1, float *v2);
void mysbox(float x1, float y1, float x2, float y2);
void boundbox_oops(short sel);
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
/* PROTOS */
PyObject *MeshPrimitives_Init( void );
#endif /* EXPP_MESHPRIMITIVES_H */

View File

@@ -1,5 +1,5 @@
/**
* $Id$
* $Id: BIF_drawscene.h 229 2002-12-27 13:11:01Z mein $
*
* ***** BEGIN GPL/BL DUAL LICENSE BLOCK *****
*
@@ -30,9 +30,6 @@
* ***** END GPL/BL DUAL LICENSE BLOCK *****
*/
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
struct Scene;
void set_scene(struct Scene *sce);
int datatoc_tonize= 0;
char datatoc_ton[]= {0};

View File

@@ -1,5 +1,5 @@
/*
* $Id: Sys.h 4803 2005-07-18 03:50:37Z ascotan $
/**
*
*
* ***** BEGIN GPL/BL DUAL LICENSE BLOCK *****
*
@@ -25,16 +25,17 @@
*
* This is a new part of Blender.
*
* Contributor(s): Willian P. Germano
* Contributor(s): Willian P. Germano.
*
* ***** END GPL/BL DUAL LICENSE BLOCK *****
*/
*/
#ifndef EXPP_sys_H
#define EXPP_sys_H
#ifndef BIF_DRAWSCRIPT_H
#define BIF_DRAWSCRIPT_H
#include <Python.h>
struct ScrArea;
struct SpaceScript;
PyObject *sys_Init( void );
void free_scriptspace(struct SpaceScript *sc);
#endif /* EXPP_sys_H */
#endif /* BIF_DRAWSCRIPT_H */

View File

@@ -0,0 +1,46 @@
/**
* $Id: BIF_drawseq.h 12177 2007-10-01 08:03:11Z schlaile $
*
* ***** BEGIN GPL/BL DUAL LICENSE BLOCK *****
*
* 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
* of the License, or (at your option) any later version. The Blender
* Foundation also sells licenses for use in proprietary software under
* the Blender License. See http://www.blender.org/BL/ for information
* about this.
*
* 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.
*
* ***** END GPL/BL DUAL LICENSE BLOCK *****
*/
#ifndef BIF_DRAWSEQ_H
#define BIF_DRAWSEQ_H
struct ScrArea;
struct Sequence;
void drawprefetchseqspace(struct ScrArea *sa, void *spacedata);
void drawseqspace(struct ScrArea *sa, void *spacedata);
void set_special_seq_update(int val);
void seq_viewmove(SpaceSeq *sseq);
void seq_reset_imageofs(SpaceSeq *sseq);
#endif

View File

@@ -1,5 +1,5 @@
/*
* $Id: sceneRadio.h 10269 2007-03-15 01:09:14Z campbellbarton $
/**
* $Id: BIF_drawtext.h 4428 2005-05-13 16:11:28Z ton $
*
* ***** BEGIN GPL/BL DUAL LICENSE BLOCK *****
*
@@ -23,29 +23,32 @@
* The Original Code is Copyright (C) 2001-2002 by NaN Holding BV.
* All rights reserved.
*
* This is a new part of Blender.
* The Original Code is: all of this file.
*
* Contributor(s): Willian P. Germano
* Contributor(s): none yet.
*
* ***** END GPL/BL DUAL LICENSE BLOCK *****
*/
*/
#ifndef EXPP_SCENERADIO_H
#define EXPP_SCENERADIO_H
#ifndef BIF_DRAWTEXT_H
#define BIF_DRAWTEXT_H
#include <Python.h>
#include "DNA_radio_types.h"
#include "DNA_scene_types.h"
struct ScrArea;
struct SpaceText;
struct Text;
/* BPy_Radio declaration */
typedef struct {
PyObject_HEAD
struct Radio *radio;
struct Scene *scene;
} BPy_Radio;
void unlink_text(struct Text *text);
PyObject *Radio_Init( void );
void free_textspace(struct SpaceText *st);
PyObject *Radio_CreatePyObject( struct Scene *scene );
void txt_write_file(struct Text *text);
void add_text_fs(char *file);
void free_txt_data(void);
void pop_space_text(struct SpaceText *st);
void get_format_string(void);
void do_brackets(void);
#endif
#endif /* EXPP_SCENERADIO_H */

View File

@@ -0,0 +1,162 @@
/**
* $Id: BIF_editaction.h 12065 2007-09-17 11:41:12Z aligorith $
*
* ***** BEGIN GPL/BL DUAL LICENSE BLOCK *****
*
* 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
* of the License, or (at your option) any later version. The Blender
* Foundation also sells licenses for use in proprietary software under
* the Blender License. See http://www.blender.org/BL/ for information
* about this.
*
* 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): 2007, Joshua Leung, Action Editor Recode
*
* ***** END GPL/BL DUAL LICENSE BLOCK *****
*/
#ifndef BIF_EDITACTION_H
#define BIF_EDITACTION_H
/* some interface related sizes*/
#define CHANNELHEIGHT 16
#define CHANNELSKIP 2
#define NAMEWIDTH 164
#define SLIDERWIDTH 125
#define ACTWIDTH (G.saction->actwidth)
/* Some types for easier type-testing */
enum {
ACTTYPE_NONE= 0,
ACTTYPE_ACHAN,
ACTTYPE_CONCHAN,
ACTTYPE_ICU,
ACTTYPE_FILLIPO,
ACTTYPE_FILLCON,
ACTTYPE_IPO,
ACTTYPE_SHAPEKEY
};
/* Macros for easier/more consistant state testing */
#define VISIBLE_ACHAN(achan) ((achan->flag & ACHAN_HIDDEN)==0)
#define EDITABLE_ACHAN(achan) ((VISIBLE_ACHAN(achan)) && ((achan->flag & ACHAN_PROTECTED)==0))
#define EXPANDED_ACHAN(achan) ((VISIBLE_ACHAN(achan)) && (achan->flag & ACHAN_EXPANDED))
#define SEL_ACHAN(achan) ((achan->flag & ACHAN_SELECTED) || (achan->flag & ACHAN_HILIGHTED))
#define FILTER_IPO_ACHAN(achan) ((achan->flag & ACHAN_SHOWIPO))
#define FILTER_CON_ACHAN(achan) ((achan->flag & ACHAN_SHOWCONS))
#define EDITABLE_CONCHAN(conchan) ((conchan->flag & CONSTRAINT_CHANNEL_PROTECTED)==0)
#define SEL_CONCHAN(conchan) (conchan->flag & CONSTRAINT_CHANNEL_SELECT)
#define EDITABLE_ICU(icu) ((icu->flag & IPO_PROTECT)==0)
#define SEL_ICU(icu) (icu->flag & IPO_SELECT)
#define NLA_ACTION_SCALED (G.saction->pin==0 && OBACT && OBACT->action)
#define NLA_IPO_SCALED (OBACT && OBACT->action && G.sipo->pin==0 && G.sipo->actname)
/* constants for setting ipo-interpolation type */
enum {
SET_IPO_MENU = -1,
SET_IPO_POPUP = 0,
SET_IPO_CONSTANT,
SET_IPO_LINEAR,
SET_IPO_BEZIER,
};
/* constants for setting ipo-extrapolation type */
enum {
SET_EXTEND_MENU = 9,
SET_EXTEND_POPUP = 10,
SET_EXTEND_CONSTANT,
SET_EXTEND_EXTRAPOLATION,
SET_EXTEND_CYCLIC,
SET_EXTEND_CYCLICEXTRAPOLATION
};
struct bAction;
struct bActionChannel;
struct bPoseChannel;
struct Object;
struct Ipo;
struct BWinEvent;
struct Key;
struct ListBase;
/* Key operations */
void transform_action_keys(int mode, int dummy);
void duplicate_action_keys(void);
void snap_action_keys(short mode);
void mirror_action_keys(short mode);
void insertkey_action(void);
void delete_action_keys(void);
void delete_action_channels(void);
void clean_action(void);
/* Column/Channel Key select */
void column_select_action_keys(int mode);
void selectall_action_keys(short mval[], short mode, short selectmode);
void markers_selectkeys_between(void);
/* Action Data Copying */
void free_actcopybuf(void);
void copy_actdata(void);
void paste_actdata(void);
/* channel/strip operations */
void up_sel_action(void);
void down_sel_action(void);
void top_sel_action(void);
void bottom_sel_action(void);
/* IPO/Handle Types */
void sethandles_action_keys(int code);
void action_set_ipo_flags(short mode, short event);
/* Select */
void borderselect_action(void);
void deselect_action_keys(short test, short sel);
void deselect_action_channels(short test);
void deselect_actionchannels(struct bAction *act, short test);
int select_channel(struct bAction *act, struct bActionChannel *achan, int selectmode);
void select_actionchannel_by_name(struct bAction *act, char *name, int select);
/* ShapeKey stuff */
struct Key *get_action_mesh_key(void);
int get_nearest_key_num(struct Key *key, short *mval, float *x);
void *get_nearest_act_channel(short mval[], short *ret_type);
/* Action */
struct bActionChannel *get_hilighted_action_channel(struct bAction* action);
struct bAction *add_empty_action(char *name);
struct bAction *ob_get_action(struct Object *ob);
void actdata_filter(ListBase *act_data, int filter_mode, void *data, short datatype);
void *get_action_context(short *datatype);
void remake_action_ipos(struct bAction *act);
/* event handling */
void winqreadactionspace(struct ScrArea *sa, void *spacedata, struct BWinEvent *evt);
#endif

View File

@@ -0,0 +1,142 @@
/**
* $Id: BIF_editarmature.h 11981 2007-09-09 11:05:21Z aligorith $
*
* ***** BEGIN GPL/BL DUAL LICENSE BLOCK *****
*
* 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
* of the License, or (at your option) any later version. The Blender
* Foundation also sells licenses for use in proprietary software under
* the Blender License. See http://www.blender.org/BL/ for information
* about this.
*
* 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.
*
* ***** END GPL/BL DUAL LICENSE BLOCK *****
*/
#ifndef BIF_EDITARMATURE_H
#define BIF_EDITARMATURE_H
struct Object;
struct Base;
struct Bone;
struct bArmature;
struct ListBase;
typedef struct EditBone
{
struct EditBone *next, *prev;
struct EditBone *parent;/* Editbones have a one-way link (i.e. children refer
to parents. This is converted to a two-way link for
normal bones when leaving editmode. */
void *temp; /* Used to store temporary data */
char name[32];
float roll; /* Roll along axis. We'll ultimately use the axis/angle method
for determining the transformation matrix of the bone. The axis
is tail-head while roll provides the angle. Refer to Graphics
Gems 1 p. 466 (section IX.6) if it's not already in here somewhere*/
float head[3]; /* Orientation and length is implicit during editing */
float tail[3];
/* All joints are considered to have zero rotation with respect to
their parents. Therefore any rotations specified during the
animation are automatically relative to the bones' rest positions*/
int flag;
int parNr; /* Used for retrieving values from the menu system */
float dist, weight;
float xwidth, length, zwidth; /* put them in order! transform uses this as scale */
float ease1, ease2;
float rad_head, rad_tail;
short layer, segments;
float oldlength; /* for envelope scaling */
} EditBone;
void adduplicate_armature(void);
void addvert_armature(void);
void add_primitiveArmature(int type);
void apply_rot_armature (struct Object *ob, float mat[3][3]);
void docenter_armature (struct Object *ob, int centermode);
void clear_armature(struct Object *ob, char mode);
void delete_armature(void);
void deselectall_armature(int toggle, int doundo);
void deselectall_posearmature (struct Object *ob, int test, int doundo);
int draw_armature(struct Base *base, int dt);
void extrude_armature(int forked);
void subdivide_armature(int numcuts);
void free_editArmature(void);
int join_armature(void);
void load_editArmature(void);
void make_bone_parent(void);
void clear_bone_parent(void);
struct Bone *get_indexed_bone (struct Object *ob, int index);
void make_editArmature(void);
void make_trans_bones (char mode);
int do_pose_selectbuffer(struct Base *base, unsigned int *buffer, short hits);
void mouse_armature(void);
void remake_editArmature(void);
void selectconnected_armature(void);
void selectconnected_posearmature(void);
void select_bone_parent(void);
void unique_editbone_name (struct ListBase *ebones, char *name);
void auto_align_armature(short mode);
void create_vgroups_from_armature(struct Object *ob, struct Object *par);
void add_verts_to_dgroups(struct Object *ob, struct Object *par, int heat, int mirror);
void hide_selected_pose_bones(void);
void hide_unselected_pose_bones(void);
void show_all_pose_bones(void);
int bone_looper(struct Object *ob, struct Bone *bone, void *data,
int (*bone_func)(struct Object *, struct Bone *, void *));
void undo_push_armature(char *name);
void armature_bone_rename(struct bArmature *arm, char *oldname, char *newname);
void armature_flip_names(void);
EditBone *armature_bone_get_mirrored(struct EditBone *ebo);
void transform_armature_mirror_update(void);
void hide_selected_armature_bones(void);
void hide_unselected_armature_bones(void);
void show_all_armature_bones(void);
#define BONESEL_ROOT 0x10000000
#define BONESEL_TIP 0x20000000
#define BONESEL_BONE 0x40000000
#define BONESEL_ANY (BONESEL_TIP|BONESEL_ROOT|BONESEL_BONE)
#define BONESEL_NOSEL 0x80000000 /* Indicates a negative number */
#endif

View File

@@ -0,0 +1,72 @@
/**
* $Id: BIF_editconstraint.h 12339 2007-10-22 10:49:34Z aligorith $
*
* ***** BEGIN GPL/BL DUAL LICENSE BLOCK *****
*
* 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
* of the License, or (at your option) any later version. The Blender
* Foundation also sells licenses for use in proprietary software under
* the Blender License. See http://www.blender.org/BL/ for information
* about this.
*
* 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.
*
* ***** END GPL/BL DUAL LICENSE BLOCK *****
*/
#ifndef BIF_EDITCONSTRAINT_H
#define BIF_EDITCONSTRAINT_H
struct ID;
struct ListBase;
struct Object;
struct bConstraint;
struct bConstraintChannel;
struct Text;
/* generic constraint editing functions */
struct bConstraint *add_new_constraint(short type);
void add_constraint_to_object(struct bConstraint *con, struct Object *ob);
struct ListBase *get_active_constraints(struct Object *ob);
struct bConstraint *get_active_constraint(struct Object *ob);
struct ListBase *get_active_constraint_channels (struct Object *ob, int forcevalid);
struct bConstraintChannel *get_active_constraint_channel(struct Object *ob);
void object_test_constraints(struct Object *owner);
void add_constraint(int only_IK);
void ob_clear_constraints(void);
void rename_constraint(struct Object *ob, struct bConstraint *con, char *newname);
/* a few special functions for PyConstraints */
char *buildmenu_pyconstraints(struct Text *con_text, int *pyconindex);
void validate_pyconstraint_cb(void *arg1, void *arg2);
void update_pyconstraint_cb(void *arg1, void *arg2);
/* two special functions for ChildOf Constriant */
void childof_const_setinv (void *conv, void *unused);
void childof_const_clearinv(void *conv, void *unused);
#endif

View File

@@ -0,0 +1,76 @@
/**
* $Id: BIF_editdeform.h 12697 2007-11-27 21:16:47Z blendix $
*
* ***** BEGIN GPL/BL DUAL LICENSE BLOCK *****
*
* 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
* of the License, or (at your option) any later version. The Blender
* Foundation also sells licenses for use in proprietary software under
* the Blender License. See http://www.blender.org/BL/ for information
* about this.
*
* 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.
*
* ***** END GPL/BL DUAL LICENSE BLOCK *****
*/
#ifndef BIF_DEFORM_H
#define BIF_DEFORM_H
#define WEIGHT_REPLACE 1
#define WEIGHT_ADD 2
#define WEIGHT_SUBTRACT 3
struct Object;
struct Mesh;
struct MDeformVert;
struct MDeformWeight;
struct bDeformGroup;
struct bDeformGroup *add_defgroup_name (struct Object *ob, char *name);
void add_defgroup (struct Object *ob);
void del_defgroup_in_object_mode ( Object *ob );
void del_defgroup (struct Object *ob);
void duplicate_defgroup ( struct Object *ob );
void assign_verts_defgroup (void);
void remove_verts_defgroup (int allverts);
void sel_verts_defgroup (int select);
struct MDeformWeight *get_defweight (struct MDeformVert *dv, int defgroup);
struct MDeformWeight *verify_defweight (struct MDeformVert *dv, int defgroup);
void add_vert_to_defgroup (struct Object *ob, struct bDeformGroup *dg,
int vertnum, float weight,
int assignmode);
void remove_vert_defgroup (struct Object *ob, struct bDeformGroup *dg,
int vertnum);
float get_vert_defgroup (struct Object *ob, struct bDeformGroup *dg,
int vertnum);
void create_dverts(ID *id);
void vertexgroup_select_by_name(struct Object *ob, char *name);
extern void object_apply_deform(struct Object *ob);
void vgroup_assign_with_menu(void);
void vgroup_operation_with_menu(void);
#endif

View File

@@ -1,5 +1,5 @@
/**
* $Id$
* $Id: BIF_editfont.h 5286 2005-09-15 17:32:24Z ton $
*
* ***** BEGIN GPL/BL DUAL LICENSE BLOCK *****
*
@@ -30,56 +30,44 @@
* ***** END GPL/BL DUAL LICENSE BLOCK *****
*/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <wchar.h>
#ifndef WIN32
#include <unistd.h>
#else
#include "BLI_winstuff.h"
#include <io.h>
#include <direct.h>
#endif
#include <fcntl.h>
#include "MEM_guardedalloc.h"
#ifndef BIF_EDITFONT_H
#define BIF_EDITFONT_H
#include "BLI_blenlib.h"
#include "BLI_arithb.h"
struct Text;
#include "IMB_imbuf_types.h"
#include "IMB_imbuf.h"
extern char *BIF_lorem;
extern wchar_t *copybuf;
extern wchar_t *copybufinfo;
#include "DNA_screen_types.h"
#include "DNA_space_types.h"
#include "BKE_utildefines.h"
#include "BKE_global.h"
#include "BIF_imasel.h"
#include "BIF_filelist.h"
#include "BIF_space.h"
#include "BIF_screen.h"
#include "blendef.h"
#include "mydevice.h"
void free_imasel(SpaceImaSel *simasel)
typedef struct unicodect
{
/* do not free imasel itself */
if(simasel->files) {
BIF_filelist_freelib(simasel->files);
BIF_filelist_free(simasel->files);
MEM_freeN(simasel->files);
simasel->files = NULL;
}
if (simasel->img) {
IMB_freeImBuf(simasel->img);
}
if(simasel->pupmenu) {
MEM_freeN(simasel->pupmenu);
simasel->pupmenu = NULL;
}
}
char *name;
char *longname;
int start;
int end;
} unicodect;
void do_textedit(unsigned short event, short val, unsigned long _ascii);
void make_editText(void);
void load_editText(void);
void remake_editText(void);
void free_editText(void);
void paste_editText(void);
void txt_export_to_object(struct Text *text);
void txt_export_to_objects(struct Text *text);
void undo_push_font(char *);
void load_3dtext_fs(char *);
void add_lorem(void);
void paste_unicodeText(char *filename);
/**
* @attention The argument is discarded. It is there for
* compatibility.
*/
void add_primitiveFont(int);
void to_upper(void);
#endif

View File

@@ -0,0 +1,40 @@
/**
* $Id: BIF_editgroup.h 7877 2006-06-24 18:37:21Z desoto $
*
* ***** BEGIN GPL/BL DUAL LICENSE BLOCK *****
*
* 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
* of the License, or (at your option) any later version. The Blender
* Foundation also sells licenses for use in proprietary software under
* the Blender License. See http://www.blender.org/BL/ for information
* about this.
*
* 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.
*
* ***** END GPL/BL DUAL LICENSE BLOCK *****
*/
struct Group;
struct Base;
void add_selected_to_group(struct Group *group);
void rem_selected_from_group(void);
void group_operation_with_menu(void);
void group_operation(int mode);

View File

@@ -0,0 +1,70 @@
/**
* $Id: BIF_editkey.h 10579 2007-04-25 11:57:02Z aligorith $
*
* ***** BEGIN GPL/BL DUAL LICENSE BLOCK *****
*
* 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
* of the License, or (at your option) any later version. The Blender
* Foundation also sells licenses for use in proprietary software under
* the Blender License. See http://www.blender.org/BL/ for information
* about this.
*
* 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.
*
* ***** END GPL/BL DUAL LICENSE BLOCK *****
*/
#ifndef BIF_EDITKEY_H
#define BIF_EDITKEY_H
struct Key;
struct KeyBlock;
struct Mesh;
struct Object;
struct Lattice;
struct Curve;
struct uiBlock;
struct BezTriple;
struct IpoCurve;
void mesh_to_key(struct Mesh *me, struct KeyBlock *kb);
void key_to_mesh(struct KeyBlock *kb, struct Mesh *me);
void insert_meshkey(struct Mesh *me, short rel);
void latt_to_key(struct Lattice *lt, struct KeyBlock *kb);
void key_to_latt(struct KeyBlock *kb, struct Lattice *lt);
void insert_lattkey(struct Lattice *lt, short rel);
void curve_to_key(struct Curve *cu, struct KeyBlock *kb, ListBase *nurb);
void key_to_curve(struct KeyBlock *kb, struct Curve *cu, ListBase *nurb);
void insert_curvekey(struct Curve *cu, short rel);
void insert_shapekey(struct Object *ob);
void delete_key(struct Object *ob);
void move_keys(struct Object *ob);
void make_rvk_slider(struct uiBlock *block, struct Object *ob, int keynum,
int x, int y, int w, int h, char *tip);
// FIXME: move me somewhere else
struct BezTriple *get_bezt_icu_time(struct IpoCurve *icu, float *frame, float *val);
#endif

View File

@@ -0,0 +1,45 @@
/**
* $Id: BIF_editlattice.h 3405 2004-11-07 21:14:21Z ton $
*
* ***** BEGIN GPL/BL DUAL LICENSE BLOCK *****
*
* 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
* of the License, or (at your option) any later version. The Blender
* Foundation also sells licenses for use in proprietary software under
* the Blender License. See http://www.blender.org/BL/ for information
* about this.
*
* 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.
*
* ***** END GPL/BL DUAL LICENSE BLOCK *****
*/
#ifndef BIF_EDITLATTICE_H
#define BIF_EDITLATTICE_H
void free_editLatt(void);
void make_editLatt(void);
void load_editLatt(void);
void remake_editLatt(void);
void deselectall_Latt(void);
void mouse_lattice(void);
void undo_push_lattice(char *name);
#endif

View File

@@ -0,0 +1,265 @@
/**
* $Id: BIF_editmesh.h 12290 2007-10-18 21:47:55Z campbellbarton $
*
* ***** BEGIN GPL/BL DUAL LICENSE BLOCK *****
*
* 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
* of the License, or (at your option) any later version. The Blender
* Foundation also sells licenses for use in proprietary software under
* the Blender License. See http://www.blender.org/BL/ for information
* about this.
*
* 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.
*
* ***** END GPL/BL DUAL LICENSE BLOCK *****
*/
/* External for editmesh_xxxx.c functions */
#ifndef BIF_EDITMESH_H
#define BIF_EDITMESH_H
#include "BKE_mesh.h"
struct EditMesh;
struct EditFace;
struct EditEdge;
struct EditVert;
struct Mesh;
struct bDeformGroup;
struct View3D;
struct EditSelection;
struct CustomData;
// edge and face flag both
#define EM_FGON 2
// face flag
#define EM_FGON_DRAW 1
extern unsigned int em_vertoffs, em_solidoffs, em_wireoffs;
/* ******************* editmesh.c */
extern void make_editMesh(void);
extern void load_editMesh(void);
extern void free_editMesh(struct EditMesh *);
extern void remake_editMesh(void);
/* Editmesh Undo code */
extern void undo_push_mesh(char *name);
extern void separatemenu(void);
extern void separate_mesh(void);
extern void separate_mesh_loose(void);
extern void separate_material(void);
/* ******************* editmesh_add.c */
extern void make_prim(int type, float imat[3][3], int tot, int seg,
int subdiv, float dia, float d, int ext, int fill,
float cent[3] );
extern void add_primitiveMesh(int type);
extern void adduplicate_mesh(void);
extern void add_click_mesh(void);
extern void addedgeface_mesh(void);
void addfaces_from_edgenet();
/* ******************* editmesh_lib.c */
extern void EM_set_flag_all(int flag);
extern void EM_clear_flag_all(int flag);
extern void EM_select_face(struct EditFace *efa, int sel);
extern void EM_select_edge(struct EditEdge *eed, int sel);
extern float EM_face_area(struct EditFace *efa);
extern float EM_face_perimeter(struct EditFace *efa);
extern void EM_editselection_center(float *center, struct EditSelection *ese);
extern void EM_editselection_normal(float *normal, struct EditSelection *ese);
extern void EM_editselection_plane(float *plane, struct EditSelection *ese);
extern void EM_deselect_flush(void); // vertices to edges/faces (exception!)
extern void EM_select_flush(void); // vertices to edges/faces (exception!)
extern void EM_selectmode_set(void); // when mode changes
extern void EM_selectmode_flush(void); // when selection changes
extern void EM_convertsel(short oldmode, short selectmode);
extern void EM_remove_selection(void *data, int type);
extern void EM_store_selection(void *data, int type);
extern void EM_validate_selections(void);
extern int EM_nfaces_selected(void);
extern int EM_nvertices_selected(void);
extern int faceselectedAND(struct EditFace *efa, int flag);
extern void recalc_editnormals(void);
extern void flip_editnormals(void);
extern void EM_data_interp_from_verts(struct EditVert *v1,
struct EditVert *v2, struct EditVert *eve, float fac);
extern struct EditFace *EM_face_from_faces(struct EditFace *efa1,
struct EditFace *efa2, int i1, int i2, int i3, int i4);
extern void EM_data_interp_from_faces(struct EditFace *efa1,
struct EditFace *efa2, struct EditFace *efan, int i1, int i2, int i3, int i4);
void EM_add_data_layer(struct CustomData *data, int type);
void EM_free_data_layer(struct CustomData *data, int type);
/* ******************* editmesh_mods.c */
extern void EM_init_index_arrays(int forVert, int forEdge, int forFace);
extern void EM_free_index_arrays(void);
extern struct EditVert *EM_get_vert_for_index(int index);
extern struct EditEdge *EM_get_edge_for_index(int index);
extern struct EditFace *EM_get_face_for_index(int index);
extern void EM_select_face_fgon(struct EditFace *efa, int sel);
extern int EM_init_backbuf_border(short xmin, short ymin, short xmax, short ymax);
extern int EM_mask_init_backbuf_border(short mcords[][2], short tot, short xmin, short ymin, short xmax, short ymax);
extern int EM_init_backbuf_circle(short xs, short ys, short rads);
extern int EM_check_backbuf(unsigned int index);
extern void EM_free_backbuf(void);
extern void EM_selectmode_menu(void);
extern void vertexnoise(void);
extern void vertexsmooth(void);
extern void righthandfaces(int select);
extern void mouse_mesh(void);
extern void deselectall_mesh(void);
extern void selectconnected_mesh_all(void);
extern void selectconnected_mesh(void);
extern void selectconnected_delimit_mesh(void);
extern void selectconnected_delimit_mesh_all(void);
extern void selectswap_mesh(void);
extern void hide_mesh(int swap);
extern void reveal_mesh(void);
extern void vertices_to_sphere(void);
/** Aligns the selected MTFace's of @a me to the @a v3d,
* using the given axis (0-2). Can give a user error.
*/
extern void faceselect_align_view_to_selected(struct View3D *v3d, struct Mesh *me, int axis);
/** Aligns the selected faces or vertices of @a me to the @a v3d,
* using the given axis (0-2). Can give a user error.
*/
extern void editmesh_align_view_to_selected(struct View3D *v3d, int axis);
/* Selection */
extern void select_non_manifold(void);
extern void select_sharp_edges(void);
extern void select_linked_flat_faces(void);
extern void select_faces_by_numverts(int numverts);
extern void select_more(void);
extern void select_less(void);
extern void selectrandom_mesh(void);
extern void editmesh_select_by_material(int index);
extern void editmesh_deselect_by_material(int index);
extern void Vertex_Menu(void);
extern void Edge_Menu(void);
extern void Face_Menu(void);
extern void select_mesh_group_menu(void);
extern void editmesh_mark_seam(int clear);
extern void loop_multiselect(int looptype);
/* ******************* editmesh_loop.c */
#define KNIFE_PROMPT 0
#define KNIFE_EXACT 1
#define KNIFE_MIDPOINT 2
#define KNIFE_MULTICUT 3
extern void CutEdgeloop(int numcuts);
extern void KnifeSubdivide(char mode);
extern void LoopMenu(void);
#define LOOP_SELECT 1
#define LOOP_CUT 2
extern short sharesFace(struct EditEdge* e1, struct EditEdge* e2);
/* ******************* editmesh_tools.c */
#define SUBDIV_SELECT_ORIG 0
#define SUBDIV_SELECT_INNER 1
#define SUBDIV_SELECT_INNER_SEL 2
#define SUBDIV_SELECT_LOOPCUT 3
extern void convert_to_triface(int direction);
extern int removedoublesflag(short flag, short automerge, float limit);
extern void xsortvert_flag(int flag);
extern void hashvert_flag(int flag);
extern void esubdivideflag(int flag, float rad, int beauty, int numcuts, int selecttype);
extern void extrude_mesh(void);
extern void split_mesh(void);
extern void extrude_repeat_mesh(int steps, float offs);
extern void spin_mesh(int steps,float degr,float *dvec, int mode);
extern void screw_mesh(int steps,int turns);
extern void delete_mesh(void);
extern void beauty_fill(void);
extern void join_triangles(void);
extern void edge_flip(void);
extern void fill_mesh(void);
extern void bevel_menu();
void mesh_set_face_flags(short mode);
extern void mesh_set_smooth_faces(short event);
extern void mesh_rotate_uvs(void);
extern void mesh_mirror_uvs(void);
extern void mesh_rotate_colors(void);
extern void mesh_mirror_colors(void);
void mesh_copy_menu(void);
void edge_rotate_selected(int dir);
int EdgeSlide(short immediate, float imperc);
int EdgeLoopDelete(void);
void mesh_rip(void);
struct EditVert *editedge_getOtherVert(struct EditEdge *eed, struct EditVert *ev);
struct EditVert *editedge_getSharedVert(struct EditEdge *eed, struct EditEdge *eed2);
int editedge_containsVert(struct EditEdge *eed, struct EditVert *eve);
int editface_containsVert(struct EditFace *efa, struct EditVert *eve);
int editface_containsEdge(struct EditFace *efa, struct EditEdge *eed);
void shape_copy_select_from(void);
void shape_propagate(void);
int collapseEdges(void);
int merge_firstlast(int first, int uvmerge);
int merge_target( int target, int uvmerge);
void pathselect(void);
void loop_to_region(void);
void region_to_loop(void);
UvVertMap *make_uv_vert_map_EM(int selected, int do_face_idx_array, float *limit);
UvMapVert *get_uv_map_vert_EM(UvVertMap *vmap, unsigned int v);
void free_uv_vert_map_EM(UvVertMap *vmap);
int EM_texFaceCheck(void); /* can we edit UV's for this mesh?*/
int EM_vertColorCheck(void); /* can we edit colors for this mesh?*/
void EM_set_actFace(struct EditFace *efa);
struct EditFace * EM_get_actFace(void);
#endif

View File

@@ -1,5 +1,5 @@
/*
* $Id: EXPP_interface.h 7338 2006-04-30 16:22:31Z ianwill $
/**
* $Id:
*
* ***** BEGIN GPL/BL DUAL LICENSE BLOCK *****
*
@@ -23,34 +23,37 @@
* The Original Code is Copyright (C) 2001-2002 by NaN Holding BV.
* All rights reserved.
*
* This is a new part of Blender.
* The Original Code is: all of this file.
*
* Contributor(s): Michel Selten, Willian P. Germano
* Contributor(s): none yet.
*
* ***** END GPL/BL DUAL LICENSE BLOCK *****
*/
*/
#ifndef EXPP_INTERFACE_H
#define EXPP_INTERFACE_H
#ifndef BIF_EDITMODE_UNDO_H
#define BIF_EDITMODE_UNDO_H
// Add this in your local code:
extern void undo_editmode_push(char *name,
void (*freedata)(void *), // pointer to function freeing data
void (*to_editmode)(void *), // data to editmode conversion
void *(*from_editmode)(void)); // editmode to data conversion
// Further exported for UI is:
struct uiBlock;
extern void undo_editmode_step(int step); // undo and redo
extern void undo_editmode_clear(void); // free & clear all data
extern void undo_editmode_menu(void); // history menu
extern struct uiBlock *editmode_undohistorymenu(void *arg_unused);
/* Hack to avoid multires undo data taking up insane amounts of memory */
struct Object;
struct Script;
struct LinkNode;
void *undo_editmode_get_prev(struct Object *ob);
extern struct LinkNode *bpy_pydriver_oblist;
#endif
void initBlenderApi2_2x( void );
char *bpy_gethome( int append_scriptsdir );
void discardFromBDict( char *key );
void EXPP_Library_Close( void ); /* in Library.c, used by BPY_end_python */
/* PyDrivers */
void bpy_pydriver_freeList(void);
void bpy_pydriver_appendToList(struct Object *ob);
struct Object **bpy_pydriver_obArrayFromList(void);
int bpy_during_pydriver(void);
void bpy_pydriver_running(int state);
#endif /* EXPP_INTERFACE_H */

View File

@@ -0,0 +1,65 @@
/**
* $Id: BIF_editnla.h 9722 2007-01-12 02:34:47Z aligorith $
*
* ***** BEGIN GPL/BL DUAL LICENSE BLOCK *****
*
* 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
* of the License, or (at your option) any later version. The Blender
* Foundation also sells licenses for use in proprietary software under
* the Blender License. See http://www.blender.org/BL/ for information
* about this.
*
* 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.
*
* ***** END GPL/BL DUAL LICENSE BLOCK *****
*/
#ifndef BIF_EDITNLA_H
#define BIF_EDITNLA_H
struct BWinEvent;
extern void winqreadnlaspace(struct ScrArea *sa, void *spacedata, struct BWinEvent *evt);
/* NLA channel operations */
void delete_nlachannel_keys(void);
void duplicate_nlachannel_keys(void);
void transform_nlachannel_keys(int mode, int dummy);
/* Select */
void borderselect_nla(void);
void deselect_nlachannel_keys (int test);
void deselect_nlachannels(int test);
/* NLA Strip operations */
void shift_nlastrips_up(void);
void shift_nlastrips_down(void);
void reset_action_strips(int val);
void synchronize_action_strips(void);
void snap_action_strips(int snap_mode);
void add_nlablock(void);
void add_empty_nlablock(void);
void convert_nla(void);
void copy_action_modifiers(void);
/* Baking */
void bake_all_to_action(void);
#endif

View File

@@ -0,0 +1,47 @@
/**
* $Id: BIF_editoops.h 4345 2005-04-30 21:19:19Z ton $
*
* ***** BEGIN GPL/BL DUAL LICENSE BLOCK *****
*
* 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
* of the License, or (at your option) any later version. The Blender
* Foundation also sells licenses for use in proprietary software under
* the Blender License. See http://www.blender.org/BL/ for information
* about this.
*
* 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.
*
* ***** END GPL/BL DUAL LICENSE BLOCK *****
*/
#ifndef BIF_EDITOOPS_H
#define BIF_EDITOOPS_H
void borderselect_oops(void);
void deselect_all_area_oops(void);
void mouse_select_oops(void);
void select_backlinked_oops(void);
void select_linked_oops(void);
void set_select_flag_oops(void);
void swap_select_all_oops(void);
void transform_oops(int mode, int context);
void clever_numbuts_oops(void);
#endif

View File

@@ -0,0 +1,92 @@
/* BIF_editparticle.h
*
*
* $Id: BIF_editparticle.h $
*
* ***** BEGIN GPL/BL DUAL LICENSE BLOCK *****
*
* 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
* of the License, or (at your option) any later version. The Blender
* Foundation also sells licenses for use in proprietary software under
* the Blender License. See http://www.blender.org/BL/ for information
* about this.
*
* 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) 2007 by Janne Karhu.
* All rights reserved.
*
* The Original Code is: all of this file.
*
* Contributor(s): none yet.
*
* ***** END GPL/BL DUAL LICENSE BLOCK *****
*/
#ifndef BIF_EDITPARTICLE_H
#define BIF_EDITPARTICLE_H
struct Object;
struct ParticleSystem;
struct ParticleEditSettings;
/* particle edit mode */
void PE_set_particle_edit(void);
void PE_create_particle_edit(struct Object *ob, struct ParticleSystem *psys);
void PE_free_particle_edit(struct ParticleSystem *psys);
void PE_change_act(void *ob_v, void *act_v);
/* access */
struct ParticleSystem *PE_get_current(struct Object *ob);
short PE_get_current_num(struct Object *ob);
int PE_minmax(float *min, float *max);
void PE_get_colors(char sel[4], char nosel[4]);
struct ParticleEditSettings *PE_settings(void);
/* update calls */
void PE_hide_keys_time(struct ParticleSystem *psys, float cfra);
void PE_update_object(struct Object *ob, int useflag);
void PE_update_selection(struct Object *ob, int useflag);
void PE_recalc_world_cos(struct Object *ob, struct ParticleSystem *psys);
/* selection tools */
void PE_select_root(void);
void PE_select_tip(void);
void PE_deselectall(void);
void PE_select_linked(void);
void PE_select_less(void);
void PE_select_more(void);
void PE_mouse_particles(void);
void PE_borderselect(void);
void PE_selectionCB(short selecting, struct Object *editobj, short *mval, float rad);
void PE_do_lasso_select(short mcords[][2], short moves, short select);
/* tools */
void PE_hide(int mode);
void PE_rekey(void);
void PE_subdivide(void);
int PE_brush_particles(void);
void PE_delete_particle(void);
void PE_remove_doubles(void);
void PE_mirror_x(int tagged);
/* undo */
void PE_undo_push(char *str);
void PE_undo_step(int step);
void PE_undo(void);
void PE_redo(void);
void PE_undo_menu(void);
#endif

View File

@@ -1,5 +1,5 @@
/*
* $Id: Types.h 7266 2006-04-16 15:28:50Z stiv $
/**
* $Id: BIF_editsca.h 229 2002-12-27 13:11:01Z mein $
*
* ***** BEGIN GPL/BL DUAL LICENSE BLOCK *****
*
@@ -23,19 +23,19 @@
* The Original Code is Copyright (C) 2001-2002 by NaN Holding BV.
* All rights reserved.
*
* This is a new part of Blender.
* The Original Code is: all of this file.
*
* Contributor(s): Willian P. Germano, Alex Mole
* Contributor(s): none yet.
*
* ***** END GPL/BL DUAL LICENSE BLOCK *****
*/
*/
#ifndef EXPP_TYPES_H
#define EXPP_TYPES_H
#ifndef BIF_EDITSCA_H
#define BIF_EDITSCA_H
#include <Python.h>
void make_unique_prop_names(char *str);
void do_gamebuts(unsigned short event);
void gamebuts(void);
PyObject *Types_Init( void );
void types_InitAll( void );
#endif
#endif /* EXPP_TYPES_H */

View File

@@ -0,0 +1,135 @@
/**
* $Id: BIF_editseq.h 12524 2007-11-08 13:02:59Z campbellbarton $
*
* ***** BEGIN GPL/BL DUAL LICENSE BLOCK *****
*
* 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
* of the License, or (at your option) any later version. The Blender
* Foundation also sells licenses for use in proprietary software under
* the Blender License. See http://www.blender.org/BL/ for information
* about this.
*
* 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.
*
* ***** END GPL/BL DUAL LICENSE BLOCK *****
*/
#ifndef BIF_EDITSEQ_H
#define BIF_EDITSEQ_H
struct Sequence;
void add_duplicate_seq(void);
void add_sequence(int type);
void borderselect_seq(void);
void boundbox_seq(void);
void change_sequence(void);
void reload_sequence(void);
void update_seq_ipo_rect(struct Sequence * seq);
void update_seq_icu_rects(struct Sequence * seq);
struct Sequence* get_last_seq();
struct Sequence* get_forground_frame_seq( int frame );
void set_last_seq(struct Sequence * seq);
void clear_last_seq();
void del_seq(void);
void enter_meta(void);
void exit_meta(void);
struct Sequence* find_neighboring_sequence(struct Sequence *test, int lr, int sel);
struct Sequence* find_next_prev_sequence(struct Sequence *test, int lr, int sel);
struct Sequence* find_nearest_seq(int *hand);
int insert_gap(int gap, int cfra);
void make_meta(void);
void select_channel_direction(struct Sequence *test,int lr);
void select_more_seq(void);
void select_less_seq(void);
void mouse_select_seq(void);
void no_gaps(void);
void seq_snap(short event);
void seq_snap_menu(void);
void set_filter_seq(void);
void swap_select_seq(void);
void touch_seq_files(void);
void seq_remap_paths(void);
void transform_seq(int mode, int context);
void transform_seq_nomarker(int mode, int context);
void un_meta(void);
void seq_cut(int cutframe);
void seq_separate_images(void);
void reassign_inputs_seq_effect(void);
void select_surrounding_handles(struct Sequence *test);
void select_surround_from_last();
void select_dir_from_last(int lr);
void select_neighbor_from_last(int lr);
void select_linked_seq(int mode);
struct Sequence* alloc_sequence(ListBase *lb, int cfra, int machine); /*used from python*/
int check_single_seq(struct Sequence *seq);
/* sequence transform functions, for internal used */
int seq_tx_get_start(struct Sequence *seq);
int seq_tx_get_end(struct Sequence *seq);
int seq_tx_get_final_left(struct Sequence *seq);
int seq_tx_get_final_right(struct Sequence *seq);
void seq_tx_set_final_left(struct Sequence *seq, int i);
void seq_tx_set_final_right(struct Sequence *seq, int i);
/* check if one side can be transformed */
int seq_tx_check_left(struct Sequence *seq);
int seq_tx_check_right(struct Sequence *seq);
#define SEQ_DEBUG_INFO(seq) printf("seq into '%s' -- len:%i start:%i startstill:%i endstill:%i startofs:%i endofs:%i\n",\
seq->name, seq->len, seq->start, seq->startstill, seq->endstill, seq->startofs, seq->endofs)
/* seq macro's for transform
notice the difference between start/end and left/right.
left and right are the bounds at which the setuence is rendered,
start and end are from the start and fixed length of the sequence.
*/
/*
#define SEQ_GET_START(seq) (seq->start)
#define SEQ_GET_END(seq) (seq->start+seq->len)
#define SEQ_GET_FINAL_LEFT(seq) ((seq->start - seq->startstill) + seq->startofs)
#define SEQ_GET_FINAL_RIGHT(seq) (((seq->start+seq->len) + seq->endstill) - seq->endofs)
#define SEQ_SET_FINAL_LEFT(seq, val) \
if (val < (seq)->start) { \
(seq)->startstill = abs(val - (seq)->start); \
(seq)->startofs = 0; \
} else { \
(seq)->startofs = abs(val - (seq)->start); \
(seq)->startstill = 0; \
}
#define SEQ_SET_FINAL_RIGHT(seq, val) \
if (val > (seq)->start + (seq)->len) { \
(seq)->endstill = abs(val - ((seq)->start + (seq)->len)); \
(seq)->endofs = 0; \
} else { \
(seq)->endofs = abs(val - ((seq)->start + (seq)->len)); \
(seq)->endstill = 0; \
}
*/
/* drawseq.c */
void do_seqbuttons(short);
#endif

View File

@@ -0,0 +1,112 @@
/**
* $Id: BIF_editsima.h 12667 2007-11-25 13:43:14Z campbellbarton $
*
* ***** BEGIN GPL/BL DUAL LICENSE BLOCK *****
*
* 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
* of the License, or (at your option) any later version. The Blender
* Foundation also sells licenses for use in proprietary software under
* the Blender License. See http://www.blender.org/BL/ for information
* about this.
*
* 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.
*
* ***** END GPL/BL DUAL LICENSE BLOCK *****
*/
struct Mesh;
struct EditMesh;
struct SpaceImage;
struct EditFace;
struct MTFace;
/* id can be from 0 to 3 */
#define TF_PIN_MASK(id) (TF_PIN1 << id)
#define TF_SEL_MASK(id) (TF_SEL1 << id)
struct Object;
void object_uvs_changed(struct Object *ob);
void object_tface_flags_changed(struct Object *ob, int updateButtons);
int is_uv_tface_editing_allowed(void);
int is_uv_tface_editing_allowed_silent(void);
void get_connected_limit_tface_uv(float *limit);
int minmax_tface_uv(float *min, float *max);
int cent_tface_uv(float *cent, int mode);
void transform_width_height_tface_uv(int *width, int *height);
void transform_aspect_ratio_tface_uv(float *aspx, float *aspy);
void mouseco_to_cursor_sima(void);
void borderselect_sima(short whichuvs);
void mouseco_to_curtile(void);
void mouse_select_sima(void);
void snap_menu_sima(void);
void aspect_sima(struct SpaceImage *sima, float *x, float *y);
void select_invert_tface_uv(void);
void select_swap_tface_uv(void);
void mirrormenu_tface_uv(void);
void mirror_tface_uv(char mirroraxis);
void hide_tface_uv(int swap);
void reveal_tface_uv(void);
void stitch_limit_uv_tface(void);
void stitch_vert_uv_tface(void);
void unlink_selection(void);
void uvface_setsel__internal(short select);
void select_linked_tface_uv(int mode);
void pin_tface_uv(int mode);
void weld_align_menu_tface_uv(void);
void weld_align_tface_uv(char tool);
void be_square_tface_uv(struct EditMesh *em);
void select_pinned_tface_uv(void);
void sima_sample_color(void);
#define UV_SELECT_ALL 1
#define UV_SELECT_PINNED 2
void new_image_sima(void);
void reload_image_sima(void);
void save_image_sima(void);
void save_as_image_sima(void);
void save_image_sequence_sima(void);
void replace_image_sima(short imageselect);
void open_image_sima(short imageselect);
void pack_image_sima(void);
/* checks images for forced updates on frame change */
void BIF_image_update_frame(void);
void find_nearest_uv(struct MTFace **nearesttf, struct EditFace **nearestefa, unsigned int *nearestv, int *nearestuv);
/* face selection check functions */
int simaFaceDraw_Check_nolocal( struct EditFace *efa );
int simaFaceDraw_Check( struct EditFace *efa, struct MTFace *tf );
int simaFaceSel_Check( struct EditFace *efa, struct MTFace *tf );
void simaFaceSel_Set( struct EditFace *efa, struct MTFace *tf );
void simaFaceSel_UnSet( struct EditFace *efa, struct MTFace *tf );
int simaUVSel_Check( struct EditFace *efa, struct MTFace *tf, int i);
void simaUVSel_Set( struct EditFace *efa, struct MTFace *tf, int i);
void simaUVSel_UnSet( struct EditFace *efa, struct MTFace *tf, int i);

View File

@@ -0,0 +1,87 @@
/**
* $Id: BIF_editsound.h 12320 2007-10-21 15:42:08Z schlaile $
*
* ***** BEGIN GPL/BL DUAL LICENSE BLOCK *****
*
* 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
* of the License, or (at your option) any later version. The Blender
* Foundation also sells licenses for use in proprietary software under
* the Blender License. See http://www.blender.org/BL/ for information
* about this.
*
* 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.
*
* ***** END GPL/BL DUAL LICENSE BLOCK *****
*/
#ifndef BIF_EDITSOUND_H
#define BIF_EDITSOUND_H
struct bSound;
struct bSample;
struct ListBase;
struct PackedFile;
struct hdaudio;
void sound_init_audio(void);
void sound_initialize_sounds(void);
void sound_exit_audio(void);
int sound_get_mixrate(void);
void* sound_get_audiodevice(void);
void* sound_get_listener(void);
int sound_set_sample(struct bSound* sound, struct bSample* sample);
int sound_sample_is_null(struct bSound* sound);
int sound_load_sample(struct bSound* sound);
struct bSample* sound_find_sample(struct bSound* sound);
struct bSample* sound_new_sample(struct bSound* sound);
struct bSound* sound_new_sound(char *name);
struct bSound* sound_make_copy(struct bSound* originalsound);
void sound_end_all_sounds(void);
void sound_initialize_sample(struct bSound * sound);
void sound_load_samples(void);
void sound_play_sound(struct bSound *sound);
void sound_stop_all_sounds(void);
void sound_set_position(void *object,
struct bSound *sound,
float obmatrix[4][4]);
struct hdaudio * sound_open_hdaudio(char * name);
struct hdaudio * sound_copy_hdaudio(struct hdaudio * c);
long sound_hdaudio_get_duration(struct hdaudio * hdaudio, double frame_rate);
void sound_hdaudio_extract(struct hdaudio * hdaudio,
short * target_buffer,
int sample_position /* units of target_rate */,
int target_rate,
int target_channels,
int nb_samples /* in target */);
void sound_close_hdaudio(struct hdaudio * hdaudio);
#endif

View File

@@ -0,0 +1,61 @@
/**
* $Id: BIF_editview.h 12682 2007-11-26 22:09:57Z blendix $
*
* ***** BEGIN GPL/BL DUAL LICENSE BLOCK *****
*
* 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
* of the License, or (at your option) any later version. The Blender
* Foundation also sells licenses for use in proprietary software under
* the Blender License. See http://www.blender.org/BL/ for information
* about this.
*
* 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.
*
* ***** END GPL/BL DUAL LICENSE BLOCK *****
*/
#ifndef BIF_EDITVIEW_H
#define BIF_EDITVIEW_H
struct Base;
struct Object;
struct Camera;
struct View3D;
void arrows_move_cursor(unsigned short event);
int lasso_inside(short mcords[][2], short moves, short sx, short sy);
void borderselect(void);
void circle_select(void);
void deselectall(void);
void selectswap(void);
void selectall_type(short obtype);
void selectall_layer(unsigned int layernum);
void draw_sel_circle(short *mval, short *mvalo, float rad, float rado, int selecting);
void fly(void);
int gesture(void);
void mouse_cursor(void);
void mouse_select(void);
void set_active_base(struct Base *base);
void set_active_object(struct Object *ob);
void set_render_border(void);
void view3d_border_zoom(void);
void view3d_edit_clipping(struct View3D *v3d);
#endif

View File

@@ -0,0 +1,86 @@
/**
* $Id: BIF_filelist.h 12544 2007-11-10 09:11:42Z elubie $
*
* ***** BEGIN GPL LICENSE BLOCK *****
*
* 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
* of the License, or (at your option) any later version. The Blender
* Foundation also sells licenses for use in proprietary software under
* the Blender License. See http://www.blender.org/BL/ for information
* about this.
*
* 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) 2007 Blender Foundation.
* All rights reserved.
*
* The Original Code is: all of this file.
*
* Contributor(s): none yet.
*
* ***** END GPL LICENSE BLOCK *****
*/
#ifndef BIF_FILELIST_H
#define BIF_FILELIST_H
#ifdef __cplusplus
extern "C" {
#endif
struct FileList;
struct direntry;
struct BlendHandle;
struct FileList * BIF_filelist_new();
void BIF_filelist_init_icons();
void BIF_filelist_free_icons();
struct FileList * BIF_filelist_copy(struct FileList* filelist);
int BIF_filelist_find(struct FileList* filelist, char *file);
void BIF_filelist_free(struct FileList* filelist);
void BIF_filelist_freelib(struct FileList* filelist);
void BIF_filelist_sort(struct FileList* filelist, short sort);
int BIF_filelist_numfiles(struct FileList* filelist);
const char * BIF_filelist_dir(struct FileList* filelist);
void BIF_filelist_setdir(struct FileList* filelist, const char *dir);
struct direntry * BIF_filelist_file(struct FileList* filelist, int index);
void BIF_filelist_hidedot(struct FileList* filelist, short hide);
void BIF_filelist_setfilter(struct FileList* filelist, unsigned int filter);
void BIF_filelist_filter(struct FileList* filelist);
void BIF_filelist_swapselect(struct FileList* filelist);
void BIF_filelist_imgsize(struct FileList* filelist, short w, short h);
void BIF_filelist_loadimage(struct FileList* filelist, int index);
struct ImBuf * BIF_filelist_getimage(struct FileList* filelist, int index);
void BIF_filelist_readdir(struct FileList* filelist);
int BIF_filelist_empty(struct FileList* filelist);
void BIF_filelist_parent(struct FileList* filelist);
void BIF_filelist_setfiletypes(struct FileList* filelist, short has_quicktime);
int BIF_filelist_islibrary (struct FileList* filelist, char* dir, char* group);
void BIF_filelist_from_main(struct FileList* filelist);
void BIF_filelist_from_library(struct FileList* filelist);
void BIF_filelist_append_library(struct FileList* filelist, char *dir, char* file, short flag, int idcode);
void BIF_filelist_settype(struct FileList* filelist, int type);
short BIF_filelist_gettype(struct FileList* filelist);
void BIF_filelist_setipotype(struct FileList* filelist, short ipotype);
void BIF_filelist_hasfunc(struct FileList* filelist, int has_func);
struct BlendHandle *BIF_filelist_lib(struct FileList* filelist);
int BIF_groupname_to_code(char *group); /* TODO: where should this go */
#ifdef __cplusplus
}
#endif
#endif

View File

@@ -0,0 +1,76 @@
/**
* $Id: BIF_fsmenu.h 11920 2007-09-02 17:25:03Z elubie $
*
* ***** BEGIN GPL/BL DUAL LICENSE BLOCK *****
*
* 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
* of the License, or (at your option) any later version. The Blender
* Foundation also sells licenses for use in proprietary software under
* the Blender License. See http://www.blender.org/BL/ for information
* about this.
*
* 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.
*
* ***** END GPL/BL DUAL LICENSE BLOCK *****
*
*/
#ifndef BSE_FSMENU_H
#define BSE_FSMENU_H
/** Returns the number of entries in the Fileselect Menu */
int fsmenu_get_nentries (void);
/** Returns true if the fsmenu entry at @a index exists and
* is a seperator.
*/
int fsmenu_is_entry_a_seperator (int index);
/** Returns the fsmenu entry at @a index (or NULL if a bad index)
* or a seperator.
*/
char* fsmenu_get_entry (int index);
/** Returns a new menu description string representing the
* fileselect menu. Should be free'd with MEM_freeN.
*/
char* fsmenu_build_menu (void);
/** Append a seperator to the FSMenu, inserts always follow the
* last seperator.
*/
void fsmenu_append_separator (void);
/** Inserts a new fsmenu entry with the given @a path.
* Duplicate entries are not added.
* @param sorted Should entry be inserted in sorted order?
*/
void fsmenu_insert_entry (char *path, int sorted, short save);
/** Removes the fsmenu entry at the given @a index. */
void fsmenu_remove_entry (int index);
/** saves the 'favourites' to the specified file */
void fsmenu_write_file(const char *filename);
/** Free's all the memory associated with the fsmenu */
void fsmenu_free (void);
#endif

View File

@@ -0,0 +1,82 @@
/**
* $Id: BIF_gl.h 10455 2007-04-04 13:18:41Z campbellbarton $
*
* ***** BEGIN GPL/BL DUAL LICENSE BLOCK *****
*
* 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
* of the License, or (at your option) any later version. The Blender
* Foundation also sells licenses for use in proprietary software under
* the Blender License. See http://www.blender.org/BL/ for information
* about this.
*
* 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.
*
* ***** END GPL/BL DUAL LICENSE BLOCK *****
* os dependent include locations of gl.h
*/
#ifndef BIF_GL_H
#define BIF_GL_H
/* Although not really a great idea to copy these defines
* from Windows' winnt.h, this lets us use GL without including
* windows.h everywhere (or BLI_winstuff.h) which is a good thing.
*/
#ifdef WIN32
#ifndef APIENTRY
#define APIENTRY __stdcall
#endif
#ifndef CALLBACK
#define CALLBACK __stdcall
#endif
#ifndef WINGDIAPI
#define WINGDIAPI __declspec(dllimport)
#endif
#endif
#ifdef __APPLE__
#include <OpenGL/gl.h>
#include <OpenGL/glu.h>
#else
#include <GL/gl.h>
#include <GL/glu.h>
#endif
/*
* these should be phased out. cpack should be replaced in
* code with calls to glColor3ub, lrectwrite probably should
* change to a function. - zr
*/
/*
*
* This define converts a numerical value to the equivalent 24-bit
* color, while not being endian-sensitive. On little-endians, this
* is the same as doing a 'naive'indexing, on big-endian, it is not!
* */
#define cpack(x) glColor3ub( ((x)&0xFF), (((x)>>8)&0xFF), (((x)>>16)&0xFF) )
#define glMultMatrixf(x) glMultMatrixf( (float *)(x))
#define glLoadMatrixf(x) glLoadMatrixf( (float *)(x))
#define lrectwrite(a, b, c, d, rect) {glRasterPos2i(a, b);glDrawPixels((c)-(a)+1, (d)-(b)+1, GL_RGBA, GL_UNSIGNED_BYTE, rect);}
#endif /* #ifdef BIF_GL_H */

View File

@@ -0,0 +1,225 @@
/**
* @file BIF_glutil.h
*
* OpenGL drawing utility functions.
*
* $Id: BIF_glutil.h 10207 2007-03-06 03:39:15Z halley $
*
* ***** BEGIN GPL/BL DUAL LICENSE BLOCK *****
*
* 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
* of the License, or (at your option) any later version. The Blender
* Foundation also sells licenses for use in proprietary software under
* the Blender License. See http://www.blender.org/BL/ for information
* about this.
*
* 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.
*
* ***** END GPL/BL DUAL LICENSE BLOCK *****
*/
#ifndef BIF_GLUTIL_H
#define BIF_GLUTIL_H
struct rcti;
struct rctf;
void sdrawXORline(int x0, int y0, int x1, int y1);
void sdrawXORline4(int nr, int x0, int y0, int x1, int y1);
void fdrawXORellipse(float xofs, float yofs, float hw, float hh);
void fdrawXORcirc(float xofs, float yofs, float rad);
/**
* Draw an XOR'd line in the front buffer between
* the given points.
*
* @attention This function also handles flushing the GL
* pipeline, which means it is inappropriate for drawing
* a large number of lines at once.
*/
void glutil_draw_front_xor_line(int x0, int y0, int x1, int y1);
/**
* Draw a lined (non-looping) arc with the given
* @a radius, starting at angle @a start and arcing
* through @a angle. The arc is centered at the origin
* and drawn in the XY plane.
*
* @param start The initial angle (in radians).
* @param angle The length of the arc (in radians).
* @param radius The arc radius.
* @param nsegments The number of segments to use in drawing the arc.
*/
void glutil_draw_lined_arc (float start, float angle, float radius, int nsegments);
/**
* Draw a filled arc with the given @a radius,
* starting at angle @a start and arcing through
* @a angle. The arc is centered at the origin
* and drawn in the XY plane.
*
* @param start The initial angle (in radians).
* @param angle The length of the arc (in radians).
* @param radius The arc radius.
* @param nsegments The number of segments to use in drawing the arc.
*/
void glutil_draw_filled_arc (float start, float angle, float radius, int nsegments);
/**
* Routines an integer value as obtained by glGetIntegerv.
* The param must cause only one value to be gotten from GL.
*/
int glaGetOneInteger (int param);
/**
* Routines a float value as obtained by glGetIntegerv.
* The param must cause only one value to be gotten from GL.
*/
float glaGetOneFloat (int param);
/**
* Functions like glRasterPos2i, except ensures that the resulting
* raster position is valid. @a known_good_x and @a known_good_y
* should be coordinates of a point known to be within the current
* view frustum.
* @attention This routine should be used when the distance of @a x
* and @y away from the known good point is small (ie. for small icons
* and for bitmap characters), when drawing large+zoomed images it is
* possible for overflow to occur, the glaDrawPixelsSafe routine should
* be used instead.
*/
void glaRasterPosSafe2f (float x, float y, float known_good_x, float known_good_y);
/**
* Functions like a limited glDrawPixels, except ensures that
* the image is displayed onscreen even if the @a x and @a y
* coordinates for would be clipped. The routine respects the
* glPixelZoom values, pixel unpacking parameters are _not_
* respected.
* @attention This routine makes many assumptions: the rect data
* is expected to be in RGBA unsigned byte format, the coordinate
* (0.375, 0.375) is assumed to be within the view frustum, and the
* modelview and projection matrices are assumed to define a
* 1-to-1 mapping to screen space.
* @attention Furthmore, in the case of zoomed or unpixel aligned
* images extending outside the view frustum, but still within the
* window, some portion of the image may be visible left and/or
* below of the given @a x and @a y coordinates. It is recommended
* to use the glScissor functionality if images are to be drawn
* with an inset view matrix.
*/
void glaDrawPixelsSafe (float x, float y, int img_w, int img_h, int row_w, int format, int type, void *rect);
/**
* Functions like a limited glDrawPixels, but actually draws the
* image using textures, which can be tremendously faster on low-end
* cards, and also avoids problems with the raster position being
* clipped when offscreen. The routine respects the glPixelZoom values,
* pixel unpacking parameters are _not_ respected.
* @attention This routine makes many assumptions: the rect data
* is expected to be in RGBA byte or float format, and the
* modelview and projection matrices are assumed to define a
* 1-to-1 mapping to screen space.
*/
/* only for float rects, converts to 32 bits and draws */
void glaDrawPixelsSafe_to32(float fx, float fy, int img_w, int img_h, int row_w, float *rectf);
void glaDrawPixelsTex (float x, float y, int img_w, int img_h, int format, void *rect);
/* 2D Drawing Assistance */
/** Define a 2D area (viewport, scissor, matrices) for OpenGL rendering.
* This routine sets up an OpenGL state appropriate for drawing using
* both vertice (glVertex, etc) and raster (glRasterPos, glRect) commands.
* All coordinates should be at integer positions. There is little to
* no reason to use glVertex2f etc. functions during 2D rendering, and
* thus no reason to +-0.5 the coordinates or perform other silly
* tricks.
*
* @param screen_rect The screen rectangle to be defined for 2D drawing.
*/
void glaDefine2DArea (struct rcti *screen_rect);
typedef struct gla2DDrawInfo gla2DDrawInfo;
/** Save the current OpenGL state and initialize OpenGL for 2D
* rendering. glaEnd2DDraw should be called on the returned structure
* to free it and to return OpenGL to its previous state. The
* scissor rectangle is set to match the viewport.
*
* This routine sets up an OpenGL state appropriate for drawing using
* both vertice (glVertex, etc) and raster (glRasterPos, glRect) commands.
* All coordinates should be at integer positions. There is little to
* no reason to use glVertex2f etc. functions during 2D rendering, and
* thus no reason to +-0.5 the coordinates or perform other silly
* tricks.
*
* @param screen_rect The screen rectangle to be used for 2D drawing.
* @param world_rect The world rectangle that the 2D area represented
* by @a screen_rect is supposed to represent. If NULL it is assumed the
* world has a 1 to 1 mapping to the screen.
*/
gla2DDrawInfo* glaBegin2DDraw (struct rcti *screen_rect, struct rctf *world_rect);
/** Translate the (@a wo_x, @a wo_y) point from world coordinates into screen space. */
void gla2DDrawTranslatePt (gla2DDrawInfo *di, float wo_x, float wo_y, int *sc_x_r, int *sc_y_r);
/** Translate the @a world point from world coordiantes into screen space. */
void gla2DDrawTranslatePtv (gla2DDrawInfo *di, float world[2], int screen_r[2]);
/* Restores the previous OpenGL state and free's the auxilary
* gla data.
*/
void glaEnd2DDraw (gla2DDrawInfo *di);
/** Adjust the transformation mapping of a 2d area */
void gla2DGetMap(gla2DDrawInfo *di, struct rctf *rect);
void gla2DSetMap(gla2DDrawInfo *di, struct rctf *rect);
/* use this for platform hacks. glPointSize is solved here */
void bglBegin(int mode);
void bglEnd(void);
void bglVertex3fv(float *vec);
void bglVertex3f(float x, float y, float z);
void bglVertex2fv(float *vec);
/* intel gfx cards frontbuffer problem */
void bglFlush(void);
int is_a_really_crappy_intel_card(void);
void set_inverted_drawing(int enable);
/* own working polygon offset */
void bglPolygonOffset(float dist);
/* For caching opengl matrices (gluProject/gluUnProject) */
typedef struct bglMats {
double modelview[16];
double projection[16];
int viewport[4];
} bglMats;
void bgl_get_mats(bglMats *mats);
#endif /* BIF_GLUTIL_H */

View File

@@ -1,5 +1,5 @@
/*
* $Id: Text.h 10136 2007-02-25 01:07:28Z campbellbarton $
/**
* $Id: BIF_graphics.h 6596 2006-01-29 22:25:53Z broken $
*
* ***** BEGIN GPL/BL DUAL LICENSE BLOCK *****
*
@@ -23,30 +23,37 @@
* The Original Code is Copyright (C) 2001-2002 by NaN Holding BV.
* All rights reserved.
*
* This is a new part of Blender.
* The Original Code is: all of this file.
*
* Contributor(s): Willian P. Germano
* Contributor(s): none yet.
*
* ***** END GPL/BL DUAL LICENSE BLOCK *****
*/
*/
#ifndef EXPP_TEXT_H
#define EXPP_TEXT_H
#ifndef BIF_GRAPHICS_H
#define BIF_GRAPHICS_H
#include <Python.h>
#include "DNA_text_types.h"
/* XXX, should move somewhere else, with collected windowing
* stuff, to be done once the proper windowing stuff has
* been formed.
*/
enum {
CURSOR_VPAINT,
CURSOR_FACESEL,
CURSOR_WAIT,
CURSOR_EDIT,
CURSOR_X_MOVE,
CURSOR_Y_MOVE,
CURSOR_HELP,
CURSOR_STD,
CURSOR_NONE,
CURSOR_PENCIL,
CURSOR_TEXTEDIT
};
extern PyTypeObject Text_Type;
void set_cursor(int curs);
int get_cursor(void);
/* Type checking for EXPP PyTypes */
#define BPy_Text_Check(v) ((v)->ob_type == &Text_Type)
#endif /* BIF_GRAPHICS_H */
typedef struct {
PyObject_HEAD
Text * text; /* libdata must be second */
} BPy_Text;
PyObject *Text_Init( void );
PyObject *Text_CreatePyObject( Text * txt );
#endif /* EXPP_TEXT_H */

View File

@@ -0,0 +1,51 @@
/**
* $Id: BIF_imasel.h 11920 2007-09-02 17:25:03Z elubie $
*
* ***** BEGIN GPL/BL DUAL LICENSE BLOCK *****
*
* 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
* of the License, or (at your option) any later version. The Blender
* Foundation also sells licenses for use in proprietary software under
* the Blender License. See http://www.blender.org/BL/ for information
* about this.
*
* 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.
*
* ***** END GPL/BL DUAL LICENSE BLOCK *****
*/
#ifndef BIF_IMASEL_H
#define BIF_IMASEL_H
struct SpaceImaSel;
struct ScrArea;
void free_imasel(struct SpaceImaSel *simasel);
void clever_numbuts_imasel(void);
void activate_imageselect(int type, char *title, char *file, void (*func)(char *));
void activate_imageselect_menu(int type, char *title, char *file, char *pupmenu, short *menup, void (*func)(char *));
void activate_imageselect_args(int type, char *title, char *file, void (*func)(char *, void *, void *), void *arg1, void *arg2);
void activate_databrowse_imasel(struct ID *id, int idcode, int fromcode, int retval, short *menup, void (*func)(unsigned short));
/*
void activate_databrowse_imasel_args(struct ID *id, int idcode, int fromcode, short *menup, void (*func)(char *, void *, void *), void *arg1, void *arg2);
*/
#endif

View File

@@ -0,0 +1,331 @@
/**
* $Id: BIF_interface.h 11429 2007-07-30 15:59:16Z pidhash $
*
* ***** BEGIN GPL/BL DUAL LICENSE BLOCK *****
*
* 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
* of the License, or (at your option) any later version. The Blender
* Foundation also sells licenses for use in proprietary software under
* the Blender License. See http://www.blender.org/BL/ for information
* about this.
*
* 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.
*
* ***** END GPL/BL DUAL LICENSE BLOCK *****
*/
#ifndef BIF_INTERFACE_H
#define BIF_INTERFACE_H
struct ID;
struct ListBase;
struct ScrArea;
struct AutoComplete;
/* uiBlock->dt */
#define UI_EMBOSS 0 /* use one of the themes for drawing */
#define UI_EMBOSSN 1 /* Nothing */
#define UI_EMBOSSM 2 /* Minimal builtin emboss, also for logic buttons */
#define UI_EMBOSSP 3 /* Pulldown */
#define UI_EMBOSSR 4 /* Rounded */
#define UI_EMBOSSX 0 /* for a python file, which i can't change.... duh! */
/* uiBlock->direction */
#define UI_TOP 1
#define UI_DOWN 2
#define UI_LEFT 4
#define UI_RIGHT 8
#define UI_DIRECTION 15
#define UI_CENTER 16
#define UI_SHIFT_FLIPPED 32
/* uiBlock->autofill */
#define UI_BLOCK_COLLUMNS 1
#define UI_BLOCK_ROWS 2
/* return from uiDoBlock */
#define UI_CONT 0
#define UI_NOTHING 1
#define UI_RETURN_CANCEL 2
#define UI_RETURN_OK 4
#define UI_RETURN_OUT 8
#define UI_RETURN 14
#define UI_EXIT_LOOP 16
/* uiBlock->flag (controls) */
#define UI_BLOCK_LOOP 1
#define UI_BLOCK_REDRAW 2
#define UI_BLOCK_RET_1 4
#define UI_BLOCK_BUSY 8
#define UI_BLOCK_NUMSELECT 16
#define UI_BLOCK_ENTER_OK 32
#define UI_BLOCK_NOSHADOW 64
#define UI_BLOCK_FRONTBUFFER 128
#define UI_BLOCK_NO_HILITE 256
/* block->flag bits 12-15 are identical to but->flag bits */
/* block->font, for now: bold = medium+1 */
#define UI_HELV 0
#define UI_HELVB 1
/* panel controls */
#define UI_PNL_TRANSP 1
#define UI_PNL_SOLID 2
#define UI_PNL_CLOSE 32
#define UI_PNL_STOW 64
#define UI_PNL_TO_MOUSE 128
#define UI_PNL_UNSTOW 256
#define UI_PNL_SCALE 512
/* warning the first 4 flags are internal */
/* but->flag */
#define UI_TEXT_LEFT 16
#define UI_ICON_LEFT 32
#define UI_ICON_RIGHT 64
/* control for button type block */
#define UI_MAKE_TOP 128
#define UI_MAKE_DOWN 256
#define UI_MAKE_LEFT 512
#define UI_MAKE_RIGHT 1024
/* dont draw hilite on mouse over */
#define UI_NO_HILITE 2048
/* button align flag, for drawing groups together */
#define UI_BUT_ALIGN (15<<12)
#define UI_BUT_ALIGN_TOP (1<<12)
#define UI_BUT_ALIGN_LEFT (1<<13)
#define UI_BUT_ALIGN_RIGHT (1<<14)
#define UI_BUT_ALIGN_DOWN (1<<15)
/* Button types, bits stored in 1 value... and a short even!
- bits 0-4: bitnr (0-31)
- bits 5-7: pointer type
- bit 8: for 'bit'
- bit 9-15: button type (now 6 bits, 64 types)
*/
#define CHA 32
#define SHO 64
#define INT 96
#define FLO 128
#define FUN 192
#define BIT 256
#define BUTPOIN (128+64+32)
#define BUT (1<<9)
#define ROW (2<<9)
#define TOG (3<<9)
#define SLI (4<<9)
#define NUM (5<<9)
#define TEX (6<<9)
#define TOG3 (7<<9)
#define TOGR (8<<9)
#define TOGN (9<<9)
#define LABEL (10<<9)
#define MENU (11<<9)
#define ICONROW (12<<9)
#define ICONTOG (13<<9)
#define NUMSLI (14<<9)
#define COL (15<<9)
#define IDPOIN (16<<9)
#define HSVSLI (17<<9)
#define SCROLL (18<<9)
#define BLOCK (19<<9)
#define BUTM (20<<9)
#define SEPR (21<<9)
#define LINK (22<<9)
#define INLINK (23<<9)
#define KEYEVT (24<<9)
#define ICONTEXTROW (25<<9)
#define HSVCUBE (26<<9)
#define PULLDOWN (27<<9)
#define ROUNDBOX (28<<9)
#define CHARTAB (29<<9)
#define BUT_COLORBAND (30<<9)
#define BUT_NORMAL (31<<9)
#define BUT_CURVE (32<<9)
#define BUT_TOGDUAL (33<<9)
#define ICONTOGN (34<<9)
#define FTPREVIEW (35<<9)
#define BUTTYPE (63<<9)
typedef struct uiBut uiBut;
typedef struct uiBlock uiBlock;
void uiEmboss(float x1, float y1, float x2, float y2, int sel);
void uiRoundBoxEmboss(float minx, float miny, float maxx, float maxy, float rad, int active);
void uiRoundBox(float minx, float miny, float maxx, float maxy, float rad);
void uiSetRoundBox(int type);
void uiRoundRect(float minx, float miny, float maxx, float maxy, float rad);
void uiDrawMenuBox(float minx, float miny, float maxx, float maxy, short flag);
void uiTextBoundsBlock(uiBlock *block, int addval);
void uiBoundsBlock(struct uiBlock *block, int addval);
void uiDrawBlock(struct uiBlock *block);
void uiGetMouse(int win, short *adr);
void uiComposeLinks(uiBlock *block);
void uiSetButLock(int val, char *lockstr);
void uiClearButLock(void);
int uiDoBlocks(struct ListBase *lb, int event);
void uiSetCurFont(uiBlock *block, int index);
void uiDefFont(unsigned int index, void *xl, void *large, void *medium, void *small);
void uiFreeBlock(uiBlock *block);
void uiFreeBlocks(struct ListBase *lb);
void uiFreeBlocksWin(struct ListBase *lb, int win);
uiBlock *uiNewBlock(struct ListBase *lb, char *name, short dt, short font, short win);
uiBlock *uiGetBlock(char *name, struct ScrArea *sa);
void uiBlockPickerButtons(struct uiBlock *block, float *col, float *hsv, float *old, char *hexcol, char mode, short retval);
/* automatic aligning, horiz or verical */
void uiBlockBeginAlign(uiBlock *block);
void uiBlockEndAlign(uiBlock *block);
uiBut *uiDefBut(uiBlock *block,
int type, int retval, char *str,
short x1, short y1,
short x2, short y2,
void *poin,
float min, float max,
float a1, float a2, char *tip);
uiBut *uiDefButF(uiBlock *block, int type, int retval, char *str, short x1, short y1, short x2, short y2, float *poin, float min, float max, float a1, float a2, char *tip);
uiBut *uiDefButBitF(uiBlock *block, int type, int bit, int retval, char *str, short x1, short y1, short x2, short y2, float *poin, float min, float max, float a1, float a2, char *tip);
uiBut *uiDefButI(uiBlock *block, int type, int retval, char *str, short x1, short y1, short x2, short y2, int *poin, float min, float max, float a1, float a2, char *tip);
uiBut *uiDefButBitI(uiBlock *block, int type, int bit, int retval, char *str, short x1, short y1, short x2, short y2, int *poin, float min, float max, float a1, float a2, char *tip);
uiBut *uiDefButS(uiBlock *block, int type, int retval, char *str, short x1, short y1, short x2, short y2, short *poin, float min, float max, float a1, float a2, char *tip);
uiBut *uiDefButBitS(uiBlock *block, int type, int bit, int retval, char *str, short x1, short y1, short x2, short y2, short *poin, float min, float max, float a1, float a2, char *tip);
uiBut *uiDefButC(uiBlock *block, int type, int retval, char *str, short x1, short y1, short x2, short y2, char *poin, float min, float max, float a1, float a2, char *tip);
uiBut *uiDefButBitC(uiBlock *block, int type, int bit, int retval, char *str, short x1, short y1, short x2, short y2, char *poin, float min, float max, float a1, float a2, char *tip);
uiBut *uiDefIconBut(uiBlock *block,
int type, int retval, int icon,
short x1, short y1,
short x2, short y2,
void *poin,
float min, float max,
float a1, float a2, char *tip);
uiBut *uiDefIconButF(uiBlock *block, int type, int retval, int icon, short x1, short y1, short x2, short y2, float *poin, float min, float max, float a1, float a2, char *tip);
uiBut *uiDefIconButBitF(uiBlock *block, int type, int bit, int retval, int icon, short x1, short y1, short x2, short y2, float *poin, float min, float max, float a1, float a2, char *tip);
uiBut *uiDefIconButI(uiBlock *block, int type, int retval, int icon, short x1, short y1, short x2, short y2, int *poin, float min, float max, float a1, float a2, char *tip);
uiBut *uiDefIconButBitI(uiBlock *block, int type, int bit, int retval, int icon, short x1, short y1, short x2, short y2, int *poin, float min, float max, float a1, float a2, char *tip);
uiBut *uiDefIconButS(uiBlock *block, int type, int retval, int icon, short x1, short y1, short x2, short y2, short *poin, float min, float max, float a1, float a2, char *tip);
uiBut *uiDefIconButBitS(uiBlock *block, int type, int bit, int retval, int icon, short x1, short y1, short x2, short y2, short *poin, float min, float max, float a1, float a2, char *tip);
uiBut *uiDefIconButC(uiBlock *block, int type, int retval, int icon, short x1, short y1, short x2, short y2, char *poin, float min, float max, float a1, float a2, char *tip);
uiBut *uiDefIconButBitC(uiBlock *block, int type, int bit, int retval, int icon, short x1, short y1, short x2, short y2, char *poin, float min, float max, float a1, float a2, char *tip);
uiBut *uiDefIconTextBut(uiBlock *block, int type, int retval, int icon, char *str, short x1, short y1, short x2, short y2, void *poin, float min, float max, float a1, float a2, char *tip);
uiBut *uiDefIconTextButF(uiBlock *block, int type, int retval, int icon, char *str, short x1, short y1, short x2, short y2, float *poin, float min, float max, float a1, float a2, char *tip);
uiBut *uiDefIconTextButBitF(uiBlock *block, int type, int bit, int retval, int icon, char *str, short x1, short y1, short x2, short y2, float *poin, float min, float max, float a1, float a2, char *tip);
uiBut *uiDefIconTextButI(uiBlock *block, int type, int retval, int icon, char *str, short x1, short y1, short x2, short y2, int *poin, float min, float max, float a1, float a2, char *tip);
uiBut *uiDefIconTextButBitI(uiBlock *block, int type, int bit, int retval, int icon, char *str, short x1, short y1, short x2, short y2, int *poin, float min, float max, float a1, float a2, char *tip);
uiBut *uiDefIconTextButS(uiBlock *block, int type, int retval, int icon, char *str, short x1, short y1, short x2, short y2, short *poin, float min, float max, float a1, float a2, char *tip);
uiBut *uiDefIconTextButBitS(uiBlock *block, int type, int bit, int retval, int icon, char *str, short x1, short y1, short x2, short y2, short *poin, float min, float max, float a1, float a2, char *tip);
uiBut *uiDefIconTextButC(uiBlock *block, int type, int retval, int icon, char *str, short x1, short y1, short x2, short y2, char *poin, float min, float max, float a1, float a2, char *tip);
uiBut *uiDefIconTextButBitC(uiBlock *block, int type, int bit, int retval, int icon, char *str, short x1, short y1, short x2, short y2, char *poin, float min, float max, float a1, float a2, char *tip);
typedef void (*uiIDPoinFuncFP) (char *str, struct ID **idpp);
uiBut *uiDefIDPoinBut(struct uiBlock *block, uiIDPoinFuncFP func, short blocktype, int retval, char *str,
short x1, short y1, short x2, short y2, void *idpp, char *tip);
typedef uiBlock* (*uiBlockFuncFP) (void *arg1);
uiBut *uiDefBlockBut(uiBlock *block, uiBlockFuncFP func, void *func_arg1, char *str, short x1, short y1, short x2, short y2, char *tip);
uiBut *uiDefPulldownBut(uiBlock *block, uiBlockFuncFP func, void *func_arg1, char *str, short x1, short y1, short x2, short y2, char *tip);
uiBut *uiDefIconTextBlockBut(uiBlock *block, uiBlockFuncFP func, void *arg, int icon, char *str, short x1, short y1, short x2, short y2, char *tip);
uiBut *uiDefIconBlockBut(uiBlock *block, uiBlockFuncFP func, void *arg, int retval, int icon, short x1, short y1, short x2, short y2, char *tip);
void uiDefKeyevtButS(uiBlock *block, int retval, char *str, short x1, short y1, short x2, short y2, short *spoin, char *tip);
void uiAutoBlock(struct uiBlock *block,
float minx, float miny,
float sizex, float sizey, int flag);
void uiSetButLink(struct uiBut *but,
void **poin,
void ***ppoin,
short *tot,
int from, int to);
int uiBlocksGetYMin (ListBase *lb);
int uiBlockGetCol (uiBlock *block);
void* uiBlockGetCurFont (uiBlock *block);
void uiBlockSetCol (uiBlock *block, int col);
void uiBlockSetEmboss (uiBlock *block, int emboss);
void uiBlockSetDirection (uiBlock *block, int direction);
void uiBlockFlipOrder (uiBlock *block);
void uiBlockSetFlag (uiBlock *block, int flag);
void uiBlockSetXOfs (uiBlock *block, int xofs);
int uiButGetRetVal (uiBut *but);
void uiButSetFlag (uiBut *but, int flag);
void uiButClearFlag (uiBut *but, int flag);
void uiBlockSetButmFunc (uiBlock *block, void (*butmfunc)(void *arg, int but_a2), void *arg);
void uiBlockSetFunc (uiBlock *block, void (*func)(void *arg1, void *arg2), void *arg1, void *arg2);
void uiButSetFunc (uiBut *but, void (*func)(void *arg1, void *arg2), void *arg1, void *arg2);
void uiButSetCompleteFunc(uiBut *but, void (*func)(char *str, void *arg), void *arg);
void uiBlockSetDrawExtraFunc(uiBlock *block, void (*func)(struct ScrArea *sa, uiBlock *block));
extern void pupmenu_set_active(int val);
extern short pupmenu(char *instr);
extern short pupmenu_col(char *instr, int maxrow);
extern void uiFreePanels(struct ListBase *lb);
extern void uiNewPanelTabbed(char *, char *);
extern int uiNewPanel(struct ScrArea *sa, struct uiBlock *block, char *panelname, char *tabname, int ofsx, int ofsy, int sizex, int sizey);
extern void uiSetPanel_view2d(struct ScrArea *sa);
extern void uiMatchPanel_view2d(struct ScrArea *sa);
extern void uiDrawBlocksPanels(struct ScrArea *sa, int re_align);
extern void uiNewPanelHeight(struct uiBlock *block, int sizey);
extern void uiNewPanelTitle(struct uiBlock *block, char *str);
extern void uiPanelPush(struct uiBlock *block);
extern void uiPanelPop(struct uiBlock *block);
extern uiBlock *uiFindOpenPanelBlockName(ListBase *lb, char *name);
extern int uiAlignPanelStep(struct ScrArea *sa, float fac);
extern void uiPanelControl(int);
extern void uiSetPanelHandler(int);
extern void uiDrawBoxShadow(unsigned char alpha, float minx, float miny, float maxx, float maxy);
extern void *uiSetCurFont_ext(float aspect);
void shade_buttons_change_3d(void);
typedef struct AutoComplete AutoComplete;
AutoComplete *autocomplete_begin(char *startname, int maxlen);
void autocomplete_do_name(AutoComplete *autocpl, const char *name);
void autocomplete_end(AutoComplete *autocpl, char *autoname);
#endif /* BIF_INTERFACE_H */

View File

@@ -0,0 +1,72 @@
/**
* $Id: BIF_interface_icons.h 11920 2007-09-02 17:25:03Z elubie $
*
* ***** BEGIN GPL/BL DUAL LICENSE BLOCK *****
*
* 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
* of the License, or (at your option) any later version. The Blender
* Foundation also sells licenses for use in proprietary software under
* the Blender License. See http://www.blender.org/BL/ for information
* about this.
*
* 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.
*
* ***** END GPL/BL DUAL LICENSE BLOCK *****
*/
#ifndef BIF_PREVIEW_ICONS_H
#define BIF_PREVIEW_ICONS_H
struct Image;
struct ImBuf;
struct World;
struct Tex;
struct Lamp;
struct Material;
typedef struct IconFile {
struct IconFile *next, *prev;
char filename[80]; // FILE_MAXFILE size
int index;
} IconFile;
#define ICON_DEFAULT_HEIGHT 16
#define PREVIEW_DEFAULT_HEIGHT 96
/*
Resizable Icons for Blender
*/
void BIF_icons_init(int first_dyn_id);
int BIF_icon_get_width(int icon_id);
int BIF_icon_get_height(int icon_id);
void BIF_icon_draw(float x, float y, int icon_id);
void BIF_icon_draw_preview(float x, float y, int icon_id, int nocreate);
void BIF_icon_draw_aspect(float x, float y, int icon_id, float aspect);
void BIF_icon_draw_aspect_blended(float x, float y, int icon_id, float aspect, int shade);
void BIF_icons_free();
void BIF_icons_free_drawinfo(void *drawinfo);
struct ListBase *BIF_iconfile_list(void);
int BIF_iconfile_get_index(char *filename);
#endif /* BIF_ICONS_H */

View File

@@ -1,5 +1,5 @@
/*
* $Id:*
/**
* $Id: BIF_keyval.h 229 2002-12-27 13:11:01Z mein $
*
* ***** BEGIN GPL/BL DUAL LICENSE BLOCK *****
*
@@ -23,21 +23,17 @@
* The Original Code is Copyright (C) 2001-2002 by NaN Holding BV.
* All rights reserved.
*
* This is a new part of Blender.
* The Original Code is: all of this file.
*
* Contributor(s): Willian P. Germano
* Contributor(s): none yet.
*
* ***** END GPL/BL DUAL LICENSE BLOCK *****
*/
*/
/* This file is useless now, CAN BE REMOVED. */
#ifndef BIF_KEYVAL_H
#define BIF_KEYVAL_H
#ifndef EXPP_WINDOW_H
#define EXPP_WINDOW_H
char *key_event_to_string(unsigned short event);
#include <Python.h>
#endif
PyObject *Window_Init( void );
PyObject *M_Window_Redraw( PyObject * self, PyObject * args );
#endif /* EXPP_WINDOW_H */

View File

@@ -1,4 +1,5 @@
/* $Id: vector.h 10313 2007-03-20 12:07:02Z campbellbarton $
/**
* $Id: BIF_language.h 11725 2007-08-20 01:02:12Z broken $
*
* ***** BEGIN GPL/BL DUAL LICENSE BLOCK *****
*
@@ -24,38 +25,45 @@
*
* The Original Code is: all of this file.
*
* Contributor(s): Willian P. Germano & Joseph Gilbert
* Contributor(s): none yet.
*
* ***** END GPL/BL DUAL LICENSE BLOCK *****
*
*/
#ifndef EXPP_vector_h
#define EXPP_vector_h
#ifndef BIF_LANGUAGE_H
#define BIF_LANGUAGE_H
#include <Python.h>
#include "DNA_vec_types.h"
extern PyTypeObject vector_Type;
struct BMF_Font;
#define VectorObject_Check(v) ((v)->ob_type == &vector_Type)
int read_languagefile(void); /* usiblender.c */
void free_languagemenu(void); /* usiblender.c */
typedef struct {
PyObject_VAR_HEAD
float *vec; /*1D array of data (alias), wrapped status depends on wrapped status */
short size; /* vec size 2,3 or 4 */
short wrapped; /* is wrapped data? */
} VectorObject;
void set_interface_font(char *str); /* headerbuttons.c */
void start_interface_font(void); /* headerbuttons.c */
void lang_setlanguage(void); /* usiblender.c */
/*prototypes*/
PyObject *Vector_Zero( VectorObject * self );
PyObject *Vector_Normalize( VectorObject * self );
PyObject *Vector_Negate( VectorObject * self );
PyObject *Vector_Resize2D( VectorObject * self );
PyObject *Vector_Resize3D( VectorObject * self );
PyObject *Vector_Resize4D( VectorObject * self );
PyObject *Vector_toPoint( VectorObject * self );
PyObject *Vector_ToTrackQuat( VectorObject * self, PyObject * args );
PyObject *Vector_copy( VectorObject * self );
PyObject *newVectorObject(float *vec, int size, int type);
char *language_pup(void);
char *fontsize_pup(void);
int BIF_DrawString(struct BMF_Font* font, char *str, int translate);
float BIF_GetStringWidth(struct BMF_Font* font, char *str, int translate);
void BIF_GetBoundingBox(struct BMF_Font* font, char* str, int translate, rctf* bbox);
void BIF_RasterPos(float x, float y);
void BIF_SetScale(float aspect);
void refresh_interface_font(void);
struct LANGMenuEntry {
struct LANGMenuEntry *next;
char *line;
char *language;
char *code;
int id;
};
struct LANGMenuEntry *find_language(short langid);
#endif /* BIF_LANGUAGE_H */
#endif /* EXPP_vector_h */

View File

@@ -0,0 +1,47 @@
/*
* Central queue handling functions.
*
* $Id: BIF_mainqueue.h 9981 2007-01-31 11:24:13Z artificer $
*
* ***** BEGIN GPL/BL DUAL LICENSE BLOCK *****
*
* 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
* of the License, or (at your option) any later version. The Blender
* Foundation also sells licenses for use in proprietary software under
* the Blender License. See http://www.blender.org/BL/ for information
* about this.
*
* 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.
*
* ***** END GPL/BL DUAL LICENSE BLOCK *****
*/
#ifndef BIF_MAINQUEUE_H
#define BIF_MAINQUEUE_H
#define MAXQUEUE 4096
unsigned short mainqtest (void);
unsigned short mainqread (short *val, char *ascii);
void mainqenter (unsigned short event, short val);
void mainqenter_ext (unsigned short event, short val, char ascii);
void mainqpushback (unsigned short event, short val, char ascii);
#endif /* BIF_MAINQUEUE_H */

View File

@@ -0,0 +1,87 @@
/**
* $Id$
*
* ***** BEGIN GPL/BL DUAL LICENSE BLOCK *****
*
* 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
* of the License, or (at your option) any later version. The Blender
* Foundation also sells licenses for use in proprietary software under
* the Blender License. See http://www.blender.org/BL/ for information
* about this.
*
* 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.
*
* ***** END GPL/BL DUAL LICENSE BLOCK *****
* BIF_meshlaplacian.h: Algorithms using the mesh laplacian.
*/
#ifndef BIF_MESHLAPLACIAN_H
#define BIF_MESHLAPLACIAN_H
//#define RIGID_DEFORM
struct Object;
struct Mesh;
struct bDeformGroup;
struct MeshDeformModifierData;
#ifdef RIGID_DEFORM
struct EditMesh;
#endif
/* Laplacian System */
struct LaplacianSystem;
typedef struct LaplacianSystem LaplacianSystem;
LaplacianSystem *laplacian_construct_begin(int totvert, int totface);
void laplacian_add_vertex(LaplacianSystem *sys, float *co, int pinned);
void laplacian_add_triangle(LaplacianSystem *sys, int v1, int v2, int v3);
void laplacian_construct_end(LaplacianSystem *sys);
void laplacian_delete(LaplacianSystem *sys);
void laplacian_begin_solve(LaplacianSystem *sys, int index);
void laplacian_add_right_hand_side(LaplacianSystem *sys, int v, float value);
int laplacian_system_solve(LaplacianSystem *sys);
float laplacian_system_get_solution(int v);
/* Heat Weighting */
void heat_bone_weighting(struct Object *ob, struct Mesh *me, float (*verts)[3],
int numbones, struct bDeformGroup **dgrouplist,
struct bDeformGroup **dgroupflip, float (*root)[3], float (*tip)[3],
int *selected);
#ifdef RIGID_DEFORM
/* As-Rigid-As-Possible Deformation */
void rigid_deform_begin(struct EditMesh *em);
void rigid_deform_iteration(void);
void rigid_deform_end(int cancel);
#endif
/* Harmonic Coordinates */
void harmonic_coordinates_bind(struct MeshDeformModifierData *mmd,
float (*vertexcos)[3], int totvert, float cagemat[][4]);
#endif

View File

@@ -1,5 +1,5 @@
/*
* $Id: Font.h 10269 2007-03-15 01:09:14Z campbellbarton $
/**
* $Id:
*
* ***** BEGIN GPL/BL DUAL LICENSE BLOCK *****
*
@@ -23,31 +23,29 @@
* The Original Code is Copyright (C) 2001-2002 by NaN Holding BV.
* All rights reserved.
*
* This is a new part of Blender.
* The Original Code is: all of this file.
*
* Contributor(s): Joilnen Leite
* Contributor(s): none yet.
*
* ***** END GPL/BL DUAL LICENSE BLOCK *****
*/
*/
#ifndef EXPP_FONT_H
#define EXPP_FONT_H
#ifndef BIF_MESHTOOLS_H
#define BIF_MESHTOOLS_H
#include <Python.h>
#include "DNA_vfont_types.h"
struct Object;
struct EditVert;
extern PyTypeObject Font_Type;
extern int join_mesh(void);
typedef struct {
PyObject_HEAD /* required py macro */
VFont * font; /* libdata must be second */
} BPy_Font;
extern void sort_faces(void);
extern void objects_bake_render_menu(void);
extern void objects_bake_render(short event);
/*------------------------------visible prototypes----------------------*/
PyObject *Font_CreatePyObject( struct VFont * font );
struct VFont *Font_FromPyObject( PyObject * py_obj );
PyObject *Font_Init( void );
extern long mesh_octree_table(struct Object *ob, float *co, char mode);
extern int mesh_get_x_mirror_vert(struct Object *ob, int index);
extern struct EditVert *editmesh_get_x_mirror_vert(struct Object *ob, float *co);
extern int *mesh_get_x_mirror_faces(struct Object *ob);
#endif

View File

@@ -0,0 +1,145 @@
/**
* $Id: BIF_mywindow.h 10466 2007-04-05 12:42:07Z broken $
*
* ***** BEGIN GPL/BL DUAL LICENSE BLOCK *****
*
* 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
* of the License, or (at your option) any later version. The Blender
* Foundation also sells licenses for use in proprietary software under
* the Blender License. See http://www.blender.org/BL/ for information
* about this.
*
* 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.
*
* ***** END GPL/BL DUAL LICENSE BLOCK *****
* These are the protos for mywindow.c -- an emulation of the
* (obsolete) IrisGL command set
*/
#ifndef BIF_MYWINDOW_H
#define BIF_MYWINDOW_H
struct rcti;
/*---*/
typedef struct BWinEvent {
unsigned short event;
short val;
char ascii;
} BWinEvent;
/*---*/
int mywinget(void);
void mywinclose(int winid);
void mywinposition(int winid,
int xmin, int xmax,
int ymin, int ymax);
/*---*/
/** Test if there are events available on a BWin queue.
*
* @param winid The ID of the window to query.
* @return True if there is an event available for _qread'ing.
*/
int bwin_qtest(int winid);
/** Read an event off of the BWin queue (if available).
*
* @param winid The ID of the window to read from.
* @param event_r A pointer to return the event in.
* @return True if an event was read and @a event_r filled.
*/
int bwin_qread(int winid, BWinEvent *event_r);
/** Add an event to the BWin queue.
*
* @param winid The ID of the window to add to.
* @param event A pointer to copy the event from.
*/
void bwin_qadd(int winid, BWinEvent *event);
/*---*/
void bwin_load_viewmatrix(int winid, float mat[][4]);
void bwin_load_winmatrix(int winid, float mat[][4]);
void bwin_get_viewmatrix(int winid, float mat[][4]);
void bwin_get_winmatrix(int winid, float mat[][4]);
void bwin_multmatrix(int winid, float mat[][4]);
void bwin_scalematrix(int winid, float x, float y, float z);
void bwin_ortho(int winid, float x1, float x2, float y1, float y2, float n, float f);
void bwin_ortho2(int win, float x1, float x2, float y1, float y2);
void bwin_frustum(int winid, float x1, float x2, float y1, float y2, float n, float f);
void bwin_getsize(int winid, int *x, int *y);
void bwin_getsuborigin(int winid, int *x, int *y);
void bwin_get_rect(int winid, struct rcti *rect_r);
void bwin_getsinglematrix(int winid, float mat[][4]);
void bwin_clear_viewmat(int winid);
int myswinopen(int parentid, int xmin, int xmax, int ymin, int ymax);
int myswinopen_allowed(void);
void myswapbuffers(void);
void mygetmatrix(float mat[][4]);
void mymultmatrix(float [][4]);
void myloadmatrix(float mat[][4]);
void mywinset(int wid);
void myortho(float x1, float x2, float y1, float y2, float n, float f);
void myortho2(float x1, float x2, float y1, float y2);
void mywindow(float x1, float x2, float y1, float y2, float n, float f);
void mygetsingmatrix(float (*)[4]);
void setlinestyle(int nr);
void BIF_wait_for_statechange(void);
#define L_MOUSE 1
#define M_MOUSE 2
#define R_MOUSE 4
short get_mbut(void);
short get_qual(void);
void getmouse(short *mval);
float get_pressure(void);
void get_tilt(float *xtilt, float *ytilt);
#define DEV_MOUSE 0
#define DEV_STYLUS 1
#define DEV_ERASER 2
short get_activedevice(void);
void warp_pointer(int x, int y);
int framebuffer_to_index(unsigned int col);
void set_framebuffer_index_color(int index);
int mywin_inmenu(void);
void mywin_getmenu_rect(int *x, int *y, int *sx, int *sy);
void my_put_frontbuffer_image(void);
void my_get_frontbuffer_image(int x, int y, int sx, int sy);
#endif

View File

@@ -0,0 +1,71 @@
/**
* $Id: BIF_oops.h 3919 2005-03-09 19:45:59Z lukep $
*
* ***** BEGIN GPL/BL DUAL LICENSE BLOCK *****
*
* 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
* of the License, or (at your option) any later version. The Blender
* Foundation also sells licenses for use in proprietary software under
* the Blender License. See http://www.blender.org/BL/ for information
* about this.
*
* 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.
*
* ***** END GPL/BL DUAL LICENSE BLOCK *****
*/
#ifndef BIF_OOPS_H
#define BIF_OOPS_H
struct Curve;
struct Oops;
struct OopsLink;
struct SpaceOops;
struct Material;
struct Mesh;
struct MetaBall;
struct Object;
struct Lamp;
void add_curve_oopslinks(struct Curve *cu, struct Oops *oops, short flag);
void add_from_link(struct Oops *from, struct Oops *oops);
void add_material_oopslinks(struct Material *ma, struct Oops *oops, short flag);
void add_mball_oopslinks(struct MetaBall *mb, struct Oops *oops, short flag);
void add_mesh_oopslinks(struct Mesh *me, struct Oops *oops, short flag);
void add_object_oopslinks(struct Object *ob, struct Oops *oops, short flag);
void add_lamp_oopslinks(struct Lamp *la, struct Oops *oops, short flag);
struct Oops *add_oops(void *id);
struct OopsLink *add_oopslink(char *name, struct Oops *oops, short type, void *from, float xof, float yof);
struct Oops *add_test_oops(void *id); /* incl links */
void add_texture_oops(struct Material *ma);
void build_oops(void);
struct Oops *find_oops(ID *id);
void free_oops(struct Oops *oops); /* ook oops zelf */
void free_oopspace(struct SpaceOops *so);
void new_oops_location(struct Oops *);
int oops_test_overlap(struct Oops *test);
int oops_test_overlaphide(struct Oops *test);
float oopslink_totlen(struct Oops *oops);
void shrink_oops(void);
void shuffle_oops(void);
int test_oops(struct Oops *oops);
void test_oopslink(struct OopsLink *ol);
void test_oopslinko(struct OopsLink *ol);
#endif

View File

@@ -0,0 +1,106 @@
/**
* $Id: BIF_outliner.h
*
* ***** BEGIN GPL/BL DUAL LICENSE BLOCK *****
*
* 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
* of the License, or (at your option) any later version. The Blender
* Foundation also sells licenses for use in proprietary software under
* the Blender License. See http://www.blender.org/BL/ for information
* about this.
*
* 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) 2004 Blender Foundation.
* All rights reserved.
*
* The Original Code is: all of this file.
*
* Contributor(s): none yet.
*
* ***** END GPL/BL DUAL LICENSE BLOCK *****
*/
#ifndef BIF_OUTLINER_H
#define BIF_OUTLINER_H
struct TreeStoreElem;
typedef struct TreeElement {
struct TreeElement *next, *prev, *parent;
ListBase subtree;
float xs, ys; // do selection
int store_index; // offset in tree store
short flag, index; // flag for non-saved stuff, index for data arrays
short idcode; // from TreeStore id
short xend; // width of item display, for select
char *name;
void *directdata; // Armature Bones, Base, ...
} TreeElement;
/* TreeElement->flag */
#define TE_ACTIVE 1
#define TE_ICONROW 2
/* TreeStoreElem types */
#define TSE_NLA 1
#define TSE_NLA_ACTION 2
#define TSE_DEFGROUP_BASE 3
#define TSE_DEFGROUP 4
#define TSE_BONE 5
#define TSE_EBONE 6
#define TSE_CONSTRAINT_BASE 7
#define TSE_CONSTRAINT 8
#define TSE_MODIFIER_BASE 9
#define TSE_MODIFIER 10
#define TSE_LINKED_OB 11
#define TSE_SCRIPT_BASE 12
#define TSE_POSE_BASE 13
#define TSE_POSE_CHANNEL 14
/*#ifdef WITH_VERSE*/
#define TSE_VERSE_SESSION 15
#define TSE_VERSE_OBJ_NODE 16
#define TSE_VERSE_GEOM_NODE 17
/*#endif*/
#define TSE_PROXY 18
#define TSE_R_LAYER_BASE 19
#define TSE_R_LAYER 20
#define TSE_R_PASS 21
#define TSE_LINKED_MAT 22
/* NOTE, is used for light group */
#define TSE_LINKED_LAMP 23
/* outliner search flags */
#define OL_FIND 0
#define OL_FIND_CASE 1
#define OL_FIND_COMPLETE 2
#define OL_FIND_COMPLETE_CASE 3
/* button events */
#define OL_NAMEBUTTON 1
extern void draw_outliner(struct ScrArea *sa, struct SpaceOops *so);
extern void outliner_free_tree(struct ListBase *lb);
extern void outliner_mouse_event(struct ScrArea *sa, short event);
extern void outliner_toggle_visible(struct ScrArea *sa);
extern void outliner_show_active(struct ScrArea *sa);
extern void outliner_show_hierarchy(struct ScrArea *sa);
extern void outliner_one_level(struct ScrArea *sa, int add);
extern void outliner_select(struct ScrArea *sa);
extern void outliner_toggle_selected(struct ScrArea *sa);
extern void outliner_del(struct ScrArea *sa);
extern void outliner_operation_menu(struct ScrArea *sa);
extern void outliner_page_up_down(struct ScrArea *sa, int up);
extern void outliner_find_panel(struct ScrArea *sa, int again, int flags);
#endif

View File

@@ -0,0 +1,71 @@
/**
* $Id: BIF_poseobject.h 11403 2007-07-28 14:04:02Z blendix $
*
* ***** BEGIN GPL/BL DUAL LICENSE BLOCK *****
*
* 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
* of the License, or (at your option) any later version. The Blender
* Foundation also sells licenses for use in proprietary software under
* the Blender License. See http://www.blender.org/BL/ for information
* about this.
*
* 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.
*
* ***** END GPL/BL DUAL LICENSE BLOCK *****
*/
#ifndef BIF_POSEOBJECT
#define BIF_POSEOBJECT
struct Object;
struct bPoseChannel;
void enter_posemode(void);
void exit_posemode(void);
// sets chan->flag to POSE_KEY if bone selected
void set_pose_keys(struct Object *ob);
struct bPoseChannel *get_active_posechannel (struct Object *ob);
int pose_channel_in_IK_chain(struct Object *ob, struct bPoseChannel *pchan);
/* tools */
void pose_select_constraint_target(void);
void pose_special_editmenu(void);
void pose_add_IK(void);
void pose_clear_IK(void);
void pose_clear_constraints(void);
void pose_copy_menu(void);
void free_posebuf(void);
void copy_posebuf (void);
void paste_posebuf (int flip);
void pose_adds_vgroups(struct Object *meshobj, int heatweights);
void pose_calculate_path(struct Object *ob);
void pose_clear_paths(struct Object *ob);
void pose_flip_names(void);
void pose_activate_flipped_bone(void);
void pose_movetolayer(void);
#endif

View File

@@ -0,0 +1,94 @@
/**
* $Id: BIF_previewrender.h 8761 2006-11-06 01:08:26Z nicholasbishop $
*
* ***** BEGIN GPL/BL DUAL LICENSE BLOCK *****
*
* 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
* of the License, or (at your option) any later version. The Blender
* Foundation also sells licenses for use in proprietary software under
* the Blender License. See http://www.blender.org/BL/ for information
* about this.
*
* 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.
*
* ***** END GPL/BL DUAL LICENSE BLOCK *****
*/
#ifndef BIF_PREVIEWRENDER_H
#define BIF_PREVIEWRENDER_H
#include "DNA_vec_types.h"
struct View3D;
struct SpaceButs;
struct RenderInfo;
struct Image;
struct ScrArea;
struct uiBlock;
struct Render;
#define PREVIEW_RENDERSIZE 140
typedef void (*VectorDrawFunc)(int x, int y, int w, int h, float alpha);
/* stores rendered preview - is also used for icons */
typedef struct RenderInfo {
int pr_rectx;
int pr_recty;
short curtile, tottile, status;
rcti disprect; /* storage for view3d preview rect */
unsigned int* rect;
struct Render *re; /* persistant render */
} RenderInfo;
/* ri->status */
#define PR_DBASE 1
#define PR_DISPRECT 2
#define PR_PROJECTED 4
#define PR_ROTATED 8
/* Render the preview
pr_method:
- PR_DRAW_RENDER: preview is rendered and drawn, as indicated by called context (buttons panel)
- PR_ICON_RENDER: the preview is not drawn and the function is not dynamic,
so no events are processed. Hopefully fast enough for at least 32x32
- PR_DO_RENDER: preview is rendered, not drawn, but events are processed for afterqueue,
in use for node editor now.
*/
#define PR_DRAW_RENDER 0
#define PR_ICON_RENDER 1
#define PR_DO_RENDER 2
void BIF_previewrender (struct ID *id, struct RenderInfo *ri, struct ScrArea *area, int pr_method);
void BIF_previewrender_buts (struct SpaceButs *sbuts);
void BIF_previewdraw (struct ScrArea *sa, struct uiBlock *block);
void BIF_preview_changed (short id_code);
void BIF_preview_init_dbase (void);
void BIF_preview_free_dbase (void);
void BIF_view3d_previewrender(struct ScrArea *sa);
void BIF_view3d_previewdraw (struct ScrArea *sa, struct uiBlock *block);
void BIF_view3d_previewrender_free(struct View3D *v3d);
void BIF_view3d_previewrender_clear(struct ScrArea *sa);
void BIF_view3d_previewrender_signal(struct ScrArea *sa, short signal);
#endif

View File

@@ -0,0 +1,67 @@
/**
* $Id: BIF_renderwin.h 9376 2006-12-20 17:57:56Z ton $
*
* ***** BEGIN GPL/BL DUAL LICENSE BLOCK *****
*
* 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
* of the License, or (at your option) any later version. The Blender
* Foundation also sells licenses for use in proprietary software under
* the Blender License. See http://www.blender.org/BL/ for information
* about this.
*
* 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.
*
* ***** END GPL/BL DUAL LICENSE BLOCK *****
*/
struct Render;
struct ScrArea;
struct RenderStats;
void calc_renderwin_rectangle(int rectx, int recty, int posmask, int renderpos_r[2], int rendersize_r[2]);
void BIF_close_render_display(void);
void BIF_do_render(int anim);
/**
* @param v3d The View3D space to render.
*/
void BIF_do_ogl_render(struct View3D *v3d, int anim);
void BIF_renderwin_set_for_ogl_render(void);
void BIF_renderwin_set_custom_cursor(unsigned char mask[16][2], unsigned char bitmap[16][2]);
void BIF_redraw_render_rect(void);
void BIF_swap_render_rects(void);
void BIF_store_spare(void);
void BIF_toggle_render_display(void);
void BIF_init_render_callbacks(struct Render *re, int do_display);
void BIF_end_render_callbacks(void);
/* should not be here, ~WIP~ */
void make_renderinfo_string(struct RenderStats *rs, char *str);
/* space for info text */
#define RW_HEADERY 18
/* header print for window */
#define RW_MAXTEXT 512

View File

@@ -0,0 +1,600 @@
/**
* $Id: BIF_resources.h 12755 2007-12-02 05:50:38Z aligorith $
*
* ***** BEGIN GPL/BL DUAL LICENSE BLOCK *****
*
* 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
* of the License, or (at your option) any later version. The Blender
* Foundation also sells licenses for use in proprietary software under
* the Blender License. See http://www.blender.org/BL/ for information
* about this.
*
* 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.
*
* ***** END GPL/BL DUAL LICENSE BLOCK *****
*/
#ifndef BIF_RESOURCES_H
#define BIF_RESOURCES_H
/* elubie: TODO: move the typedef for icons to BIF_interface_icons.h */
/* and add/replace include of BIF_resources.h by BIF_interface_icons.h */
typedef enum {
#define BIFICONID_FIRST (ICON_VIEW3D)
ICON_VIEW3D,
ICON_IPO,
ICON_OOPS,
ICON_BUTS,
ICON_FILESEL,
ICON_IMAGE_COL,
ICON_INFO,
ICON_SEQUENCE,
ICON_TEXT,
ICON_IMASEL,
ICON_SOUND,
ICON_ACTION,
ICON_NLA,
ICON_SCRIPTWIN,
ICON_TIME,
ICON_NODE,
ICON_SPACE2,
ICON_SPACE3,
ICON_SPACE4,
ICON_TRIA_LEFT,
ICON_TRIA_UP,
ICON_FONTPREVIEW,
ICON_BLANK4,
ICON_BLANK5,
ICON_BLANK6,
ICON_ORTHO,
ICON_PERSP,
ICON_CAMERA,
ICON_PARTICLES,
ICON_BBOX,
ICON_WIRE,
ICON_SOLID,
ICON_SMOOTH,
ICON_POTATO,
ICON_MARKER_HLT,
ICON_NORMALVIEW,
ICON_LOCALVIEW,
ICON_UNUSEDVIEW,
ICON_VIEWZOOM,
ICON_SORTALPHA,
ICON_SORTTIME,
ICON_SORTSIZE,
ICON_LONGDISPLAY,
ICON_SHORTDISPLAY,
ICON_TRIA_DOWN,
ICON_TRIA_RIGHT,
ICON_BLANK7,
ICON_BLANK8,
ICON_BLANK9,
ICON_BLANK10,
ICON_VIEW_AXIS_ALL,
ICON_VIEW_AXIS_NONE,
ICON_VIEW_AXIS_NONE2,
ICON_VIEW_AXIS_TOP,
ICON_VIEW_AXIS_FRONT,
ICON_VIEW_AXIS_SIDE,
ICON_POSE_DEHLT,
ICON_POSE_HLT,
ICON_BORDERMOVE,
ICON_MAYBE_ITS_A_LASSO,
ICON_BLANK1, /* ATTENTION, someone decided to use this throughout blender
and didn't care to neither rename it nor update the PNG */
ICON_VERSE,
ICON_MOD_BOOLEAN,
ICON_ARMATURE,
ICON_PAUSE,
ICON_ALIGN,
ICON_REC,
ICON_PLAY,
ICON_FF,
ICON_REW,
ICON_PYTHON,
ICON_BLANK11,
ICON_BLANK12,
ICON_BLANK13,
ICON_BLANK14,
ICON_DOTSUP,
ICON_DOTSDOWN,
ICON_MENU_PANEL,
ICON_AXIS_SIDE,
ICON_AXIS_FRONT,
ICON_AXIS_TOP,
ICON_STICKY_UVS_LOC,
ICON_STICKY_UVS_DISABLE,
ICON_STICKY_UVS_VERT,
ICON_PREV_KEYFRAME,
ICON_NEXT_KEYFRAME,
ICON_ENVMAP,
ICON_TRANSP_HLT,
ICON_TRANSP_DEHLT,
ICON_CIRCLE_DEHLT,
ICON_CIRCLE_HLT,
ICON_TPAINT_DEHLT,
ICON_TPAINT_HLT,
ICON_WPAINT_DEHLT,
ICON_WPAINT_HLT,
ICON_MARKER,
ICON_BLANK15,
ICON_BLANK16,
ICON_BLANK17,
ICON_BLANK18,
ICON_X,
ICON_GO_LEFT,
ICON_NO_GO_LEFT,
ICON_UNLOCKED,
ICON_LOCKED,
ICON_PARLIB,
ICON_DATALIB,
ICON_AUTO,
ICON_MATERIAL_DEHLT2,
ICON_RING,
ICON_GRID,
ICON_PROPEDIT,
ICON_KEEPRECT,
ICON_DESEL_CUBE_VERTS,
ICON_EDITMODE_DEHLT,
ICON_EDITMODE_HLT,
ICON_VPAINT_DEHLT,
ICON_VPAINT_HLT,
ICON_FACESEL_DEHLT,
ICON_FACESEL_HLT,
ICON_EDIT_DEHLT,
ICON_BOOKMARKS,
ICON_BLANK20,
ICON_BLANK21,
ICON_BLANK22,
ICON_HELP,
ICON_ERROR,
ICON_FOLDER_DEHLT,
ICON_FOLDER_HLT,
ICON_BLUEIMAGE_DEHLT,
ICON_BLUEIMAGE_HLT,
ICON_BPIBFOLDER_DEHLT,
ICON_BPIBFOLDER_HLT,
ICON_BPIBFOLDER_ERR,
ICON_UGLY_GREEN_RING,
ICON_GHOST,
ICON_SORTBYEXT,
ICON_SCULPTMODE_HLT,
ICON_VERTEXSEL,
ICON_EDGESEL,
ICON_FACESEL,
ICON_PLUS,
ICON_BPIBFOLDER_X,
ICON_BPIBFOLDERGREY,
ICON_MAGNIFY,
ICON_INFO2,
ICON_BLANK23,
ICON_BLANK24,
ICON_BLANK25,
ICON_BLANK26,
ICON_RIGHTARROW,
ICON_DOWNARROW_HLT,
ICON_ROUNDBEVELTHING,
ICON_FULLTEXTURE,
ICON_HOOK,
ICON_DOT,
ICON_WORLD_DEHLT,
ICON_CHECKBOX_DEHLT,
ICON_CHECKBOX_HLT,
ICON_LINK,
ICON_INLINK,
ICON_ZOOMIN,
ICON_ZOOMOUT,
ICON_PASTEDOWN,
ICON_COPYDOWN,
ICON_CONSTANT,
ICON_LINEAR,
ICON_CYCLIC,
ICON_KEY_DEHLT,
ICON_KEY_HLT,
ICON_GRID2,
ICON_BLANK27,
ICON_BLANK28,
ICON_BLANK29,
ICON_BLANK30,
ICON_EYE,
ICON_LAMP,
ICON_MATERIAL,
ICON_TEXTURE,
ICON_ANIM,
ICON_WORLD,
ICON_SCENE,
ICON_EDIT,
ICON_GAME,
ICON_PAINT,
ICON_RADIO,
ICON_SCRIPT,
ICON_SPEAKER,
ICON_PASTEUP,
ICON_COPYUP,
ICON_PASTEFLIPUP,
ICON_PASTEFLIPDOWN,
ICON_CYCLICLINEAR,
ICON_PIN_DEHLT,
ICON_PIN_HLT,
ICON_LITTLEGRID,
ICON_BLANK31,
ICON_BLANK32,
ICON_BLANK33,
ICON_BLANK34,
ICON_FULLSCREEN,
ICON_SPLITSCREEN,
ICON_RIGHTARROW_THIN,
ICON_DISCLOSURE_TRI_RIGHT,
ICON_DISCLOSURE_TRI_DOWN,
ICON_SCENE_SEPIA,
ICON_SCENE_DEHLT,
ICON_OBJECT,
ICON_MESH,
ICON_CURVE,
ICON_MBALL,
ICON_LATTICE,
ICON_LAMP_DEHLT,
ICON_MATERIAL_DEHLT,
ICON_TEXTURE_DEHLT,
ICON_IPO_DEHLT,
ICON_LIBRARY_DEHLT,
ICON_IMAGE_DEHLT,
ICON_EYEDROPPER,
ICON_WINDOW_WINDOW,
ICON_PANEL_CLOSE,
ICON_PHYSICS,
ICON_BLANK36,
ICON_BLANK37,
ICON_BLANK38,
ICON_BLENDER,
ICON_PACKAGE,
ICON_UGLYPACKAGE,
ICON_MATPLANE,
ICON_MATSPHERE,
ICON_MATCUBE,
ICON_SCENE_HLT,
ICON_OBJECT_HLT,
ICON_MESH_HLT,
ICON_CURVE_HLT,
ICON_MBALL_HLT,
ICON_LATTICE_HLT,
ICON_LAMP_HLT,
ICON_MATERIAL_HLT,
ICON_TEXTURE_HLT,
ICON_IPO_HLT,
ICON_LIBRARY_HLT,
ICON_IMAGE_HLT,
ICON_CONSTRAINT,
ICON_CAMERA_DEHLT,
ICON_ARMATURE_DEHLT,
ICON_SNAP_GEAR,
ICON_SNAP_GEO,
ICON_BLANK41,
ICON_BLANK42,
ICON_SMOOTHCURVE,
ICON_SPHERECURVE,
ICON_ROOTCURVE,
ICON_SHARPCURVE,
ICON_LINCURVE,
ICON_NOCURVE,
ICON_RNDCURVE,
ICON_PROP_OFF,
ICON_PROP_ON,
ICON_PROP_CON,
ICON_SYNTAX,
ICON_SYNTAX_OFF,
ICON_MONKEY,
ICON_HAIR,
ICON_VIEWMOVE,
ICON_HOME,
ICON_CLIPUV_DEHLT,
ICON_CLIPUV_HLT,
ICON_BLANK2,
ICON_BLANK3,
ICON_VPAINT_COL,
ICON_RESTRICT_SELECT_OFF,
ICON_RESTRICT_SELECT_ON,
ICON_MUTE_IPO_OFF,
ICON_MUTE_IPO_ON,
ICON_MAN_TRANS,
ICON_MAN_ROT,
ICON_MAN_SCALE,
ICON_MANIPUL,
ICON_BLANK_47,
ICON_MODIFIER,
ICON_MOD_WAVE,
ICON_MOD_BUILD,
ICON_MOD_DECIM,
ICON_MOD_MIRROR,
ICON_MOD_SOFT,
ICON_MOD_SUBSURF,
ICON_SEQ_SEQUENCER,
ICON_SEQ_PREVIEW,
ICON_SEQ_LUMA_WAVEFORM,
ICON_SEQ_CHROMA_SCOPE,
ICON_ROTATE,
ICON_CURSOR,
ICON_ROTATECOLLECTION,
ICON_ROTATECENTER,
ICON_ROTACTIVE,
ICON_RESTRICT_VIEW_OFF,
ICON_RESTRICT_VIEW_ON,
ICON_RESTRICT_RENDER_OFF,
ICON_RESTRICT_RENDER_ON,
VICON_VIEW3D,
VICON_EDIT,
VICON_EDITMODE_DEHLT,
VICON_EDITMODE_HLT,
VICON_DISCLOSURE_TRI_RIGHT,
VICON_DISCLOSURE_TRI_DOWN,
VICON_MOVE_UP,
VICON_MOVE_DOWN,
VICON_X
#define BIFICONID_LAST (VICON_X)
#define BIFNICONIDS (BIFICONID_LAST-BIFICONID_FIRST + 1)
} BIFIconID;
typedef enum {
#define BIFCOLORSHADE_FIRST (COLORSHADE_DARK)
COLORSHADE_DARK,
COLORSHADE_GREY,
COLORSHADE_MEDIUM,
COLORSHADE_HILITE,
COLORSHADE_LIGHT,
COLORSHADE_WHITE
#define BIFCOLORSHADE_LAST (COLORSHADE_WHITE)
#define BIFNCOLORSHADES (BIFCOLORSHADE_LAST-BIFCOLORSHADE_FIRST + 1)
} BIFColorShade;
typedef enum {
#define BIFCOLORID_FIRST (BUTGREY)
BUTGREY = 0,
BUTGREEN,
BUTBLUE,
BUTSALMON,
MIDGREY,
BUTPURPLE,
BUTYELLOW,
REDALERT,
BUTRUST,
BUTWHITE,
BUTDBLUE,
BUTPINK,
BUTDPINK,
BUTMACTIVE,
BUTIPO,
BUTAUDIO,
BUTCAMERA,
BUTRANDOM,
BUTEDITOBJECT,
BUTPROPERTY,
BUTSCENE,
BUTMOTION,
BUTMESSAGE,
BUTACTION,
BUTCD,
BUTGAME,
BUTVISIBILITY,
BUTYUCK,
BUTSEASICK,
BUTCHOKE,
BUTIMPERIAL,
BUTTEXTCOLOR,
BUTTEXTPRESSED,
BUTSBACKGROUND,
VIEWPORTBACKCOLOR,
VIEWPORTGRIDCOLOR,
VIEWPORTACTIVECOLOR,
VIEWPORTSELECTEDCOLOR,
VIEWPORTUNSELCOLOR,
EDITVERTSEL,
EDITVERTUNSEL,
EDITEDGESEL,
EDITEDGEUNSEL
#define BIFCOLORID_LAST (EDITEDGEUNSEL)
#define BIFNCOLORIDS (BIFCOLORID_LAST-BIFCOLORID_FIRST + 1)
} BIFColorID;
/* XXX WARNING: this is saved in file, so do not change order! */
enum {
TH_AUTO, /* for buttons, to signal automatic color assignment */
// uibutton colors
TH_BUT_OUTLINE,
TH_BUT_NEUTRAL,
TH_BUT_ACTION,
TH_BUT_SETTING,
TH_BUT_SETTING1,
TH_BUT_SETTING2,
TH_BUT_NUM,
TH_BUT_TEXTFIELD,
TH_BUT_POPUP,
TH_BUT_TEXT,
TH_BUT_TEXT_HI,
TH_MENU_BACK,
TH_MENU_ITEM,
TH_MENU_HILITE,
TH_MENU_TEXT,
TH_MENU_TEXT_HI,
TH_BUT_DRAWTYPE,
TH_REDALERT,
TH_CUSTOM,
TH_BUT_TEXTFIELD_HI,
TH_ICONFILE,
TH_THEMEUI,
// common colors among spaces
TH_BACK,
TH_TEXT,
TH_TEXT_HI,
TH_HEADER,
TH_HEADERDESEL,
TH_PANEL,
TH_SHADE1,
TH_SHADE2,
TH_HILITE,
TH_GRID,
TH_WIRE,
TH_SELECT,
TH_ACTIVE,
TH_GROUP,
TH_GROUP_ACTIVE,
TH_TRANSFORM,
TH_VERTEX,
TH_VERTEX_SELECT,
TH_VERTEX_SIZE,
TH_EDGE,
TH_EDGE_SELECT,
TH_EDGE_SEAM,
TH_EDGE_FACESEL,
TH_FACE,
TH_FACE_SELECT,
TH_NORMAL,
TH_FACE_DOT,
TH_FACEDOT_SIZE,
TH_CFRAME,
TH_SYNTAX_B,
TH_SYNTAX_V,
TH_SYNTAX_C,
TH_SYNTAX_L,
TH_SYNTAX_N,
TH_BONE_SOLID,
TH_BONE_POSE,
TH_STRIP,
TH_STRIP_SELECT,
TH_LAMP,
TH_NODE,
TH_NODE_IN_OUT,
TH_NODE_OPERATOR,
TH_NODE_CONVERTOR,
TH_NODE_GROUP,
TH_SEQ_MOVIE,
TH_SEQ_IMAGE,
TH_SEQ_SCENE,
TH_SEQ_AUDIO,
TH_SEQ_EFFECT,
TH_SEQ_PLUGIN,
TH_SEQ_TRANSITION,
TH_SEQ_META,
TH_EDGE_SHARP,
TH_EDITMESH_ACTIVE,
};
/* XXX WARNING: previous is saved in file, so do not change order! */
/* theme drawtypes */
#define TH_MINIMAL 0
#define TH_SHADED 1
#define TH_ROUNDED 2
#define TH_OLDSKOOL 3
/* specific defines per space should have higher define values */
struct bTheme;
// THE CODERS API FOR THEMES:
// sets the color
void BIF_ThemeColor(int colorid);
// sets the color plus alpha
void BIF_ThemeColor4(int colorid);
// sets color plus offset for shade
void BIF_ThemeColorShade(int colorid, int offset);
// sets color plus offset for alpha
void BIF_ThemeColorShadeAlpha(int colorid, int coloffset, int alphaoffset);
// sets color, which is blend between two theme colors
void BIF_ThemeColorBlend(int colorid1, int colorid2, float fac);
// same, with shade offset
void BIF_ThemeColorBlendShade(int colorid1, int colorid2, float fac, int offset);
// returns one value, not scaled
float BIF_GetThemeValuef(int colorid);
int BIF_GetThemeValue(int colorid);
// get three color values, scaled to 0.0-1.0 range
void BIF_GetThemeColor3fv(int colorid, float *col);
// get the 3 or 4 byte values
void BIF_GetThemeColor3ubv(int colorid, char *col);
void BIF_GetThemeColor4ubv(int colorid, char *col);
// get a theme color from specified space type
void BIF_GetThemeColorType4ubv(int colorid, int spacetype, char *col);
// blends and shades between two color pointers
void BIF_ColorPtrBlendShade3ubv(char *cp1, char *cp2, float fac, int offset);
// get a 3 byte color, blended and shaded between two other char color pointers
void BIF_GetColorPtrBlendShade3ubv(char *cp1, char *cp2, char *col, float fac, int offset);
struct ScrArea;
// internal (blender) usage only, for init and set active
void BIF_InitTheme(void);
void BIF_SetTheme(struct ScrArea *sa);
void BIF_resources_init (void);
void BIF_resources_free (void);
void BIF_colors_init (void);
void BIF_load_ui_colors (void);
/* only for buttons in theme editor! */
char *BIF_ThemeGetColorPtr(struct bTheme *btheme, int spacetype, int colorid);
char *BIF_ThemeColorsPup(int spacetype);
void BIF_def_color (BIFColorID colorid, unsigned char r, unsigned char g, unsigned char b);
#endif /* BIF_ICONS_H */

View File

@@ -0,0 +1,110 @@
/*
* $Id: BIF_retopo.h 9804 2007-01-17 03:57:01Z nicholasbishop $
*
* ***** BEGIN GPL LICENSE BLOCK *****
*
* 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
* of the License, or (at your option) any later version.
*
* 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) 2006 by Nicholas Bishop
* All rights reserved.
*
* The Original Code is: all of this file.
*
* Contributor(s): none yet.
*
* ***** END GPL LICENSE BLOCK *****
*/
#ifndef BIF_RETOPO_H
#define BIF_RETOPO_H
#include "DNA_vec_types.h"
/* For bglMats */
#include "BIF_glutil.h"
struct EditVert;
struct Mesh;
struct View3D;
typedef struct RetopoViewData {
bglMats mats;
char queue_matrix_update;
} RetopoViewData;
typedef struct RetopoPaintPoint {
struct RetopoPaintPoint *next, *prev;
vec2s loc;
short index;
float co[3];
struct EditVert *eve;
} RetopoPaintPoint;
typedef struct RetopoPaintLine {
struct RetopoPaintLine *next, *prev;
ListBase points;
ListBase hitlist; /* RetopoPaintHit */
RetopoPaintPoint *cyclic;
} RetopoPaintLine;
typedef struct RetopoPaintSel {
struct RetopoPaintSel *next, *prev;
RetopoPaintLine *line;
char first;
} RetopoPaintSel;
typedef struct RetopoPaintData {
char in_drag;
short sloc[2];
ListBase lines;
ListBase intersections; /* RetopoPaintPoint */
short seldist;
RetopoPaintSel nearest;
struct View3D *paint_v3d;
} RetopoPaintData;
RetopoPaintData *get_retopo_paint_data();
char retopo_mesh_check();
char retopo_curve_check();
void retopo_end_okee();
void retopo_free_paint_data(RetopoPaintData *rpd);
void retopo_free_paint();
char retopo_mesh_paint_check();
void retopo_paint_view_update(struct View3D *v3d);
void retopo_force_update();
void retopo_paint_toggle(void*,void*);
char retopo_paint(const unsigned short event);
void retopo_draw_paint_lines();
RetopoPaintData *retopo_paint_data_copy(RetopoPaintData *rpd);
void retopo_toggle(void*,void*);
void retopo_do_vert(struct View3D *v3d, float *v);
void retopo_do_all();
void retopo_do_all_cb(void *, void *);
void retopo_queue_updates(struct View3D *v3d);
void retopo_matrix_update(struct View3D *v3d);
void retopo_free_view_data(struct View3D *v3d);
#endif

View File

@@ -1,5 +1,5 @@
/**
* $Id$
* $Id: BIF_scrarea.h 229 2002-12-27 13:11:01Z mein $
*
* ***** BEGIN GPL/BL DUAL LICENSE BLOCK *****
*
@@ -29,41 +29,26 @@
*
* ***** END GPL/BL DUAL LICENSE BLOCK *****
*/
#include "DNA_screen_types.h"
#include "DNA_space_types.h"
#include "BIF_scrarea.h"
#ifdef HAVE_CONFIG_H
#include <config.h>
#ifdef __cplusplus
extern "C" {
#endif
void *scrarea_find_space_of_type(ScrArea *sa, int type)
{
SpaceLink *sl;
struct ScrArea;
for (sl= sa->spacedata.first; sl; sl= sl->next)
if (sl->spacetype==type)
return (void*) sl;
/**
* Finds the first spacedata of @a type within
* the scrarea.
*/
void *scrarea_find_space_of_type(ScrArea *sa, int type);
return 0;
int scrarea_get_win_x (struct ScrArea *sa);
int scrarea_get_win_y (struct ScrArea *sa);
int scrarea_get_win_width (struct ScrArea *sa);
int scrarea_get_win_height (struct ScrArea *sa);
#ifdef __cplusplus
}
int scrarea_get_win_x(ScrArea *sa)
{
return sa->winrct.xmin;
}
#endif
int scrarea_get_win_y(ScrArea *sa)
{
return sa->winrct.ymin;
}
int scrarea_get_win_width(ScrArea *sa)
{
return sa->winx;
}
int scrarea_get_win_height(ScrArea *sa)
{
return sa->winy;
}

View File

@@ -0,0 +1,137 @@
/* replacement for screen.h */
/*
*
* Leftovers here are actually editscreen.c thingies
*
* $Id: BIF_screen.h 10543 2007-04-17 18:15:31Z campbellbarton $
*
* ***** BEGIN GPL/BL DUAL LICENSE BLOCK *****
*
* 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
* of the License, or (at your option) any later version. The Blender
* Foundation also sells licenses for use in proprietary software under
* the Blender License. See http://www.blender.org/BL/ for information
* about this.
*
* 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.
*
* ***** END GPL/BL DUAL LICENSE BLOCK *****
*/
#ifndef BIF_SCREEN_H
#define BIF_SCREEN_H
#ifdef __cplusplus
extern "C" {
#endif
/* externs in editscreen.c */
extern int displaysizex, displaysizey;
extern struct ScrArea *curarea;
struct View3D;
struct bScreen;
struct ScrArea;
struct ScrVert;
struct ScrEdge;
struct ListBase;
struct View3D *find_biggest_view3d(void);
struct ScrArea *find_biggest_area_of_type(int spacecode);
struct ScrArea *find_biggest_area(void);
void scrarea_queue_redraw(struct ScrArea *area);
void scrarea_queue_winredraw(struct ScrArea *area);
void scrarea_queue_headredraw(struct ScrArea *area);
int blender_test_break(void);
void duplicate_screen(void);
void init_screen_cursors(void);
void set_timecursor(int nr);
void waitcursor(int val);
void wich_cursor(struct ScrArea *sa);
void setcursor_space(int spacetype, short cur);
void set_g_activearea(struct ScrArea *sa);
void getmouseco_sc(short *mval);
void getmouseco_areawin(short *mval);
void getmouseco_headwin(short *mval);
int qtest(void);
int anyqtest(void);
void areawinset(short win);
void headerbox(struct ScrArea *sa);
void defheaddraw(void);
void defheadchange(void);
unsigned short winqtest(struct ScrArea *sa);
unsigned short headqtest(struct ScrArea *sa);
void winqdelete(struct ScrArea *sa);
void winqclear(struct ScrArea *sa);
void addqueue(short win, unsigned short event, short val);
void addafterqueue(short win, unsigned short event, short val);
void add_readfile_event(char *filename);
short ext_qtest(void);
unsigned short extern_qread(short *val);
unsigned short extern_qread_ext(short *val, char *ascii);
extern void markdirty_all(void); // also sets redraw event
extern void markdirty_all_back(void);
extern void markdirty_win_back(short winid);
void screen_swapbuffers(void);
void set_debug_swapbuffers_ovveride(struct bScreen *sc, int mode);
int is_allowed_to_change_screen(struct bScreen *newp);
void splash(void * data, int datasizei, char * string);
void screen_delayed_undo_push(char *name);
void screenmain(void);
void getdisplaysize(void);
void setprefsize(int stax, int stay, int sizx, int sizy, int maximized);
void calc_arearcts(struct ScrArea *sa);
void resize_screen(int x, int y, int w, int h);
struct ScrArea *closest_bigger_area(void);
int mywinopen(int mode, short posx, short posy, short sizex, short sizey);
void setscreen(struct bScreen *sc);
void area_fullscreen(void);
int select_area(int spacetype);
struct bScreen *default_twosplit(void);
void initscreen(void);
void unlink_screen(struct bScreen *sc);
void reset_autosave(void);
int area_is_active_area(struct ScrArea *area);
void draw_area_emboss(struct ScrArea *sa);
void headerprint(char *str);
/* ******* handlers ****** */
void add_screenhandler(struct bScreen *sc, short eventcode, short val);
void rem_screenhandler(struct bScreen *sc, short eventcode);
int do_screenhandlers(struct bScreen *sc);
int has_screenhandler(struct bScreen *sc, short eventcode);
/***/
/* return all layers of all 3d windows in a screen */
unsigned int screen_view3d_layers(void);
#ifdef __cplusplus
}
#endif
#endif /* BIF_SCREEN_H */

View File

@@ -0,0 +1,148 @@
/**
* $Id: BIF_space.h 12177 2007-10-01 08:03:11Z schlaile $
*
* ***** BEGIN GPL/BL DUAL LICENSE BLOCK *****
*
* 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
* of the License, or (at your option) any later version. The Blender
* Foundation also sells licenses for use in proprietary software under
* the Blender License. See http://www.blender.org/BL/ for information
* about this.
*
* 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.
*
* ***** END GPL/BL DUAL LICENSE BLOCK *****
*/
#ifndef BIF_SPACE_H
#define BIF_SPACE_H
struct ListBase;
struct ScrArea;
struct SpaceButs;
struct View2D;
struct BWinEvent;
struct SpaceOops;
#define REMAKEIPO 1
#define OOPS_TEST 2
#define BUT_HORIZONTAL 1
#define BUT_VERTICAL 2
/* is hardcoded in DNA_space_types.h */
#define SPACE_MAXHANDLER 8
/* view3d handler codes */
#define VIEW3D_HANDLER_BACKGROUND 1
#define VIEW3D_HANDLER_PROPERTIES 2
#define VIEW3D_HANDLER_OBJECT 3
#define VIEW3D_HANDLER_PREVIEW 4
#define VIEW3D_HANDLER_MULTIRES 5
/* ipo handler codes */
#define IPO_HANDLER_PROPERTIES 20
/* image handler codes */
#define IMAGE_HANDLER_PROPERTIES 30
#define IMAGE_HANDLER_PAINT 31
#define IMAGE_HANDLER_CURVES 32
#define IMAGE_HANDLER_PREVIEW 33
#define IMAGE_HANDLER_GAME_PROPERTIES 34
#define IMAGE_HANDLER_VIEW_PROPERTIES 35
/*#define IMAGE_HANDLER_TRANSFORM_PROPERTIES 36*/
/* action handler codes */
#define ACTION_HANDLER_PROPERTIES 40
/* nla handler codes */
#define NLA_HANDLER_PROPERTIES 50
/* sequence handler codes */
#define SEQ_HANDLER_PROPERTIES 60
/* imasel handler codes */
#define IMASEL_HANDLER_IMAGE 70
/* theme codes */
#define B_ADD_THEME 3301
#define B_DEL_THEME 3302
#define B_NAME_THEME 3303
#define B_THEMECOL 3304
#define B_UPDATE_THEME 3305
#define B_CHANGE_THEME 3306
#define B_THEME_COPY 3307
#define B_THEME_PASTE 3308
#define B_UPDATE_THEME_ICONS 3309
#define B_RECALCLIGHT 3310
void scrarea_do_winprefetchdraw (struct ScrArea *sa);
void scrarea_do_windraw (struct ScrArea *sa);
void scrarea_do_winchange (struct ScrArea *sa);
void scrarea_do_winhandle (struct ScrArea *sa, struct BWinEvent *evt);
void scrarea_do_headdraw (struct ScrArea *sa);
void scrarea_do_headchange (struct ScrArea *sa);
/* space.c */
extern void add_blockhandler(struct ScrArea *sa, short eventcode, short action);
extern void rem_blockhandler(struct ScrArea *sa, short eventcode);
extern void toggle_blockhandler(struct ScrArea *sa, short eventcode, short action);
extern void space_set_commmandline_options(void);
extern void allqueue(unsigned short event, short val);
extern void allspace(unsigned short event, short val);
extern void copy_view3d_lock(short val);
extern void drawemptyspace(struct ScrArea *sa, void *spacedata);
extern void drawinfospace(struct ScrArea *sa, void *spacedata);
extern void duplicatespacelist(struct ScrArea *area, struct ListBase *lb1, struct ListBase *lb2);
extern void extern_set_butspace(int fkey, int do_cycle);
extern void force_draw(int header);
extern void force_draw_all(int header);
extern void force_draw_plus(int type, int header);
extern void freespacelist(struct ScrArea *sa);
extern void handle_view3d_around(void);
extern void handle_view3d_lock(void);
extern void init_v2d_oops(struct ScrArea *, struct SpaceOops *);
extern void initipo(struct ScrArea *sa);
extern void newspace(struct ScrArea *sa, int type);
extern void set_rects_butspace(struct SpaceButs *buts);
extern void test_butspace(void);
extern void start_game(void);
extern void select_object_grouped(short nr);
extern void join_menu(void);
extern void BIF_undo_push(char *str);
extern void BIF_undo(void);
extern void BIF_redo(void);
extern void BIF_undo_menu(void);
#if 0
//#ifdef _WIN32 // FULLSCREEN
extern void mainwindow_toggle_fullscreen(int fullscreen);
#endif
extern void mainwindow_set_filename_to_title(char *title);
extern void mainwindow_raise(void);
extern void mainwindow_make_active(void);
extern void mainwindow_close(void);
#endif

View File

@@ -0,0 +1,67 @@
/**
* $Id: BIF_spacetypes.h 12177 2007-10-01 08:03:11Z schlaile $
*
* ***** BEGIN GPL/BL DUAL LICENSE BLOCK *****
*
* 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
* of the License, or (at your option) any later version. The Blender
* Foundation also sells licenses for use in proprietary software under
* the Blender License. See http://www.blender.org/BL/ for information
* about this.
*
* 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.
*
* ***** END GPL/BL DUAL LICENSE BLOCK *****
*/
struct ScrArea;
struct BWinEvent;
typedef struct _SpaceType SpaceType;
typedef void (*SpacePrefetchDrawFP) (struct ScrArea *sa, void *spacedata);
typedef void (*SpaceDrawFP) (struct ScrArea *sa, void *spacedata);
typedef void (*SpaceChangeFP) (struct ScrArea *sa, void *spacedata);
typedef void (*SpaceHandleFP) (struct ScrArea *sa, void *spacedata, struct BWinEvent *evt);
/***/
SpaceType* spacetype_new (char *name);
void spacetype_set_winfuncs (SpaceType *st, SpacePrefetchDrawFP prefetch, SpaceDrawFP draw, SpaceChangeFP change, SpaceHandleFP handle);
/***/
SpaceType *spaceaction_get_type (void);
SpaceType *spacebuts_get_type (void);
SpaceType *spacefile_get_type (void);
SpaceType *spaceimage_get_type (void);
SpaceType *spaceimasel_get_type (void);
SpaceType *spaceinfo_get_type (void);
SpaceType *spaceipo_get_type (void);
SpaceType *spacenla_get_type (void);
SpaceType *spaceoops_get_type (void);
SpaceType *spaceseq_get_type (void);
SpaceType *spacesound_get_type (void);
SpaceType *spacetext_get_type (void);
SpaceType *spacescript_get_type (void);
SpaceType *spaceview3d_get_type (void);
SpaceType *spacetime_get_type (void);
SpaceType *spacenode_get_type (void);

View File

@@ -0,0 +1,42 @@
/* $Id: BIF_tbcallback.h 206 2002-12-20 09:41:25Z mein $
*/
/*
* ***** BEGIN GPL/BL DUAL LICENSE BLOCK *****
*
* 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
* of the License, or (at your option) any later version. The Blender
* Foundation also sells licenses for use in proprietary software under
* the Blender License. See http://www.blender.org/BL/ for information
* about this.
*
* 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.
*
* ***** END GPL/BL DUAL LICENSE BLOCK *****/
/* defines callback structure for toolbox menu */
typedef struct _TBcallback {
char *desc;
char *key;
void (*cb)(int v); /* callback function takes value */
int val;
} TBcallback;
typedef TBcallback * (*Tbox_callbackfunc)(int l, int x);
void tboxSetCallback(Tbox_callbackfunc f);

View File

@@ -0,0 +1,41 @@
/**
* $Id: BIF_toets.h 6568 2006-01-28 18:33:28Z hos $
*
* ***** BEGIN GPL/BL DUAL LICENSE BLOCK *****
*
* 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
* of the License, or (at your option) any later version. The Blender
* Foundation also sells licenses for use in proprietary software under
* the Blender License. See http://www.blender.org/BL/ for information
* about this.
*
* 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.
*
* ***** END GPL/BL DUAL LICENSE BLOCK *****
*/
#ifndef BIF_TOETS_H
#define BIF_TOETS_H
int blenderqread(unsigned short event, short val);
void persptoetsen(unsigned short event); /* dutch rules man */
int untitled(char *name);
#endif

View File

@@ -0,0 +1,68 @@
/* toolbox (SPACEKEY) related
* $Id: BIF_toolbox.h 10571 2007-04-22 22:08:19Z campbellbarton $
*
* ***** BEGIN GPL/BL DUAL LICENSE BLOCK *****
*
* 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
* of the License, or (at your option) any later version. The Blender
* Foundation also sells licenses for use in proprietary software under
* the Blender License. See http://www.blender.org/BL/ for information
* about this.
*
* 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.
*
* ***** END GPL/BL DUAL LICENSE BLOCK *****
*/
#ifndef BIF_TOOLBOX_H
#define BIF_TOOLBOX_H
/* toolbox.c */
void asciitoraw (int ch, short unsigned int *event, short unsigned int *qual);
void toolbox_n(void);
void toolbox_n_add(void);
void reset_toolbox(void);
void notice (char *str, ...);
void error (char *fmt, ...);
void error_libdata (void);
int saveover (char *filename);
int okee (char *fmt, ...);
short button (short *var, short min, short max, char *str);
short fbutton (float *var, float min, float max, float a1, float a2, char *str);
short sbutton (char *var, float min, float max, char *str); /* __NLA */
int movetolayer_buts (unsigned int *lay, char *title);
int movetolayer_short_buts (short *lay, char *title);
void draw_numbuts_tip (char *str, int x1, int y1, int x2, int y2);
int do_clever_numbuts (char *name, int tot, int winevent);
void clever_numbuts_buts(void);
void add_numbut (int nr, int type, char *str, float min, float max, void *poin, char *tip);
void clever_numbuts (void);
void replace_names_but (void);
void BIF_screendump(int fscreen);
void write_screendump(char *name);
#endif

View File

@@ -0,0 +1,110 @@
/**
* $Id: BIF_transform.h 12682 2007-11-26 22:09:57Z blendix $
*
* ***** BEGIN GPL/BL DUAL LICENSE BLOCK *****
*
* 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
* of the License, or (at your option) any later version. The Blender
* Foundation also sells licenses for use in proprietary software under
* the Blender License. See http://www.blender.org/BL/ for information
* about this.
*
* 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.
*
* ***** END GPL/BL DUAL LICENSE BLOCK *****
*/
#ifndef BIF_TRANSFORM_H
#define BIF_TRANSFORM_H
/* ******************** Macros & Prototypes *********************** */
/* MODE AND NUMINPUT FLAGS */
#define TFM_INIT -1
#define TFM_DUMMY 0
#define TFM_TRANSLATION 1
#define TFM_ROTATION 2
#define TFM_RESIZE 3
#define TFM_TOSPHERE 4
#define TFM_SHEAR 5
#define TFM_WARP 7
#define TFM_SHRINKFATTEN 8
#define TFM_TILT 9
#define TFM_LAMP_ENERGY 10
#define TFM_TRACKBALL 11
#define TFM_PUSHPULL 12
#define TFM_CREASE 13
#define TFM_MIRROR 14
#define TFM_BONESIZE 15
#define TFM_BONE_ENVELOPE 16
#define TFM_CURVE_SHRINKFATTEN 17
#define TFM_BONE_ROLL 18
#define TFM_TIME_TRANSLATE 19
#define TFM_TIME_SLIDE 20
#define TFM_TIME_SCALE 21
#define TFM_TIME_EXTEND 22
#define TFM_BAKE_TIME 23
/* TRANSFORM CONTEXTS */
#define CTX_NONE 0
#define CTX_TEXTURE 1
#define CTX_EDGE 2
#define CTX_NO_PET 4
#define CTX_TWEAK 8
#define CTX_NO_MIRROR 16
void initTransform(int mode, int context);
void Transform(void);
void Mirror(short mode);
/* Standalone call to get the transformation center corresponding to the current situation
* returns 1 if successful, 0 otherwise (usually means there's no selection)
* (if 0 is returns, *vec is unmodified)
* */
int calculateTransformCenter(int centerMode, float *vec);
struct TransInfo;
struct ScrArea;
struct TransInfo * BIF_GetTransInfo(void);
void BIF_setSingleAxisConstraint(float vec[3], char *text);
void BIF_setDualAxisConstraint(float vec1[3], float vec2[3], char *text);
void BIF_setLocalAxisConstraint(char axis, char *text);
void BIF_setLocalLockConstraint(char axis, char *text);
/* Drawing callbacks */
void BIF_drawConstraint(void);
void BIF_drawPropCircle(void);
void BIF_drawSnap(void);
void BIF_getPropCenter(float *center);
void BIF_TransformSetUndo(char *str);
void BIF_selectOrientation(void);
/* view3d manipulators */
void initManipulator(int mode);
void ManipulatorTransform();
int BIF_do_manipulator(struct ScrArea *sa);
void BIF_draw_manipulator(struct ScrArea *sa);
#endif

View File

@@ -0,0 +1,54 @@
/**
* $Id: BIF_usiblender.h 12552 2007-11-11 15:18:53Z campbellbarton $
*
* ***** BEGIN GPL/BL DUAL LICENSE BLOCK *****
*
* 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
* of the License, or (at your option) any later version. The Blender
* Foundation also sells licenses for use in proprietary software under
* the Blender License. See http://www.blender.org/BL/ for information
* about this.
*
* 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.
*
* ***** END GPL/BL DUAL LICENSE BLOCK *****
*/
#ifndef BIF_USIBLENDER_H
#define BIF_USIBLENDER_H
typedef struct RecentFile {
struct RecentFile *next, *prev;
char *filename;
} RecentFile;
void exit_usiblender(void);
void BIF_init(void);
void BIF_read_file(char *name);
int BIF_read_homefile(int from_memory);
void BIF_read_autosavefile(void);
void BIF_write_file(char *target);
void BIF_write_homefile(void);
void BIF_write_autosave(void);
#endif

View File

@@ -0,0 +1,142 @@
/**
* $Id: BIF_verse.h 9683 2007-01-09 11:50:45Z jiri $
*
* ***** BEGIN GPL/BL DUAL LICENSE BLOCK *****
*
* 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
* of the License, or (at your option) any later version. The Blender
* Foundation also sells licenses for use in proprietary software under
* the Blender License. See http://www.blender.org/BL/ for information
* about this.
*
* 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.
*
* Contributor(s): Jiri Hnidek.
*
* ***** END GPL/BL DUAL LICENSE BLOCK *****
*/
#ifdef WITH_VERSE
#ifndef BIF_VERSE_H
#define BIF_VERSE_H
#include "BKE_verse.h"
#include "DNA_meshdata_types.h"
struct Object;
struct EditMesh;
struct EditVert;
struct EditFace;
struct Mesh;
struct MVert;
struct Mface;
/* verse_object.c */
void unsubscribe_from_obj_node(struct VNode *vnode);
void unsubscribe_from_geom_node(struct VNode *vnode);
void unsubscribe_from_bitmap_node(struct VNode *vnode);
void test_and_send_idbutton_cb(void *obj, void *ob_name);
struct Object *create_object_from_verse_node(struct VNode *vnode);
void b_verse_pop_node(struct VNode *vnode);
void b_verse_unsubscribe(VNode *vnode);
void b_verse_push_object(struct VerseSession *session, struct Object *ob);
void b_verse_delete_object(struct Object *ob);
void b_verse_ms_get(void);
void post_transform_pos(struct VNode *vnode);
void post_transform_rot(struct VNode *vnode);
void post_transform_scale(struct VNode *vnode);
/*void post_transform(struct VNode *vnode);*/
void post_link_set(struct VLink *vlink);
void post_link_destroy(struct VLink *vlink);
void post_object_free_constraint(struct VNode *vnode);
void b_verse_send_transformation(struct Object *ob);
/* verse_mesh.c */
void b_verse_send_vertex_delete(struct EditVert *eve);
void send_versevert_pos(struct VerseVert *vvert);
void b_verse_send_face_delete(struct EditFace *efa);
void sync_all_versefaces_with_editfaces(struct VNode *vnode);
void sync_all_verseverts_with_editverts(struct VNode *vnode);
void createVerseVert(struct EditVert *ev);
void createVerseFace(struct EditFace *efa);
void b_verse_duplicate_object(struct VerseSession *session, struct Object *ob, struct Object *n_ob);
struct VNode *create_geom_vnode_from_geom_vnode(struct VNode *vnode);
struct VNode *create_geom_vnode_data_from_editmesh(struct VerseSession *session, struct EditMesh *em);
struct VNode *create_geom_vnode_data_from_mesh(struct VerseSession *session, struct Mesh *me);
void destroy_unused_geometry(struct VNode *vnode);
void destroy_binding_between_versemesh_and_editmesh(struct VNode *vnode);
void destroy_versemesh(struct VNode *vnode);
void unsubscribe_from_geom_node(struct VNode *vnode);
void create_edit_mesh_from_geom_node(struct VNode *vnode);
struct Mesh *create_mesh_from_geom_node(struct VNode *vnode);
void create_meshdata_from_geom_node(struct Mesh *me, struct VNode *vnode);
/* geometry post callback functions */
void post_layer_create(struct VLayer *vlayer);
void post_layer_destroy(struct VLayer *vlayer);
void post_vertex_create(struct VerseVert *vvert);
void post_vertex_set_xyz(struct VerseVert *vvert);
void post_vertex_delete(struct VerseVert *vvert);
void post_vertex_free_constraint(struct VerseVert *vvert);
void post_polygon_set_uint8(struct VerseFace *vface);
void post_polygon_create(struct VerseFace *vface);
void post_polygon_set_corner(struct VerseFace *vface);
void post_polygon_delete(struct VerseFace *vface);
void post_polygon_free_constraint(struct VerseFace *vface);
void post_geometry_free_constraint(struct VNode *vnode);
/* verse_common.c */
struct VerseSession *session_menu(void);
char *verse_client_name(void);
void post_tag_change(struct VTag *vtag);
void post_taggroup_create(struct VTagGroup *vtaggroup);
void post_node_create(struct VNode *vnode);
void post_node_destroy(struct VNode *vnode);
void post_node_name_set(struct VNode *vnode);
void post_connect_accept(struct VerseSession *session);
void post_connect_terminated(struct VerseSession *session);
void post_connect_update(struct VerseSession *session);
void post_server_add(void);
/* verse_image.c */
void sync_blender_image_with_verse_bitmap_node(struct VNode *vnode);
void post_bitmap_dimension_set(struct VNode *vnode);
void post_bitmap_layer_create(struct VBitmapLayer *vblayer);
void post_bitmap_layer_destroy(struct VBitmapLayer *vblayer);
void post_bitmap_tile_set(struct VBitmapLayer *vblayer, unsigned int xs, unsigned int ys);
#endif
#endif

View File

@@ -0,0 +1,44 @@
/**
* Functions for writing windows avi-format files.
*
* $Id: BIF_writeavicodec.h 6589 2006-01-29 17:46:19Z bjornmose $
*
* ***** BEGIN GPL/BL DUAL LICENSE BLOCK *****
*
* 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
* of the License, or (at your option) any later version. The Blender
* Foundation also sells licenses for use in proprietary software under
* the Blender License. See http://www.blender.org/BL/ for information
* about this.
*
* 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.
*
* ***** END GPL/BL DUAL LICENSE BLOCK *****
*
*/
#ifdef _WIN32
void start_avi_codec(RenderData *rd,int rectx, int recty );
void append_avi_codec(int frame,int *pixels,int rectx, int recty);
void end_avi_codec(void);
int get_avicodec_settings(void);
#endif

View File

@@ -0,0 +1,45 @@
/**
* $Id: BIF_writeimage.h 9376 2006-12-20 17:57:56Z ton $
*
* ***** BEGIN GPL/BL DUAL LICENSE BLOCK *****
*
* 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
* of the License, or (at your option) any later version. The Blender
* Foundation also sells licenses for use in proprietary software under
* the Blender License. See http://www.blender.org/BL/ for information
* about this.
*
* 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.
*
* ***** END GPL/BL DUAL LICENSE BLOCK *****
*/
#ifndef BIF_WRITEIMAGE_H
#define BIF_WRITEIMAGE_H
struct ImBuf;
struct EnvMap;
void BIF_save_rendered_image(char *name);
void BIF_save_rendered_image_fs(void);
void BIF_save_envmap(struct EnvMap *env, char *str);
void save_image_filesel_str(char *str);
#endif

View File

@@ -0,0 +1,41 @@
/**
* $Id: BIF_writemovie.h 229 2002-12-27 13:11:01Z mein $
*
* ***** BEGIN GPL/BL DUAL LICENSE BLOCK *****
*
* 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
* of the License, or (at your option) any later version. The Blender
* Foundation also sells licenses for use in proprietary software under
* the Blender License. See http://www.blender.org/BL/ for information
* about this.
*
* 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.
*
* ***** END GPL/BL DUAL LICENSE BLOCK *****
*/
#ifndef BIF_WRITEMOVIE_H
#define BIF_WRITEMOVIE_H
void start_movie(void);
void append_movie(int fnum);
void end_movie(void);
#endif

View File

@@ -0,0 +1,71 @@
/**
* include/BPI_script.h (jan-2004 ianwill)
*
* $Id: BPI_script.h 4590 2005-06-11 05:30:14Z ianwill $
*
* Header for BPython's script structure. BPI: Blender Python external include
* file.
*
* ***** BEGIN GPL/BL DUAL LICENSE BLOCK *****
*
* 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
* of the License, or (at your option) any later version. The Blender
* Foundation also sells licenses for use in proprietary software under
* the Blender License. See http://www.blender.org/BL/ for information
* about this.
*
* 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.
*
* This is a new part of Blender.
*
* Contributor(s): Willian P. Germano.
*
* ***** END GPL/BL DUAL LICENSE BLOCK *****
*/
#ifndef BPI_SCRIPT_H
#define BPI_SCRIPT_H
//#include "DNA_listBase.h"
#include "DNA_ID.h"
typedef struct Script {
ID id;
void *py_draw;
void *py_event;
void *py_button;
void *py_browsercallback;
void *py_globaldict;
int flags, lastspace;
} Script;
/* Note: a script that registers callbacks in the script->py_* pointers
* above (or calls the file or image selectors) needs to keep its global
* dictionary until Draw.Exit() is called and the callbacks removed.
* Unsetting SCRIPT_RUNNING means the interpreter reached the end of the
* script and returned control to Blender, but we can't get rid of its
* namespace (global dictionary) while SCRIPT_GUI or SCRIPT_FILESEL is set,
* because of the callbacks. The flags and the script name are saved in
* each running script's global dictionary, under '__script__'. */
/* Flags */
#define SCRIPT_RUNNING 0x01
#define SCRIPT_GUI 0x02
#define SCRIPT_FILESEL 0x04
#endif /* BPI_SCRIPT_H */

View File

@@ -0,0 +1,60 @@
/**
* $Id: BSE_drawimasel.h 11920 2007-09-02 17:25:03Z elubie $
*
* ***** BEGIN GPL/BL DUAL LICENSE BLOCK *****
*
* 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
* of the License, or (at your option) any later version. The Blender
* Foundation also sells licenses for use in proprietary software under
* the Blender License. See http://www.blender.org/BL/ for information
* about this.
*
* 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.
*
* ***** END GPL/BL DUAL LICENSE BLOCK *****
*/
#ifndef BSE_DRAWIMASEL_H
#define BSE_DRAWIMASEL_H
/* button events */
#define B_FS_FILENAME 1
#define B_FS_DIRNAME 2
#define B_FS_DIR_MENU 3
#define B_FS_PARDIR 4
#define B_FS_LOAD 5
#define B_FS_CANCEL 6
#define B_FS_LIBNAME 7
#define B_FS_BOOKMARK 8
/* ui geometry */
#define IMASEL_BUTTONS_HEIGHT 60
#define TILE_BORDER_X 8
#define TILE_BORDER_Y 8
struct ScrArea;
struct SpaceImaSel;
void drawimaselspace(struct ScrArea *sa, void *spacedata);
void calc_imasel_rcts(SpaceImaSel *simasel, int winx, int winy);
void do_imasel_buttonevents(short event, SpaceImaSel *simasel);
#endif /* BSE_DRAWIMASEL_H */

View File

@@ -0,0 +1,76 @@
/**
* $Id: BSE_drawipo.h 5523 2005-10-20 14:41:10Z ton $
*
* ***** BEGIN GPL/BL DUAL LICENSE BLOCK *****
*
* 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
* of the License, or (at your option) any later version. The Blender
* Foundation also sells licenses for use in proprietary software under
* the Blender License. See http://www.blender.org/BL/ for information
* about this.
*
* 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.
*
* ***** END GPL/BL DUAL LICENSE BLOCK *****
*/
#ifndef BSE_DRAWIPO_H
#define BSE_DRAWIPO_H
#define IN_2D_VERT_SCROLL(A) (BLI_in_rcti(&G.v2d->vert, A[0], A[1]))
#define IN_2D_HORIZ_SCROLL(A) (BLI_in_rcti(&G.v2d->hor, A[0], A[1]))
#define SELECT_REPLACE 1
#define SELECT_ADD 2
#define SELECT_SUBTRACT 4
#define SELECT_INVERT 16
struct ScrArea;
struct EditIpo;
struct View2D;
struct rctf;
void calc_ipogrid(void);
void draw_ipogrid(void);
void areamouseco_to_ipoco (struct View2D *v2d, short *mval, float *x, float *y);
void ipoco_to_areaco (struct View2D *v2d, float *vec, short *mval);
void ipoco_to_areaco_noclip (struct View2D *v2d, float *vec, short *mval);
void view2d_do_locks (struct ScrArea *cursa, int flag);
void view2d_zoom (struct View2D *v2d, float factor, int winx, int winy);
void test_view2d (struct View2D *v2d, int winx, int winy);
void calc_scrollrcts (struct ScrArea *sa, struct View2D *v2d, int winx, int winy);
int in_ipo_buttons(void);
void draw_view2d_numbers_horiz(int drawframes);
void drawscroll(int disptype);
void drawipospace(struct ScrArea *sa, void *spacedata);
void center_currframe(void);
void scroll_ipobuts(void);
int view2dzoom(unsigned short event);
int view2dmove(unsigned short event);
void view2dborder(void);
struct EditIpo *select_proj_ipo(struct rctf *rectf, int event);
#endif /* BSE_DRAWIPO_H */

View File

@@ -1,5 +1,5 @@
/*
* $Id: bpy_config.h 10546 2007-04-18 14:40:01Z campbellbarton $
/**
* $Id: BSE_drawnla.h 5478 2005-10-10 18:05:30Z ton $
*
* ***** BEGIN GPL/BL DUAL LICENSE BLOCK *****
*
@@ -23,30 +23,30 @@
* The Original Code is Copyright (C) 2001-2002 by NaN Holding BV.
* All rights reserved.
*
* This is a new part of Blender.
* The Original Code is: all of this file.
*
* Contributor(s): Campbell Barton
* Contributor(s): none yet.
*
* ***** END GPL/BL DUAL LICENSE BLOCK *****
*/
*/
#ifndef EXPP_BPY_CONFIG_H
#define EXPP_BPY_CONFIG_H
#ifndef BSE_DRAWNLA_H
#define BSE_DRAWNLA_H
#include <Python.h>
struct ScrArea;
struct Base;
struct gla2DDrawInfo;
struct Object;
/* The Main PyType Object defined in Main.c */
extern PyTypeObject Config_Type;
void drawnlaspace(struct ScrArea *sa, void *spacedata);
void do_nlabuts(unsigned short event);
#define BPy_Config_Check(v) \
((v)->ob_type == &Config_Type)
int count_nla_levels(void);
int nla_filter (struct Base* base);
/* Main sequence, iterate on the libdatas listbase*/
typedef struct {
PyObject_VAR_HEAD /* required python macro */
} BPy_Config;
PyObject *Config_CreatePyObject();
/* changes the gla2d system to map the strip transform */
void map_active_strip(struct gla2DDrawInfo *di, struct Object *ob, int restore);
#endif /* EXPP_BPY_CONFIG_H */
#endif /* BSE_DRAWNLA */

View File

@@ -0,0 +1,50 @@
/**
* $Id: BSE_drawoops.h 6135 2005-12-16 13:50:45Z campbellbarton $
*
* ***** BEGIN GPL/BL DUAL LICENSE BLOCK *****
*
* 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
* of the License, or (at your option) any later version. The Blender
* Foundation also sells licenses for use in proprietary software under
* the Blender License. See http://www.blender.org/BL/ for information
* about this.
*
* 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.
*
* ***** END GPL/BL DUAL LICENSE BLOCK *****
*/
#ifndef BSE_DRAWOOPS_H
#define BSE_DRAWOOPS_H
struct ScrArea;
struct Oops;
void boundbox_oops(short sel);
void give_oopslink_line(struct Oops *oops, struct OopsLink *ol, float *v1, float *v2);
void draw_oopslink(struct Oops *oops);
void draw_icon_oops(float *co, short type);
void mysbox(float x1, float y1, float x2, float y2);
unsigned int give_oops_color(short type, short sel, unsigned int *border);
void calc_oopstext(char *str, float *v1);
void draw_oops(struct Oops *oops);
void drawoopsspace(struct ScrArea *sa, void *spacedata);
#endif /* BSE_DRAWOOPS */

View File

@@ -0,0 +1,88 @@
/**
* $Id: BSE_drawview.h 12747 2007-12-01 19:29:50Z blendix $
*
* ***** BEGIN GPL/BL DUAL LICENSE BLOCK *****
*
* 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
* of the License, or (at your option) any later version. The Blender
* Foundation also sells licenses for use in proprietary software under
* the Blender License. See http://www.blender.org/BL/ for information
* about this.
*
* 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.
*
* ***** END GPL/BL DUAL LICENSE BLOCK *****
*/
#ifndef BSE_DRAWVIEW_H
#define BSE_DRAWVIEW_H
struct Object;
struct BGpic;
struct rctf;
struct ScrArea;
struct ImBuf;
void default_gl_light(void);
void init_gl_stuff(void);
void circf(float x, float y, float rad);
void circ(float x, float y, float rad);
void do_viewbuts(unsigned short event);
/* View3DAfter->type */
#define V3D_XRAY 1
#define V3D_TRANSP 2
void add_view3d_after(struct View3D *v3d, struct Base *base, int type);
void backdrawview3d(int test);
void check_backbuf(void);
unsigned int sample_backbuf(int x, int y);
struct ImBuf *read_backbuf(short xmin, short ymin, short xmax, short ymax);
unsigned int sample_backbuf_rect(short mval[2], int size, unsigned int min, unsigned int max, int *dist, short strict, unsigned int (*indextest)(unsigned int index));
void drawview3dspace(struct ScrArea *sa, void *spacedata);
void drawview3d_render(struct View3D *v3d, int winx, int winy, float winmat[][4]);
int update_time(void);
void calc_viewborder(struct View3D *v3d, struct rctf *viewborder_r);
void view3d_set_1_to_1_viewborder(struct View3D *v3d);
int view3d_test_clipping(struct View3D *v3d, float *vec);
void view3d_set_clipping(struct View3D *v3d);
void view3d_clr_clipping(void);
void sumo_callback(void *obp);
void init_anim_sumo(void);
void update_anim_sumo(void);
void end_anim_sumo(void);
void inner_play_anim_loop(int init, int mode);
int play_anim(int mode);
void make_axis_color(char *col, char *col2, char axis);
/* SMOOTHVIEW */
void smooth_view(struct View3D *v3d, float *ofs, float *quat, float *dist, float *lens);
void smooth_view_to_camera(struct View3D *v3d);
void view_settings_from_ob(struct Object *ob, float *ofs, float *quat, float *dist, float *lens);
void object_view_settings(struct Object *ob, float *lens, float *clipsta, float *clipend);
#endif /* BSE_DRAWVIEW_H */

View File

@@ -0,0 +1,55 @@
/**
* $Id: BSE_edit.h 10524 2007-04-14 13:18:24Z campbellbarton $
*
* ***** BEGIN GPL/BL DUAL LICENSE BLOCK *****
*
* 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
* of the License, or (at your option) any later version. The Blender
* Foundation also sells licenses for use in proprietary software under
* the Blender License. See http://www.blender.org/BL/ for information
* about this.
*
* 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.
*
* ***** END GPL/BL DUAL LICENSE BLOCK *****
*/
#ifndef BSE_EDIT_H
#define BSE_EDIT_H
struct Object;
struct rcti;
int get_border(struct rcti *rect, short col);
void countall(void);
void snapmenu(void);
void mergemenu(void);
void delete_context_selected(void);
void duplicate_context_selected(void);
void toggle_shading(void);
int minmax_verts(float *min, float *max);
void snap_sel_to_grid(void);
void snap_sel_to_curs(void);
void snap_curs_to_grid(void);
void snap_curs_to_sel(void);
void snap_to_center(void);
#endif /* BSE_EDIT_H */

View File

@@ -0,0 +1,77 @@
/**
* $Id: BIF_editaction.h 10519 2007-04-13 11:15:08Z aligorith $
*
* ***** BEGIN GPL/BL DUAL LICENSE BLOCK *****
*
* 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
* of the License, or (at your option) any later version. The Blender
* Foundation also sells licenses for use in proprietary software under
* the Blender License. See http://www.blender.org/BL/ for information
* about this.
*
* 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): 2007, Joshua Leung (major Action Editor recode)
*
* ***** END GPL/BL DUAL LICENSE BLOCK *****
*/
#ifndef BIF_EDITACTION_TYPES_H
#define BIF_EDITACTION_TYPES_H
/******************************************************* */
/* FILTERED ACTION DATA - TYPES */
/* types of keyframe data in ActListElem */
#define ALE_NONE 0
#define ALE_IPO 1
#define ALE_ICU 2
/* This struct defines a structure used for quick access */
typedef struct bActListElem {
struct bActListElem *next, *prev;
void *data; /* source data this elem represents */
int type; /* one of the ACTTYPE_* values */
int flag; /* copy of elem's flags for quick access */
int index; /* copy of adrcode where applicable */
void *key_data; /* motion data - ipo or ipo-curve */
short datatype; /* type of motion data to expect */
void *owner; /* will either be an action channel or fake ipo-channel (for keys) */
short ownertype; /* type of owner */
} bActListElem;
/******************************************************* */
/* FILTER ACTION DATA - METHODS/TYPES */
/* filtering flags - under what circumstances should a channel be added */
#define ACTFILTER_VISIBLE 0x001 /* should channels be visible */
#define ACTFILTER_SEL 0x002 /* should channels be selected */
#define ACTFILTER_FOREDIT 0x004 /* does editable status matter */
#define ACTFILTER_CHANNELS 0x008 /* do we only care that it is a channel */
#define ACTFILTER_IPOKEYS 0x010 /* only channels referencing ipo's */
#define ACTFILTER_ONLYICU 0x020 /* only reference ipo-curves */
#define ACTFILTER_FORDRAWING 0x040 /* make list for interface drawing */
/* Action Editor - Main Data types */
#define ACTCONT_NONE 0
#define ACTCONT_ACTION 1
#define ACTCONT_SHAPEKEY 2
#endif

View File

@@ -0,0 +1,179 @@
/**
* $Id: BSE_editipo.h 12703 2007-11-28 12:11:06Z ton $
*
* ***** BEGIN GPL/BL DUAL LICENSE BLOCK *****
*
* 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
* of the License, or (at your option) any later version. The Blender
* Foundation also sells licenses for use in proprietary software under
* the Blender License. See http://www.blender.org/BL/ for information
* about this.
*
* 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.
*
* ***** END GPL/BL DUAL LICENSE BLOCK *****
*/
#ifndef BSE_EDITIPO_H
#define BSE_EDITIPO_H
struct TransVert;
struct IpoCurve;
struct BezTriple;
struct Ipo;
struct EditIpo;
struct ID;
struct ListBase;
struct Object;
struct IpoKey;
struct TransOb;
struct Tex;
struct TransInfo;
void remake_object_ipos(struct Object *ob);
char *getname_ac_ei(int nr);
char *getname_co_ei(int nr);
char *getname_ob_ei(int nr, int colipo);
char *getname_mtex_ei(int nr);
char *getname_tex_ei(int nr);
char *getname_mat_ei(int nr);
char *getname_world_ei(int nr);
char *getname_seq_ei(int nr);
char *getname_cu_ei(int nr);
char *getname_la_ei(int nr);
char *getname_cam_ei(int nr);
char *getname_snd_ei(int nr);
char *getname_fluidsim_ei(int nr);
char *getname_part_ei(int nr);
char *getname_ipocurve(struct IpoCurve *icu, struct Object *ob);
int geticon_ipo_blocktype(short blocktype);
struct EditIpo *get_active_editipo(void);
void boundbox_ipocurve(struct IpoCurve *icu, int selectedonly);
void boundbox_ipo(struct Ipo *ipo, struct rctf *bb, int selectedonly);
void editipo_changed(struct SpaceIpo *si, int doredraw);
void scale_editipo(void);
unsigned int ipo_rainbow(int cur, int tot);
void test_editipo(int doit);
void get_status_editipo(void);
void update_editipo_flags(void);
void set_editflag_editipo(void);
void ipo_toggle_showkey(void);
void swap_selectall_editipo(void);
void swap_visible_editipo(void);
void deselectall_editipo(void);
void move_to_frame(void);
void do_ipowin_buts(short event);
void do_ipo_selectbuttons(void);
/* gets ipo curve, creates if needed */
struct IpoCurve *verify_ipocurve(struct ID *, short, char *, char *, char *, int);
struct Ipo *verify_ipo(struct ID *, short, char *, char *, char *);
int texchannel_to_adrcode(int channel);
int insert_bezt_icu(struct IpoCurve *icu, struct BezTriple *bezt);
void insert_vert_icu(struct IpoCurve *icu, float x, float y, short fast);
void add_vert_ipo(void);
void add_duplicate_editipo(void);
void remove_doubles_ipo(void);
void clean_ipo(void);
void clean_ipo_curve(struct IpoCurve *icu);
void smooth_ipo(void);
void join_ipo_menu(void);
void join_ipo(int mode);
void ipo_snap_menu(void);
void ipo_snap(short event);
void ipo_mirror_menu(void);
void ipo_mirror(short event);
void mouse_select_ipo(void);
void sethandles_ipo(int code);
void select_ipo_bezier_keys(struct Ipo *ipo, int selectmode);
void select_icu_bezier_keys(struct IpoCurve *icu, int selectmode);
void set_ipotype(void);
void borderselect_ipo(void);
void del_ipo(int need_check);
void del_ipoCurve ( struct IpoCurve * icu );
void free_ipocopybuf(void);
void copy_editipo(void);
void paste_editipo(void);
void set_exprap_ipo(int mode);
void set_speed_editipo(float speed);
void insertkey(ID *id, int blocktype, char *actname, char *constname, int adrcode, short fast);
void insertkey_smarter(ID *id, int blocktype, char *actname, char *constname, int adrcode);
void insertkey_editipo(void);
void common_insertkey(void);
void free_ipokey(struct ListBase *lb);
void add_to_ipokey(struct ListBase *lb, struct BezTriple *bezt, int nr, int len);
void make_ipokey(void);
void make_ipokey_spec(struct ListBase *lb, struct Ipo *ipo);
void make_ipokey_transform(struct Object *ob, struct ListBase *lb, int sel);
void update_ipokey_val(void);
void set_tob_old(float *old, float *poin);
void set_ipo_pointers_transob(struct IpoKey *ik, struct TransOb *tob);
void nextkey(struct ListBase *elems, int dir);
void movekey_ipo(int dir);
void movekey_obipo(int dir);
void nextkey_ipo(int dir);
void nextkey_obipo(int dir);
void filter_sampledata(float *data, int sfra, int efra);
void sampledata_to_ipocurve(float *data, int sfra, int efra, struct IpoCurve *icu);
void ipo_record(void);
void make_ipo_transdata(struct TransInfo *t);
void remake_ipo_transdata(struct TransInfo *t);
void transform_ipo(int mode);
void actstrip_map_ipo_keys(struct Object *ob, struct Ipo *ipo, short restore, short only_keys);
void sethandles_ipo_keys(struct Ipo *ipo, int code);
void snap_ipo_keys(struct Ipo *ipo, short snaptype);
void mirror_ipo_keys(struct Ipo *ipo, short mirror_mode);
void setipotype_ipo(struct Ipo *ipo, int code);
void set_ipo_key_selection(struct Ipo *ipo, int sel);
int is_ipo_key_selected(struct Ipo *ipo);
void delete_icu_key(struct IpoCurve *icu, int index);
void delete_ipo_keys(struct Ipo *ipo);
int fullselect_ipo_keys(struct Ipo *ipo);
int add_trans_ipo_keys(struct Ipo *ipo, struct TransVert *tv, int tvtot);
void duplicate_ipo_keys(struct Ipo *ipo);
void borderselect_ipo_key(struct Ipo *ipo, float xmin, float xmax, int val);
void borderselect_icu_key(struct IpoCurve *icu, float xmin, float xmax,
int (*select_function)(struct BezTriple *));
int insertmatrixkey(ID *id, int blocktype, char *actname, char *constname, int adrcode);
void insertfloatkey(ID *id, int blocktype, char *actname, char *constname, int adrcode, float floatkey);
void select_ipo_key(struct Ipo *ipo, float selx, int sel);
void select_icu_key(struct IpoCurve *icu, float selx, int selectmode);
void setexprap_ipoloop(struct Ipo *ipo, int code);
/* callbacks */
int select_bezier_add(struct BezTriple *bezt);
int select_bezier_subtract(struct BezTriple *bezt);
int select_bezier_invert(struct BezTriple *bezt);
#endif /* BSE_EDITIPO_H */

View File

@@ -0,0 +1,53 @@
/**
* $Id: BSE_editipo_types.h 2747 2004-07-05 09:15:02Z jesterking $
*
* ***** BEGIN GPL/BL DUAL LICENSE BLOCK *****
*
* 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
* of the License, or (at your option) any later version. The Blender
* Foundation also sells licenses for use in proprietary software under
* the Blender License. See http://www.blender.org/BL/ for information
* about this.
*
* 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.
*
* ***** END GPL/BL DUAL LICENSE BLOCK *****
*/
#ifndef BSE_EDITIPO_TYPES_H
#define BSE_EDITIPO_TYPES_H
struct BezTriple;
typedef struct IpoKey {
struct IpoKey *next, *prev;
short flag, rt;
float val;
struct BezTriple **data;
} IpoKey;
typedef struct EditIpo {
char name[32]; // same length as keyblock->name
IpoCurve *icu;
short adrcode, flag;
short disptype, rt;
unsigned int col;
} EditIpo;
#endif /* BSE_EDITIPO_TYPES_H */

View File

@@ -0,0 +1,41 @@
/**
* $Id: BSE_editnla_types.h 5478 2005-10-10 18:05:30Z ton $
*
* ***** BEGIN GPL/BL DUAL LICENSE BLOCK *****
*
* 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
* of the License, or (at your option) any later version. The Blender
* Foundation also sells licenses for use in proprietary software under
* the Blender License. See http://www.blender.org/BL/ for information
* about this.
*
* 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.
*
* ***** END GPL/BL DUAL LICENSE BLOCK *****
*/
#ifndef BSE_EDITNLA_TYPES_H
#define BSE_EDITNLA_TYPES_H
#define NLAWIDTH 196
#define NLACHANNELHEIGHT 16
#define NLACHANNELSKIP 1
#endif /* BSE_EDITNLA_TYPES_H */

View File

@@ -0,0 +1,66 @@
/**
* $Id: BSE_filesel.h 11920 2007-09-02 17:25:03Z elubie $
*
* ***** BEGIN GPL/BL DUAL LICENSE BLOCK *****
*
* 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
* of the License, or (at your option) any later version. The Blender
* Foundation also sells licenses for use in proprietary software under
* the Blender License. See http://www.blender.org/BL/ for information
* about this.
*
* 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.
*
* ***** END GPL/BL DUAL LICENSE BLOCK *****
*
*/
#ifndef BSE_FILESEL_H
#define BSE_FILESEL_H
struct SpaceFile;
struct direntry;
struct ID;
struct ScrArea;
struct BWinEvent;
void filesel_statistics(struct SpaceFile *sfile, int *totfile, int *selfile, float *totlen, float *sellen);
void test_flags_file(struct SpaceFile *sfile);
void sort_filelist(struct SpaceFile *sfile);
void read_dir(struct SpaceFile *sfile);
void freefilelist(struct SpaceFile *sfile);
void parent(struct SpaceFile *sfile);
void swapselect_file(struct SpaceFile *sfile);
void drawfilespace(struct ScrArea *sa, void *spacedata);
void activate_fileselect(int type, char *title, char *file, void (*func)(char *));
void activate_fileselect_menu(int type, char *title, char *file, char *pupmenu, short *menup, void (*func)(char *));
void activate_fileselect_args(int type, char *title, char *file, void (*func)(char *, void *, void *), void *arg1, void *arg2);
void activate_databrowse(struct ID *id, int idcode, int fromcode, int retval, short *menup, void (*func)(unsigned short));
void activate_databrowse_args(struct ID *id, int idcode, int fromcode, short *menup, void (*func)(char *, void *, void *), void *arg1, void *arg2);
void filesel_prevspace(void);
void free_filesel_spec(char *dir);
void winqreadfilespace(struct ScrArea *sa, void *spacedata, struct BWinEvent *evt);
void main_to_filelist(struct SpaceFile *sfile);
void clever_numbuts_filesel(void);
#endif

View File

@@ -0,0 +1,158 @@
/**
* $Id: BSE_headerbuttons.h 10893 2007-06-08 14:17:13Z jiri $
*
* ***** BEGIN GPL/BL DUAL LICENSE BLOCK *****
*
* 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
* of the License, or (at your option) any later version. The Blender
* Foundation also sells licenses for use in proprietary software under
* the Blender License. See http://www.blender.org/BL/ for information
* about this.
*
* 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.
*
* ***** END GPL/BL DUAL LICENSE BLOCK *****
*/
#ifndef BSE_HEADERBUTTONS_H
#define BSE_HEADERBUTTONS_H
struct uiBlock;
struct ScrArea;
struct ID;
struct SpaceIpo;
struct Ipo;
/* these used to be in blender/src/headerbuttons.c: */
#define XIC 20
#define YIC 20
int std_libbuttons(struct uiBlock *block,
short xco, short yco, int pin, short *pinpoin,
int browse, short id_code, short special, struct ID *id, struct ID *parid,
short *menupoin, int users,
int lib, int del, int autobut, int keepbut);
char *windowtype_pup(void);
int GetButStringLength(char *str);
void load_space_sound(char *str);
void load_sound_buttons(char *str);
/* end of declarations moved from old headerbuttons.c */
void update_for_newframe_muted(void);
void update_for_newframe_nodraw(int nosound);
void free_matcopybuf(void);
void clear_matcopybuf(void);
void write_vrml_fs(void);
void write_dxf_fs(void);
void write_stl_fs(void);
int buttons_do_unpack(void);
struct Scene *copy_scene(struct Scene *sce, int level);
void buttons_active_id(struct ID **id, struct ID **idfrom);
int start_progress_bar(void);
void end_progress_bar(void);
int progress_bar(float done, char *busy_info);
void update_for_newframe(void);
void action_buttons(void);
void buts_buttons(void);
void file_buttons(void);
void image_buttons(void);
void imasel_buttons(void);
void info_buttons(void);
void ipo_buttons(void);
void nla_buttons(void);
void oops_buttons(void);
void seq_buttons(void);
void sound_buttons(void);
void text_buttons(void);
void script_buttons(void);
void view3d_buttons(void);
void time_buttons(struct ScrArea *sa);
void node_buttons(struct ScrArea *sa);
void do_global_buttons(unsigned short event);
void do_global_buttons2(short event);
void do_action_buttons(unsigned short event);
void do_buts_buttons(short event);
void do_file_buttons(short event);
void do_image_buttons(unsigned short event);
void do_imasel_buttons(short event);
void do_info_buttons(unsigned short event);
void do_ipo_buttons(short event);
void do_layer_buttons(short event);
void do_nla_buttons(unsigned short event);
void do_oops_buttons(short event);
void do_seq_buttons(short event);
void do_sound_buttons(unsigned short event);
void do_text_buttons(unsigned short event);
void do_script_buttons(unsigned short event);
void do_view3d_buttons(short event);
void do_time_buttons(struct ScrArea *sa, unsigned short event);
void do_node_buttons(struct ScrArea *sa, unsigned short event);
void do_headerbuttons(short event);
/* header_ipo.c */
void spaceipo_assign_ipo(struct SpaceIpo *si, struct Ipo *ipo);
/* header_text.c */
void do_text_editmenu_to3dmenu(void *arg, int event);
void do_text_formatmenu_convert(void *arg, int event);
/* header_info.c */
void do_info_add_meshmenu(void *arg, int event);
void do_info_add_curvemenu(void *arg, int event);
void do_info_add_surfacemenu(void *arg, int event);
void do_info_add_metamenu(void *arg, int event);
void do_info_add_lampmenu(void *arg, int event);
void do_info_addmenu(void *arg, int event);
/* header_node.c */
void do_node_addmenu(void *arg, int event);
/* header_view3d.c */
void do_view3d_select_objectmenu(void *arg, int event);
void do_view3d_select_object_groupedmenu(void *arg, int event);
void do_view3d_select_object_linkedmenu(void *arg, int event);
void do_view3d_select_object_layermenu(void *arg, int event);
void do_view3d_select_object_typemenu(void *arg, int event);
void do_view3d_select_faceselmenu(void *arg, int event);
void do_view3d_select_meshmenu(void *arg, int event);
void do_view3d_select_curvemenu(void *arg, int event);
void do_view3d_select_metaballmenu(void *arg, int event);
void do_view3d_edit_snapmenu(void *arg, int event);
void do_view3d_edit_mirrormenu(void *arg, int event);
void do_view3d_transform_moveaxismenu(void *arg, int event);
void do_view3d_transform_rotateaxismenu(void *arg, int event);
void do_view3d_transform_scaleaxismenu(void *arg, int event);
void do_view3d_object_mirrormenu(void *arg, int event);
void do_view3d_edit_mesh_normalsmenu(void *arg, int event);
void do_view3d_edit_mesh_verticesmenu(void *arg, int event);
void do_view3d_edit_mesh_edgesmenu(void *arg, int event);
void do_view3d_edit_mesh_facesmenu(void *arg, int event);
void do_view3d_edit_curve_segmentsmenu(void *arg, int event);
void do_view3d_edit_curve_showhidemenu(void *arg, int event);
#endif /* BSE_HEADERBUTTONS_H */

View File

@@ -0,0 +1,137 @@
/**
* $Id:
*
* ***** BEGIN GPL LICENSE BLOCK *****
*
* 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
* of the License, or (at your opt ion) any later version.
*
* 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) 2005 Blender Foundation.
* All rights reserved.
*
* The Original Code is: all of this file.
*
* Contributor(s): none yet.
*
* ***** END GPL BLOCK *****
*/
#ifndef BSE_NODE_H
#define BSE_NODE_H
/* ********** drawing sizes *********** */
#define NODE_DY 20
#define NODE_DYS 10
#define NODE_SOCKSIZE 5
#define BASIS_RAD 8.0f
#define HIDDEN_RAD 15.0f
struct SpaceNode;
struct bNode;
struct bNodeTree;
struct Material;
struct ID;
struct Scene;
struct Image;
struct ImageUser;
/* ************* API for editnode.c *********** */
/* helper calls to retreive active context for buttons, does groups */
struct Material *editnode_get_active_material(struct Material *ma);
struct bNode *editnode_get_active_idnode(struct bNodeTree *ntree, short id_code);
struct bNode *editnode_get_active(struct bNodeTree *ntree);
void snode_tag_dirty(struct SpaceNode *snode);
void snode_set_context(struct SpaceNode *snode);
void snode_home(struct ScrArea *sa, struct SpaceNode *snode);
void snode_zoom_in(struct ScrArea *sa);
void snode_zoom_out(struct ScrArea *sa);
void node_deselectall(struct SpaceNode *snode, int swap);
void node_border_select(struct SpaceNode *snode);
void node_delete(struct SpaceNode *snode);
void node_make_group(struct SpaceNode *snode);
void node_ungroup(struct SpaceNode *snode);
void snode_make_group_editable(struct SpaceNode *snode, struct bNode *gnode);
void node_hide(struct SpaceNode *snode);
void node_read_renderlayers(struct SpaceNode *snode);
void clear_scene_in_nodes(struct Scene *sce);
void node_transform_ext(int mode, int unused);
void node_shader_default(struct Material *ma);
void node_composit_default(struct Scene *scene);
int node_has_hidden_sockets(struct bNode *node);
struct bNode *node_add_node(struct SpaceNode *snode, int type, float locx, float locy);
void node_adduplicate(struct SpaceNode *snode);
void snode_autoconnect(struct SpaceNode *snode, struct bNode *node_to, int flag);
void node_select_linked(struct SpaceNode *snode, int out);
struct ImageUser *ntree_get_active_iuser(struct bNodeTree *ntree);
void imagepaint_composite_tags(struct bNodeTree *ntree, struct Image *image, struct ImageUser *iuser);
/* ************* drawnode.c *************** */
struct SpaceNode;
struct bNodeLink;
void node_draw_link(struct SpaceNode *snode, struct bNodeLink *link);
void init_node_butfuncs(void);
/* exported to CMP and SHD nodes */
//void node_ID_title_cb(void *node_v, void *unused_v);
//void node_but_title_cb(void *node_v, void *but_v);
//void node_texmap_cb(void *texmap_v, void *unused_v);
//void node_new_mat_cb(void *ntree_v, void *node_v);
//void node_browse_mat_cb(void *ntree_v, void *node_v);
//void node_mat_alone_cb(void *node_v, void *unused);
//void node_browse_image_cb(void *ntree_v, void *node_v);
//void node_active_cb(void *ntree_v, void *node_v);
//void node_image_type_cb(void *node_v, void *unused);
//char *node_image_type_pup(void);
//char *layer_menu(struct RenderResult *rr);
//void image_layer_cb(void *ima_v, void *iuser_v);
//void set_render_layers_title(void *node_v, void *unused);
//char *scene_layer_menu(struct Scene *sce);
//void node_browse_scene_cb(void *ntree_v, void *node_v);
//int node_buts_curvevec(struct uiBlock *block, struct bNodeTree *ntree, struct bNode *node, struct rctf *butr);
//int node_buts_curvecol(struct uiBlock *block, struct bNodeTree *ntree, struct bNode *node, struct rctf *butr);
//int node_buts_rgb(struct uiBlock *block, struct bNodeTree *ntree, struct bNode *node, struct rctf *butr);
//int node_buts_texture(struct uiBlock *block, struct bNodeTree *ntree, struct bNode *node, struct rctf *butr);
//int node_buts_valtorgb(struct uiBlock *block, struct bNodeTree *ntree, struct bNode *node, struct rctf *butr);
//int node_buts_value(struct uiBlock *block, struct bNodeTree *ntree, struct bNode *node, struct rctf *butr);
//int node_buts_mix_rgb(struct uiBlock *block, struct bNodeTree *ntree, struct bNode *node, struct rctf *butr);
//int node_buts_group(struct uiBlock *block, struct bNodeTree *ntree, struct bNode *node, struct rctf *butr);
//int node_buts_normal(struct uiBlock *block, struct bNodeTree *ntree, struct bNode *node, struct rctf *butr);
//int node_buts_math(struct uiBlock *block, struct bNodeTree *ntree, struct bNode *node, struct rctf *butr) ;
/* ************* Shader nodes ***************** */
#endif

View File

@@ -0,0 +1,53 @@
/**
* ***** BEGIN GPL/BL DUAL LICENSE BLOCK *****
*
* 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
* of the License, or (at your option) any later version. The Blender
* Foundation also sells licenses for use in proprietary software under
* the Blender License. See http://www.blender.org/BL/ for information
* about this.
*
* 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) 2003 by NaN Holding BV.
* All rights reserved.
*
* The Original Code is: all of this file.
*
* Contributor(s): none yet.
*
* ***** END GPL/BL DUAL LICENSE BLOCK *****
*
*/
#ifndef BSE_SEQAUDIO_H
#define BSE_SEQAUDIO_H
#include "SDL.h"
/* muha, we don't init (no SDL_main)! */
#ifdef main
# undef main
#endif
#include "DNA_sound_types.h"
void audio_mixdown();
void audio_makestream(bSound *sound);
void audiostream_play(Uint32 startframe, Uint32 duration, int mixdown);
void audiostream_fill(Uint8* mixdown, int len);
void audiostream_start(Uint32 frame);
void audiostream_scrub(Uint32 frame);
void audiostream_stop(void);
int audiostream_pos(void);
#endif

View File

@@ -0,0 +1,96 @@
/**
* $Id: BSE_seqeffects.h 9554 2006-12-31 15:38:14Z schlaile $
*
* ***** BEGIN GPL/BL DUAL LICENSE BLOCK *****
*
* 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
* of the License, or (at your option) any later version. The Blender
* Foundation also sells licenses for use in proprietary software under
* the Blender License. See http://www.blender.org/BL/ for information
* about this.
*
* 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): Peter Schlaile < peter [at] schlaile [dot] de >
*
* ***** END GPL/BL DUAL LICENSE BLOCK *****
*
*/
#ifndef BSE_SEQUENCE_EFFECTS_H
#define BSE_SEQUENCE_EFFECTS_H
/* Wipe effect */
enum {DO_SINGLE_WIPE, DO_DOUBLE_WIPE, DO_BOX_WIPE, DO_CROSS_WIPE,
DO_IRIS_WIPE,DO_CLOCK_WIPE};
struct Sequence;
struct ImBuf;
struct SeqEffectHandle {
/* constructors & destructor */
/* init & init_plugin are _only_ called on first creation */
void (*init)(struct Sequence *seq);
void (*init_plugin)(struct Sequence * seq, const char * fname);
/* number of input strips needed
(called directly after construction) */
int (*num_inputs)();
/* load is called first time after readblenfile in
get_sequence_effect automatically */
void (*load)(struct Sequence *seq);
/* duplicate */
void (*copy)(struct Sequence *dst, struct Sequence * src);
/* destruct */
void (*free)(struct Sequence *seq);
/* returns: -1: no input needed,
0: no early out,
1: out = ibuf1,
2: out = ibuf2 */
int (*early_out)(struct Sequence *seq,
float facf0, float facf1);
/* stores the y-range of the effect IPO */
void (*store_icu_yrange)(struct Sequence * seq,
short adrcode, float * ymin, float * ymax);
/* stores the default facf0 and facf1 if no IPO is present */
void (*get_default_fac)(struct Sequence * seq, int cfra,
float * facf0, float * facf1);
/* execute the effect
sequence effects are only required to either support
float-rects or byte-rects
(mixed cases are handled one layer up...) */
void (*execute)(struct Sequence *seq, int cfra,
float facf0, float facf1,
int x, int y,
struct ImBuf *ibuf1, struct ImBuf *ibuf2,
struct ImBuf *ibuf3, struct ImBuf *out);
};
struct SeqEffectHandle get_sequence_effect(struct Sequence * seq);
int get_sequence_effect_num_inputs(int seq_type);
void sequence_effect_speed_rebuild_map(struct Sequence * seq, int force);
#endif

View File

@@ -0,0 +1,38 @@
/**
* $Id: BSE_seqscopes.h 6983 2006-03-07 20:01:12Z schlaile $
*
* ***** BEGIN GPL LICENSE BLOCK *****
*
* 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
* of the License, or (at your option) any later version. The Blender
* Foundation also sells licenses for use in proprietary software under
* the Blender License. See http://www.blender.org/BL/ for information
* about this.
*
* 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.
*
* Author: Peter Schlaile < peter [at] schlaile [dot] de >
*
* ***** END GPL LICENSE BLOCK *****
*
*/
#ifndef BSE_SEQUENCE_SCOPES_H
#define BSE_SEQUENCE_SCOPES_H
struct ImBuf;
struct ImBuf *make_waveform_view_from_ibuf(struct ImBuf * ibuf);
struct ImBuf *make_vectorscope_view_from_ibuf(struct ImBuf * ibuf);
#endif

View File

@@ -0,0 +1,89 @@
/**
* $Id: BSE_sequence.h 12615 2007-11-18 17:39:30Z schlaile $
*
* ***** BEGIN GPL/BL DUAL LICENSE BLOCK *****
*
* 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
* of the License, or (at your option) any later version. The Blender
* Foundation also sells licenses for use in proprietary software under
* the Blender License. See http://www.blender.org/BL/ for information
* about this.
*
* 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.
*
* ***** END GPL/BL DUAL LICENSE BLOCK *****
*
*/
#ifndef BSE_SEQUENCE_H
#define BSE_SEQUENCE_H
struct PluginSeq;
struct StripElem;
struct TStripElem;
struct Strip;
struct Sequence;
struct ListBase;
struct Editing;
struct ImBuf;
struct Scene;
void free_tstripdata(int len, struct TStripElem *se);
void free_strip(struct Strip *strip);
void new_tstripdata(struct Sequence *seq);
void free_sequence(struct Sequence *seq);
void build_seqar(struct ListBase *seqbase, struct Sequence ***seqar, int *totseq);
void free_editing(struct Editing *ed);
void calc_sequence(struct Sequence *seq);
void calc_sequence_disp(struct Sequence *seq);
void sort_seq(void);
void clear_scene_in_allseqs(struct Scene *sce);
int evaluate_seq_frame(int cfra);
struct StripElem *give_stripelem(struct Sequence *seq, int cfra);
struct TStripElem *give_tstripelem(struct Sequence *seq, int cfra);
void set_meta_stripdata(struct Sequence *seqm);
struct ImBuf *give_ibuf_seq(int rectx, int recty, int cfra, int chansel);
/* chansel: render this channel. Default=0 (renders end result)*/
struct ImBuf *give_ibuf_seq_direct(int rectx, int recty, int cfra,
struct Sequence * seq);
/* sequence prefetch API */
void seq_start_threads();
void seq_stop_threads();
void give_ibuf_prefetch_request(int rectx, int recty, int cfra, int chanshown);
void seq_wait_for_prefetch_ready();
struct ImBuf * give_ibuf_seq_threaded(int rectx, int recty, int cfra,
int chanshown);
void free_imbuf_seq_except(int cfra);
void free_imbuf_seq_with_ipo(struct Ipo * ipo);
void free_imbuf_seq(void);
void update_changed_seq_and_deps(struct Sequence *seq, int len_change, int ibuf_change);
/* still bad level call... */
struct RenderResult;
void do_render_seq(struct RenderResult *rr, int cfra);
#endif

View File

@@ -0,0 +1,71 @@
/**
* $Id:
*
* ***** BEGIN GPL/BL DUAL LICENSE BLOCK *****
*
* 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
* of the License, or (at your opt ion) any later version. The Blender
* Foundation also sells licenses for use in proprietary software under
* the Blender License. See http://www.blender.org/BL/ for information
* about this.
*
* 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) 2005 Blender Foundation.
* All rights reserved.
*
* The Original Code is: all of this file.
*
* Contributor(s): none yet.
*
* ***** END GPL/BL DUAL LICENSE BLOCK *****
*/
#ifndef BSE_TIME_H
#define BSE_TIME_H
struct ListBase;
struct View2D;
/* ******** Markers - General Api ********* */
void add_marker(int frame);
void duplicate_marker(void);
void remove_marker(void);
void rename_marker(void);
void transform_markers(int mode, int smode);
void borderselect_markers(void);
void deselect_markers(short test, short sel);
struct TimeMarker *find_nearest_marker(int clip_y);
void nextprev_marker(short dir);
void get_minmax_markers(short sel, float *first, float *last);
int find_nearest_marker_time(float dx);
void add_marker_to_cfra_elem(struct ListBase *lb, struct TimeMarker *marker, short only_sel);
void make_marker_cfra_list(struct ListBase *lb, short only_sel);
void draw_markers_timespace(int lines);
TimeMarker *get_frame_marker(int frame);
/* ******** Animation - Preview Range ************* */
void anim_previewrange_set(void);
void anim_previewrange_clear(void);
void draw_anim_preview_timespace(void);
/* *********** TimeLine Specific ***************/
void timeline_frame_to_center(void);
void nextprev_timeline_key(short dir);
#endif

View File

@@ -0,0 +1,90 @@
/**
* $Id: BSE_trans_types.h 12441 2007-10-31 13:56:07Z ton $
*
* ***** BEGIN GPL/BL DUAL LICENSE BLOCK *****
*
* 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
* of the License, or (at your option) any later version. The Blender
* Foundation also sells licenses for use in proprietary software under
* the Blender License. See http://www.blender.org/BL/ for information
* about this.
*
* 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.
*
* ***** END GPL/BL DUAL LICENSE BLOCK *****
*/
#ifndef BSE_TRANS_TYPES_H
#define BSE_TRANS_TYPES_H
struct Object;
struct MDeformVert;
struct ColorBand;
typedef struct TransOb {
float *loc;
float oldloc[9];
float *eff;
float oldeff[3];
float *rot;
float oldrot[12];
float olddrot[3];
float *quat;
float oldquat[16];
float olddquat[4];
float *size;
float oldsize[12];
float olddsize[3];
float obmat[3][3];
float obinv[3][3];
float parmat[3][3];
float parinv[3][3];
float obvec[3];
int flag; /* keys */
float *locx, *locy, *locz;
float *rotx, *roty, *rotz;
float *quatx, *quaty, *quatz, *quatw;
float *sizex, *sizey, *sizez;
/* __NLA */
float axismat[3][3]; /* Restmat of object (for localspace transforms) */
void *data; /* Arbitrary data */
/* end __NLA */
struct Object *ob;
} TransOb;
typedef struct TransVert {
float *loc;
float oldloc[3], fac;
float *val, oldval;
int flag;
float *nor;
} TransVert;
typedef struct VPaint {
float r, g, b, a;
float size; /* of brush */
float gamma, mul;
short mode, flag;
int tot, pad; /* allocation size of prev buffers */
unsigned int *vpaint_prev; /* previous mesh colors */
struct MDeformVert *wpaint_prev; /* previous vertex weights */
} VPaint;
#endif /* BSE_TRANS_TYPES_H */

View File

@@ -0,0 +1,69 @@
/**
* $Id: BSE_types.h 8957 2006-11-20 04:28:02Z blendix $
*
* ***** BEGIN GPL/BL DUAL LICENSE BLOCK *****
*
* 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
* of the License, or (at your option) any later version. The Blender
* Foundation also sells licenses for use in proprietary software under
* the Blender License. See http://www.blender.org/BL/ for information
* about this.
*
* 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.
*
* ***** END GPL/BL DUAL LICENSE BLOCK *****
*/
/* forward declarations for some prototype header */
/* these may wildly occur in other header files, too */
struct BGpic;
struct SpaceText;
struct Oops;
struct OopsLink;
struct uiBlock;
struct BoundBox;
struct Image;
struct ImBuf;
struct SpaceImaSel;
struct Sequence;
struct Scene;
struct IpoCurve;
struct Ipo;
struct IpoKey;
struct Mesh;
struct MTFace;
struct Object;
struct TransOb;
struct TransVert;
struct BPoint;
struct BezTriple;
struct Nurb;
struct EditFace;
struct EditVert;
struct EditEdge;
struct EditIpo;
struct bArmature;
struct Bone;
/* interface crap */
struct uiBut;

View File

@@ -0,0 +1,97 @@
/**
* $Id: BSE_view.h 12237 2007-10-08 22:17:51Z broken $
*
* ***** BEGIN GPL/BL DUAL LICENSE BLOCK *****
*
* 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
* of the License, or (at your option) any later version. The Blender
* Foundation also sells licenses for use in proprietary software under
* the Blender License. See http://www.blender.org/BL/ for information
* about this.
*
* 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.
*
* ***** END GPL/BL DUAL LICENSE BLOCK *****
* protos for view.c -- not complete
*/
#ifndef BSE_VIEW_H
#define BSE_VIEW_H
struct Object;
struct BoundBox;
struct View3D;
struct ScrArea;
typedef struct ViewDepths {
unsigned short w, h;
float *depths;
double depth_range[2];
char damaged;
} ViewDepths;
#define PERSP_WIN 0
#define PERSP_VIEW 1
#define PERSP_STORE 2
void persp_general(int a);
void persp(int a);
/* note, the define below is still used for shorts, to calc distances... */
#define IS_CLIPPED 12000
void view3d_get_object_project_mat(struct ScrArea *area, struct Object *ob, float pmat[4][4], float vmat[4][4]);
void view3d_project_float(struct ScrArea *area, float *vec, float *adr, float mat[4][4]);
void view3d_project_short_clip(struct ScrArea *area, float *vec, short *adr, float projmat[4][4], float viewmat[4][4]);
void view3d_project_short_noclip(struct ScrArea *area, float *vec, short *adr, float mat[4][4]);
void initgrabz(float x, float y, float z);
void window_to_3d(float *vec, short mx, short my);
void project_short(float *vec, short *adr);
void project_short_noclip(float *vec, short *adr);
void project_int(float *vec, int *adr);
void project_float(float *vec, float *adr);
int boundbox_clip(float obmat[][4], struct BoundBox *bb);
void fdrawline(float x1, float y1, float x2, float y2);
void fdrawbox(float x1, float y1, float x2, float y2);
void sdrawline(short x1, short y1, short x2, short y2);
void sdrawbox(short x1, short y1, short x2, short y2);
void calctrackballvecfirst(struct rcti *area, short *mval, float *vec);
void calctrackballvec(struct rcti *area, short *mval, float *vec);
void viewmove(int mode);
void view_zoom_mouseloc(float dfac, short *mouseloc);
int get_view3d_viewplane(int winxi, int winyi, rctf *viewplane, float *clipsta, float *clipend, float *pixsize);
void setwinmatrixview3d(int winx, int winy, struct rctf *rect);
void obmat_to_viewmat(struct Object *ob, short smooth);
void setviewmatrixview3d(void);
float *give_cursor(void);
unsigned int free_localbit(void);
void initlocalview(void);
void centerview(void);
void restore_localviewdata(struct View3D *vd);
void endlocalview(struct ScrArea *sa);
void view3d_home(int center);
short view3d_opengl_select(unsigned int *buffer, unsigned int buffsize, short x1, short y1, short x2, short y2);
void view3d_align_axis_to_vector(struct View3D *v3d, int axisidx, float vec[3]);
#endif

View File

@@ -0,0 +1,40 @@
/*
* $Id: LOD_DependKludge.h 229 2002-12-27 13:11:01Z mein $
*
* ***** BEGIN GPL/BL DUAL LICENSE BLOCK *****
*
* 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
* of the License, or (at your option) any later version. The Blender
* Foundation also sells licenses for use in proprietary software under
* the Blender License. See http://www.blender.org/BL/ for information
* about this.
*
* 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.
*
* ***** END GPL/BL DUAL LICENSE BLOCK *****
* Decimation file dependency fix (and kludge)
* Use together with a NAN_DECIMATIONTEST env.var. for Makefile-based linking
*/
#ifndef LOD_DEPENDKLUDGE_H
#define LOD_DEPENDKLUDGE_H
#define NAN_DECIMATION
#endif //LOD_DEPENDKLUDGE_H

Some files were not shown because too many files have changed in this diff Show More