Merged all the internal transform includes into transform.h and moves it to /src to /include.

Split the conversion fonctions and sorting functions from transform.c into transform_conversions.c
Update MSVC 6.0 projectiles and SConscript accordingly.
Editview still included transform.h, replaced that for BIF_transform.h, the external include.
This commit is contained in:
Martin Poirier 2005-04-10 18:33:19 +00:00
parent 6fa9f9b7f5
commit 4ea8947ea7
13 changed files with 1668 additions and 1678 deletions

@ -643,18 +643,6 @@ SOURCE=..\..\..\source\blender\src\transform.h
# End Source File
# Begin Source File
SOURCE=..\..\..\source\blender\src\transform_constraints.h
# End Source File
# Begin Source File
SOURCE=..\..\..\source\blender\src\transform_generics.h
# End Source File
# Begin Source File
SOURCE=..\..\..\source\blender\src\transform_numinput.h
# End Source File
# Begin Source File
SOURCE=..\..\..\source\blender\src\winlay.h
# End Source File
# End Group

@ -33,13 +33,30 @@
#ifndef TRANSFORM_H
#define TRANSFORM_H
#include "transform_numinput.h"
#include "BIF_transform.h"
/* ************************** Types ***************************** */
struct TransInfo;
struct TransData;
struct NumInput;
typedef struct NumInput {
short idx;
short idx_max;
short flag; /* Different flags to indicate different behaviors */
float val[3]; /* Direct value of the input */
short ctrl[3]; /* Control to indicate what to do with the numbers that are typed */
} NumInput ;
/*
The ctrl value has different meaning:
0 : No value has been typed
otherwise, |value| - 1 is where the cursor is located after the period
Positive : number is positive
Negative : number is negative
*/
typedef struct TransCon {
char text[50]; /* Description of the Constraint for header_print */
@ -217,12 +234,86 @@ int Crease(TransInfo *t, short mval[2]);
/* exported from transform.c */
struct ListBase;
void count_bone_select(struct ListBase *lb, int *counter);
void count_bone_select(TransInfo *t, struct ListBase *lb, int *counter);
/* exported from transform_manipulator.c */
struct ScrArea;
void draw_manipulator_ext(struct ScrArea *sa, int type, char axis, int col, float vec[3], float mat[][3]);
/*********************** TransData Creation and General Handling */
void createTransData(TransInfo *t);
void sort_trans_data_dist(TransInfo *t);
void clear_trans_object_base_flags(void);
void add_tdi_poin(float *poin, float *old, float delta);
/*********************** Constraints *****************************/
void getConstraintMatrix(TransInfo *t);
void setConstraint(TransInfo *t, float space[3][3], int mode, const char text[]);
void setLocalConstraint(TransInfo *t, int mode, const char text[]);
void constraintNumInput(TransInfo *t, float vec[3]);
//void drawConstraint(TransCon *t);
void drawConstraint();
//void drawPropCircle(TransInfo *t);
void drawPropCircle();
void initConstraint(TransInfo *t);
void startConstraint(TransInfo *t);
void stopConstraint(TransInfo *t);
void getConstraintMatrix(TransInfo *t);
void initSelectConstraint(TransInfo *t);
void selectConstraint(TransInfo *t);
void postSelectConstraint(TransInfo *t);
int getConstraintSpaceDimension(TransInfo *t);
void setNearestAxis(TransInfo *t);
/*********************** Generics ********************************/
void recalcData(TransInfo *t);
void initTransModeFlags(TransInfo *t, int mode);
void drawLine(float *center, float *dir, char axis, short options);
/* DRAWLINE options flags */
#define DRAWLIGHT 1
#define DRAWDASHED 2
#define DRAWBOLD 4
void applyTransObjects(TransInfo *t);
void restoreTransObjects(TransInfo *t);
void initTrans(TransInfo *t);
void postTrans (TransInfo *t);
void calculateCenterBound(TransInfo *t);
void calculateCenterMedian(TransInfo *t);
void calculateCenterCursor(TransInfo *t);
void calculateCenter(TransInfo *t);
void calculatePropRatio(TransInfo *t);
void snapGrid(TransInfo *t, float *val);
void getViewVector(float coord[3], float vec[3]);
TransInfo * BIF_GetTransInfo(void);
/*********************** NumInput ********************************/
void outputNumInput(NumInput *n, char *str);
short hasNumInput(NumInput *n);
void applyNumInput(NumInput *n, float *vec);
char handleNumInput(NumInput *n, unsigned short event);
#endif

@ -114,6 +114,7 @@ source_files = ['B.blend.c',
'transform_generics.c',
'transform_numinput.c',
'transform_constraints.c',
'transform_conversions.c',
'transform_manipulator.c',
'unwrapper.c',
'usiblender.c',

@ -95,7 +95,7 @@
#include "blendef.h"
#include "mydevice.h"
#include "transform.h"
#include "BIF_transform.h"
extern ListBase editNurb; /* originally from exports.h, memory from editcurve.c*/
/* editmball.c */

File diff suppressed because it is too large Load Diff

@ -102,8 +102,6 @@
#include "mydevice.h"
#include "transform.h"
#include "transform_constraints.h"
#include "transform_generics.h"
extern ListBase editNurb;
extern ListBase editelems;

@ -1,65 +0,0 @@
/**
* $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 *****
*/
#ifndef TRANSFORM_CONSTRAINTS_H
#define TRANSFORM_CONSTRAINTS_H
#include "transform.h"
void getConstraintMatrix(TransInfo *t);
void setConstraint(TransInfo *t, float space[3][3], int mode, const char text[]);
void setLocalConstraint(TransInfo *t, int mode, const char text[]);
void constraintNumInput(TransInfo *t, float vec[3]);
//void drawConstraint(TransCon *t);
void drawConstraint();
//void drawPropCircle(TransInfo *t);
void drawPropCircle();
void initConstraint(TransInfo *t);
void startConstraint(TransInfo *t);
void stopConstraint(TransInfo *t);
void getConstraintMatrix(TransInfo *t);
void initSelectConstraint(TransInfo *t);
void selectConstraint(TransInfo *t);
void postSelectConstraint(TransInfo *t);
int getConstraintSpaceDimension(TransInfo *t);
void setNearestAxis(TransInfo *t);
#endif

File diff suppressed because it is too large Load Diff

@ -103,8 +103,6 @@
#include "mydevice.h"
#include "transform.h"
#include "transform_generics.h"
#include "transform_constraints.h"
extern ListBase editNurb;
extern ListBase editelems;

@ -1,72 +0,0 @@
/**
* $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 *****
*/
#ifndef TRANSFORM_GENERICS_H
#define TRANSFORM_GENERICS_H
void recalcData(TransInfo *t);
void initTransModeFlags(TransInfo *t, int mode);
void drawLine(float *center, float *dir, char axis, short options);
/* DRAWLINE options flags */
#define DRAWLIGHT 1
#define DRAWDASHED 2
#define DRAWBOLD 4
void apply_grid1(float *val, int max_index, float factor);
void apply_grid2(float *val, int max_index, float factor, float factor2);
void apply_grid3(float *val, int max_index, float fac1, float fac2, float fac3);
void applyTransObjects(TransInfo *t);
void restoreTransObjects(TransInfo *t);
void initTrans(TransInfo *t);
void postTrans (TransInfo *t);
void calculateCenterBound(TransInfo *t);
void calculateCenterMedian(TransInfo *t);
void calculateCenterCursor(TransInfo *t);
void calculateCenter(TransInfo *t);
void calculatePropRatio(TransInfo *t);
void snapGrid(TransInfo *t, float *val);
void getViewVector(float coord[3], float vec[3]);
TransInfo * BIF_GetTransInfo(void);
#endif

@ -81,7 +81,6 @@
#include "blendef.h"
#include "transform.h"
#include "transform_generics.h"
/* return codes for select, and drawing flags */
@ -306,7 +305,7 @@ static int calc_manipulator(ScrArea *sa)
Trans.mode= TFM_ROTATION; // mislead counting bones... bah
/* count total */
count_bone_select(&arm->bonebase, &totsel);
count_bone_select(&Trans, &arm->bonebase, &totsel);
if(totsel) {
/* recursive get stats */
stats_pose(&arm->bonebase, normal, plane);

@ -52,7 +52,6 @@
#include "BLI_arithb.h"
#include "transform_numinput.h"
#include "transform.h"
/* ************************** Functions *************************** */

@ -1,62 +0,0 @@
/**
* $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 *****
*/
#ifndef TRANSFORM_NUMINPUT_H
#define TRANSFORM_NUMINPUT_H
typedef struct NumInput {
short idx;
short idx_max;
short flag; /* Different flags to indicate different behaviors */
float val[3]; /* Direct value of the input */
short ctrl[3]; /* Control to indicate what to do with the numbers that are typed */
} NumInput ;
/*
The ctrl value has different meaning:
0 : No value has been typed
otherwise, |value| - 1 is where the cursor is located after the period
Positive : number is positive
Negative : number is negative
*/
void outputNumInput(NumInput *n, char *str);
short hasNumInput(NumInput *n);
void applyNumInput(NumInput *n, float *vec);
char handleNumInput(NumInput *n, unsigned short event);
#endif