Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/source
diff options
context:
space:
mode:
authorSergey Sharybin <sergey.vfx@gmail.com>2011-12-04 16:32:26 +0400
committerSergey Sharybin <sergey.vfx@gmail.com>2011-12-04 16:32:26 +0400
commit4e0b4de0bf15c73a37950a16e232687f8649198a (patch)
treef2f7022c1f2f18c256fefb582ca720bab0b6c31c /source
parentbb81c03e3961e647c290fb71078e1cafb6ad0e23 (diff)
parent458ecaebf4ee1bf7e66978ff9fed89a35bba8f4f (diff)
Merging r42350 through r42393 from trunk into soc-2011-tomato
Diffstat (limited to 'source')
-rw-r--r--source/blender/CMakeLists.txt1
-rw-r--r--source/blender/blenkernel/BKE_group.h2
-rw-r--r--source/blender/blenkernel/BKE_object.h2
-rw-r--r--source/blender/blenkernel/intern/group.c4
-rw-r--r--source/blender/blenkernel/intern/ipo.c4
-rw-r--r--source/blender/blenkernel/intern/lattice.c2
-rw-r--r--source/blender/blenkernel/intern/mesh.c4
-rw-r--r--source/blender/blenkernel/intern/multires.c3
-rw-r--r--source/blender/blenkernel/intern/object.c23
-rw-r--r--source/blender/blenkernel/intern/paint.c17
-rw-r--r--source/blender/blenkernel/intern/scene.c4
-rw-r--r--source/blender/blenkernel/intern/text.c6
-rw-r--r--source/blender/blenkernel/intern/tracking.c5
-rw-r--r--source/blender/blenlib/BLI_math_geom.h2
-rw-r--r--source/blender/blenlib/intern/math_geom.c30
-rw-r--r--source/blender/blenlib/intern/math_matrix.c16
-rw-r--r--source/blender/blenlib/intern/scanfill.c16
-rw-r--r--source/blender/blenloader/intern/readfile.c7
-rw-r--r--source/blender/editors/animation/keyframing.c9
-rw-r--r--source/blender/editors/armature/meshlaplacian.c7
-rw-r--r--source/blender/editors/gpencil/drawgpencil.c4
-rw-r--r--source/blender/editors/mesh/editmesh.c40
-rw-r--r--source/blender/editors/mesh/editmesh_mods.c18
-rw-r--r--source/blender/editors/mesh/editmesh_tools.c19
-rw-r--r--source/blender/editors/mesh/meshtools.c1
-rw-r--r--source/blender/editors/metaball/mball_edit.c1
-rw-r--r--source/blender/editors/object/object_edit.c2
-rw-r--r--source/blender/editors/object/object_relations.c2
-rw-r--r--source/blender/editors/object/object_transform.c6
-rw-r--r--source/blender/editors/space_clip/tracking_ops.c9
-rw-r--r--source/blender/editors/space_outliner/outliner_select.c2
-rw-r--r--source/blender/editors/space_sequencer/space_sequencer.c1
-rw-r--r--source/blender/editors/space_view3d/drawobject.c142
-rw-r--r--source/blender/editors/transform/transform.h2
-rw-r--r--source/blender/editors/transform/transform_conversions.c2
-rw-r--r--source/blender/editors/transform/transform_input.c10
-rw-r--r--source/blender/editors/uvedit/uvedit_unwrap_ops.c13
-rw-r--r--source/blender/makesdna/DNA_action_types.h2
-rw-r--r--source/blender/makesdna/DNA_camera_types.h4
-rw-r--r--source/blender/makesdna/DNA_constraint_types.h3
-rw-r--r--source/blender/makesdna/DNA_curve_types.h3
-rw-r--r--source/blender/makesdna/DNA_defs.h45
-rw-r--r--source/blender/makesdna/DNA_key_types.h6
-rw-r--r--source/blender/makesdna/DNA_lamp_types.h3
-rw-r--r--source/blender/makesdna/DNA_lattice_types.h3
-rw-r--r--source/blender/makesdna/DNA_material_types.h3
-rw-r--r--source/blender/makesdna/DNA_mesh_types.h9
-rw-r--r--source/blender/makesdna/DNA_meta_types.h2
-rw-r--r--source/blender/makesdna/DNA_modifier_types.h3
-rw-r--r--source/blender/makesdna/DNA_node_types.h2
-rw-r--r--source/blender/makesdna/DNA_object_types.h21
-rw-r--r--source/blender/makesdna/DNA_particle_types.h5
-rw-r--r--source/blender/makesdna/DNA_scene_types.h34
-rw-r--r--source/blender/makesdna/DNA_sequence_types.h3
-rw-r--r--source/blender/makesdna/DNA_space_types.h71
-rw-r--r--source/blender/makesdna/DNA_texture_types.h3
-rw-r--r--source/blender/makesdna/DNA_userdef_types.h2
-rw-r--r--source/blender/makesdna/DNA_view3d_types.h18
-rw-r--r--source/blender/makesdna/DNA_world_types.h5
-rw-r--r--source/blender/makesdna/intern/makesdna.c7
-rw-r--r--source/blender/makesrna/intern/rna_object.c2
-rw-r--r--source/blender/modifiers/intern/MOD_mirror.c1
-rw-r--r--source/blender/nodes/shader/nodes/node_shader_camera.c2
-rw-r--r--source/blender/nodes/shader/nodes/node_shader_invert.c2
-rw-r--r--source/blender/python/intern/bpy_rna.c84
-rw-r--r--source/blender/render/intern/source/convertblender.c2
-rw-r--r--source/blender/render/intern/source/rayshade.c12
-rw-r--r--source/blender/render/intern/source/render_texture.c10
-rw-r--r--source/blender/render/intern/source/shadeinput.c10
-rw-r--r--source/blender/windowmanager/intern/wm_event_system.c5
70 files changed, 498 insertions, 327 deletions
diff --git a/source/blender/CMakeLists.txt b/source/blender/CMakeLists.txt
index e52b5b89aa0..21c6ad66f16 100644
--- a/source/blender/CMakeLists.txt
+++ b/source/blender/CMakeLists.txt
@@ -38,6 +38,7 @@ set(SRC_DNA_INC
${CMAKE_CURRENT_SOURCE_DIR}/makesdna/DNA_controller_types.h
${CMAKE_CURRENT_SOURCE_DIR}/makesdna/DNA_curve_types.h
${CMAKE_CURRENT_SOURCE_DIR}/makesdna/DNA_customdata_types.h
+ ${CMAKE_CURRENT_SOURCE_DIR}/makesdna/DNA_defs.h
${CMAKE_CURRENT_SOURCE_DIR}/makesdna/DNA_documentation.h
${CMAKE_CURRENT_SOURCE_DIR}/makesdna/DNA_dynamicpaint_types.h
${CMAKE_CURRENT_SOURCE_DIR}/makesdna/DNA_effect_types.h
diff --git a/source/blender/blenkernel/BKE_group.h b/source/blender/blenkernel/BKE_group.h
index 554314c419a..044a40658c3 100644
--- a/source/blender/blenkernel/BKE_group.h
+++ b/source/blender/blenkernel/BKE_group.h
@@ -52,8 +52,10 @@ int group_is_animated(struct Object *parent, struct Group *group);
void group_tag_recalc(struct Group *group);
void group_handle_recalc_and_update(struct Scene *scene, struct Object *parent, struct Group *group);
+#if 0 /* UNUSED */
struct Object *group_get_member_with_action(struct Group *group, struct bAction *act);
void group_relink_nla_objects(struct Object *ob);
+#endif
#endif
diff --git a/source/blender/blenkernel/BKE_object.h b/source/blender/blenkernel/BKE_object.h
index 5eb9529b2fc..b5a5090a5eb 100644
--- a/source/blender/blenkernel/BKE_object.h
+++ b/source/blender/blenkernel/BKE_object.h
@@ -128,7 +128,7 @@ void object_tfm_restore(struct Object *ob, void *obtfm_pt);
typedef struct ObjectTfmProtectedChannels {
float loc[3], dloc[3];
- float size[3], dsize[3];
+ float size[3], dscale[3];
float rot[3], drot[3];
float quat[4], dquat[4];
float rotAxis[3], drotAxis[3];
diff --git a/source/blender/blenkernel/intern/group.c b/source/blender/blenkernel/intern/group.c
index 76c3e6e5502..d0f09857781 100644
--- a/source/blender/blenkernel/intern/group.c
+++ b/source/blender/blenkernel/intern/group.c
@@ -123,8 +123,10 @@ void unlink_group(Group *group)
for(psys=ob->particlesystem.first; psys; psys=psys->next){
if(psys->part->dup_group==group)
psys->part->dup_group= NULL;
+#if 0 /* not used anymore, only keps for readfile.c, no need to account for this */
if(psys->part->eff_group==group)
psys->part->eff_group= NULL;
+#endif
}
}
@@ -381,6 +383,7 @@ void group_handle_recalc_and_update(Scene *scene, Object *UNUSED(parent), Group
}
}
+#if 0
Object *group_get_member_with_action(Group *group, bAction *act)
{
GroupObject *go;
@@ -432,3 +435,4 @@ void group_relink_nla_objects(Object *ob)
}
}
+#endif
diff --git a/source/blender/blenkernel/intern/ipo.c b/source/blender/blenkernel/intern/ipo.c
index 034f4a96879..622ec093a3f 100644
--- a/source/blender/blenkernel/intern/ipo.c
+++ b/source/blender/blenkernel/intern/ipo.c
@@ -43,7 +43,8 @@
#include <string.h>
#include <stddef.h>
-#include "MEM_guardedalloc.h"
+/* since we have versioning code here */
+#define DNA_DEPRECATED_ALLOW
#include "DNA_anim_types.h"
#include "DNA_constraint_types.h"
@@ -73,6 +74,7 @@
#include "BKE_nla.h"
#include "BKE_sequencer.h"
+#include "MEM_guardedalloc.h"
/* *************************************************** */
/* Old-Data Freeing Tools */
diff --git a/source/blender/blenkernel/intern/lattice.c b/source/blender/blenkernel/intern/lattice.c
index 4f02fdd1f46..fe07662795e 100644
--- a/source/blender/blenkernel/intern/lattice.c
+++ b/source/blender/blenkernel/intern/lattice.c
@@ -462,7 +462,7 @@ void end_latt_deform(Object *ob)
so we store in latmat transform from path coord inside object
*/
typedef struct {
- float dmin[3], dmax[3], dsize, dloc[3];
+ float dmin[3], dmax[3], dscale, dloc[3];
float curvespace[4][4], objectspace[4][4], objectspace3[3][3];
int no_rot_axis;
} CurveDeform;
diff --git a/source/blender/blenkernel/intern/mesh.c b/source/blender/blenkernel/intern/mesh.c
index ab45aeed8c3..736c24e2c06 100644
--- a/source/blender/blenkernel/intern/mesh.c
+++ b/source/blender/blenkernel/intern/mesh.c
@@ -106,9 +106,7 @@ void unlink_mesh(Mesh *me)
}
if(me->key) {
- me->key->id.us--;
- if (me->key->id.us == 0 && me->key->ipo )
- me->key->ipo->id.us--;
+ me->key->id.us--;
}
me->key= NULL;
diff --git a/source/blender/blenkernel/intern/multires.c b/source/blender/blenkernel/intern/multires.c
index ae0774eb34f..458fb895b64 100644
--- a/source/blender/blenkernel/intern/multires.c
+++ b/source/blender/blenkernel/intern/multires.c
@@ -32,6 +32,9 @@
#include "MEM_guardedalloc.h"
+/* for reading old multires */
+#define DNA_DEPRECATED_ALLOW
+
#include "DNA_mesh_types.h"
#include "DNA_meshdata_types.h"
#include "DNA_object_types.h"
diff --git a/source/blender/blenkernel/intern/object.c b/source/blender/blenkernel/intern/object.c
index f2df16c8100..13b6919683c 100644
--- a/source/blender/blenkernel/intern/object.c
+++ b/source/blender/blenkernel/intern/object.c
@@ -120,7 +120,7 @@ void clear_workob(Object *workob)
memset(workob, 0, sizeof(Object));
workob->size[0]= workob->size[1]= workob->size[2]= 1.0f;
- workob->dsize[0]= workob->dsize[1]= workob->dsize[2]= 1.0f;
+ workob->dscale[0]= workob->dscale[1]= workob->dscale[2]= 1.0f;
workob->rotmode= ROT_MODE_EUL;
}
@@ -775,7 +775,7 @@ Object *add_only_object(int type, const char *name)
ob->col[3]= 1.0;
ob->size[0]= ob->size[1]= ob->size[2]= 1.0;
- ob->dsize[0]= ob->dsize[1]= ob->dsize[2]= 1.0;
+ ob->dscale[0]= ob->dscale[1]= ob->dscale[2]= 1.0;
/* objects should default to having Euler XYZ rotations,
* but rotations default to quaternions
@@ -1397,7 +1397,6 @@ void object_make_proxy(Object *ob, Object *target, Object *gob)
ob->matbits= NULL;
if ((target->totcol) && (target->mat) && OB_TYPE_SUPPORT_MATERIAL(ob->type)) {
int i;
- ob->colbits = target->colbits;
ob->actcol= target->actcol;
ob->totcol= target->totcol;
@@ -1443,7 +1442,7 @@ void object_make_proxy(Object *ob, Object *target, Object *gob)
void object_scale_to_mat3(Object *ob, float mat[][3])
{
float vec[3];
- mul_v3_v3v3(vec, ob->size, ob->dsize);
+ mul_v3_v3v3(vec, ob->size, ob->dscale);
size_to_mat3( mat,vec);
}
@@ -1529,7 +1528,7 @@ void object_tfm_protected_backup(const Object *ob,
TFMCPY3D(loc);
TFMCPY3D(dloc);
TFMCPY3D(size);
- TFMCPY3D(dsize);
+ TFMCPY3D(dscale);
TFMCPY3D(rot);
TFMCPY3D(drot);
TFMCPY4D(quat);
@@ -1559,7 +1558,7 @@ void object_tfm_protected_restore(Object *ob,
if (protectflag & (OB_LOCK_SCALEX<<i)) {
ob->size[i]= obtfm->size[i];
- ob->dsize[i]= obtfm->dsize[i];
+ ob->dscale[i]= obtfm->dscale[i];
}
if (protectflag & (OB_LOCK_ROTX<<i)) {
@@ -1606,9 +1605,9 @@ void object_apply_mat4(Object *ob, float mat[][4], const short use_compat, const
sub_v3_v3(ob->loc, ob->dloc);
- if (ob->dsize[0] != 0.0f) ob->size[0] /= ob->dsize[0];
- if (ob->dsize[1] != 0.0f) ob->size[1] /= ob->dsize[1];
- if (ob->dsize[2] != 0.0f) ob->size[2] /= ob->dsize[2];
+ if (ob->dscale[0] != 0.0f) ob->size[0] /= ob->dscale[0];
+ if (ob->dscale[1] != 0.0f) ob->size[1] /= ob->dscale[1];
+ if (ob->dscale[2] != 0.0f) ob->size[2] /= ob->dscale[2];
/* object_mat3_to_rot handles delta rotations */
}
@@ -2417,7 +2416,7 @@ void BKE_scene_foreach_display_point(
/* copied from DNA_object_types.h */
typedef struct ObTfmBack {
float loc[3], dloc[3], orig[3];
- float size[3], dsize[3]; /* scale and delta scale */
+ float size[3], dscale[3]; /* scale and delta scale */
float rot[3], drot[3]; /* euler rotation */
float quat[4], dquat[4]; /* quaternion rotation */
float rotAxis[3], drotAxis[3]; /* axis angle rotation - axis part */
@@ -2435,7 +2434,7 @@ void *object_tfm_backup(Object *ob)
copy_v3_v3(obtfm->dloc, ob->dloc);
copy_v3_v3(obtfm->orig, ob->orig);
copy_v3_v3(obtfm->size, ob->size);
- copy_v3_v3(obtfm->dsize, ob->dsize);
+ copy_v3_v3(obtfm->dscale, ob->dscale);
copy_v3_v3(obtfm->rot, ob->rot);
copy_v3_v3(obtfm->drot, ob->drot);
copy_qt_qt(obtfm->quat, ob->quat);
@@ -2459,7 +2458,7 @@ void object_tfm_restore(Object *ob, void *obtfm_pt)
copy_v3_v3(ob->dloc, obtfm->dloc);
copy_v3_v3(ob->orig, obtfm->orig);
copy_v3_v3(ob->size, obtfm->size);
- copy_v3_v3(ob->dsize, obtfm->dsize);
+ copy_v3_v3(ob->dscale, obtfm->dscale);
copy_v3_v3(ob->rot, obtfm->rot);
copy_v3_v3(ob->drot, obtfm->drot);
copy_qt_qt(ob->quat, obtfm->quat);
diff --git a/source/blender/blenkernel/intern/paint.c b/source/blender/blenkernel/intern/paint.c
index 56ce853bfb9..fe848f3d76c 100644
--- a/source/blender/blenkernel/intern/paint.c
+++ b/source/blender/blenkernel/intern/paint.c
@@ -90,15 +90,28 @@ void paint_brush_set(Paint *p, Brush *br)
}
}
+/* are we in vertex paint or weight pain face select mode? */
int paint_facesel_test(Object *ob)
{
- return (ob && ob->type==OB_MESH && ob->data && (((Mesh *)ob->data)->editflag & ME_EDIT_PAINT_MASK) && (ob->mode & (OB_MODE_VERTEX_PAINT|OB_MODE_WEIGHT_PAINT|OB_MODE_TEXTURE_PAINT)));
+ return ( (ob != NULL) &&
+ (ob->type == OB_MESH) &&
+ (ob->data != NULL) &&
+ (((Mesh *)ob->data)->editflag & ME_EDIT_PAINT_MASK) &&
+ (ob->mode & (OB_MODE_VERTEX_PAINT|OB_MODE_WEIGHT_PAINT|OB_MODE_TEXTURE_PAINT))
+ );
}
+/* are we in weight paint vertex select mode? */
int paint_vertsel_test(Object *ob)
{
- return (ob && ob->type==OB_MESH && ob->data && (((Mesh *)ob->data)->editflag & ME_EDIT_VERT_SEL) && (ob->mode & OB_MODE_WEIGHT_PAINT));
+ return ( (ob != NULL) &&
+ (ob->type == OB_MESH) &&
+ (ob->data != NULL) &&
+ (((Mesh *)ob->data)->editflag & ME_EDIT_VERT_SEL) &&
+ (ob->mode & OB_MODE_WEIGHT_PAINT)
+ );
}
+
void paint_init(Paint *p, const char col[3])
{
Brush *brush;
diff --git a/source/blender/blenkernel/intern/scene.c b/source/blender/blenkernel/intern/scene.c
index c284ed02868..ebe360ef91b 100644
--- a/source/blender/blenkernel/intern/scene.c
+++ b/source/blender/blenkernel/intern/scene.c
@@ -394,10 +394,6 @@ Scene *add_scene(const char *name)
sce->r.simplify_shadowsamples= 16;
sce->r.simplify_aosss= 1.0f;
- sce->r.cineonblack= 95;
- sce->r.cineonwhite= 685;
- sce->r.cineongamma= 1.7f;
-
sce->r.border.xmin= 0.0f;
sce->r.border.ymin= 0.0f;
sce->r.border.xmax= 1.0f;
diff --git a/source/blender/blenkernel/intern/text.c b/source/blender/blenkernel/intern/text.c
index 28d68892a2a..60cc029bf6e 100644
--- a/source/blender/blenkernel/intern/text.c
+++ b/source/blender/blenkernel/intern/text.c
@@ -479,17 +479,11 @@ void unlink_text(Main *bmain, Text *text)
bScreen *scr;
ScrArea *area;
SpaceLink *sl;
- Scene *scene;
Object *ob;
bController *cont;
bConstraint *con;
short update;
- /* dome */
- for(scene=bmain->scene.first; scene; scene=scene->id.next)
- if(scene->r.dometext == text)
- scene->r.dometext = NULL;
-
for(ob=bmain->object.first; ob; ob=ob->id.next) {
/* game controllers */
for(cont=ob->controllers.first; cont; cont=cont->next) {
diff --git a/source/blender/blenkernel/intern/tracking.c b/source/blender/blenkernel/intern/tracking.c
index 10076a4fba6..361a6d50961 100644
--- a/source/blender/blenkernel/intern/tracking.c
+++ b/source/blender/blenkernel/intern/tracking.c
@@ -248,7 +248,8 @@ MovieTrackingTrack *BKE_tracking_add_track(MovieTracking *tracking, float x, flo
BKE_tracking_insert_marker(track, &marker);
- BKE_tracking_clamp_track(track, CLAMP_PYRAMID_LEVELS);
+ if(track->tracker == TRACKER_KLT)
+ BKE_tracking_clamp_track(track, CLAMP_PYRAMID_LEVELS);
BLI_addtail(&tracking->tracks, track);
BKE_track_unique_name(tracking, track);
@@ -1681,6 +1682,7 @@ void BKE_tracking_reconstruction_context_free(MovieReconstructContext *context)
MEM_freeN(context);
}
+#ifdef WITH_LIBMV
static void solve_reconstruction_update_cb(void *customdata, double progress, const char *message)
{
ReconstructProgressData *progressdata= customdata;
@@ -1693,6 +1695,7 @@ static void solve_reconstruction_update_cb(void *customdata, double progress, co
BLI_snprintf(progressdata->stats_message, progressdata->message_size,
"Solving camera | %s", message);
}
+#endif
#if 0
static int solve_reconstruction_testbreak_cb(void *customdata)
diff --git a/source/blender/blenlib/BLI_math_geom.h b/source/blender/blenlib/BLI_math_geom.h
index a2a4ffdc830..d494d63f56b 100644
--- a/source/blender/blenlib/BLI_math_geom.h
+++ b/source/blender/blenlib/BLI_math_geom.h
@@ -260,6 +260,8 @@ MINLINE void madd_sh_shfl(float r[9], const float sh[3], const float f);
float form_factor_hemi_poly(float p[3], float n[3],
float v1[3], float v2[3], float v3[3], float v4[3]);
+void axis_dominant_v3(int *axis_a, int *axis_b, const float axis[3]);
+
#ifdef __cplusplus
}
#endif
diff --git a/source/blender/blenlib/intern/math_geom.c b/source/blender/blenlib/intern/math_geom.c
index 9d42ee347d4..382448ebb1c 100644
--- a/source/blender/blenlib/intern/math_geom.c
+++ b/source/blender/blenlib/intern/math_geom.c
@@ -133,7 +133,8 @@ float area_poly_v3(int nr, float verts[][3], const float normal[3])
float *cur, *prev;
int a, px=0, py=1;
- /* first: find dominant axis: 0==X, 1==Y, 2==Z */
+ /* first: find dominant axis: 0==X, 1==Y, 2==Z
+ * don't use 'axis_dominant_v3()' because we need max axis too */
x= fabsf(normal[0]);
y= fabsf(normal[1]);
z= fabsf(normal[2]);
@@ -1689,6 +1690,18 @@ void plot_line_v2v2i(const int p1[2], const int p2[2], int (*callback)(int, int,
/****************************** Interpolation ********************************/
+/* get the 2 dominant axis values, 0==X, 1==Y, 2==Z */
+void axis_dominant_v3(int *axis_a, int *axis_b, const float axis[3])
+{
+ const float xn= fabsf(axis[0]);
+ const float yn= fabsf(axis[1]);
+ const float zn= fabsf(axis[2]);
+
+ if (zn >= xn && zn >= yn) { *axis_a= 0; *axis_b= 1; }
+ else if (yn >= xn && yn >= zn) { *axis_a= 0; *axis_b= 2; }
+ else { *axis_a= 1; *axis_b= 2; }
+}
+
static float tri_signed_area(const float v1[3], const float v2[3], const float v3[3], const int i, const int j)
{
return 0.5f*((v1[i]-v2[i])*(v2[j]-v3[j]) + (v1[j]-v2[j])*(v3[i]-v2[i]));
@@ -1696,17 +1709,10 @@ static float tri_signed_area(const float v1[3], const float v2[3], const float v
static int barycentric_weights(const float v1[3], const float v2[3], const float v3[3], const float co[3], const float n[3], float w[3])
{
- float xn, yn, zn, a1, a2, a3, asum;
- short i, j;
-
- /* find best projection of face XY, XZ or YZ: barycentric weights of
- the 2d projected coords are the same and faster to compute */
- xn= fabsf(n[0]);
- yn= fabsf(n[1]);
- zn= fabsf(n[2]);
- if(zn>=xn && zn>=yn) {i= 0; j= 1;}
- else if(yn>=xn && yn>=zn) {i= 0; j= 2;}
- else {i= 1; j= 2;}
+ float a1, a2, a3, asum;
+ int i, j;
+
+ axis_dominant_v3(&i, &j, n);
a1= tri_signed_area(v2, v3, co, i, j);
a2= tri_signed_area(v3, v1, co, i, j);
diff --git a/source/blender/blenlib/intern/math_matrix.c b/source/blender/blenlib/intern/math_matrix.c
index b2c9a5706a3..37cb49fc17b 100644
--- a/source/blender/blenlib/intern/math_matrix.c
+++ b/source/blender/blenlib/intern/math_matrix.c
@@ -1121,18 +1121,18 @@ void blend_m3_m3m3(float out[][3], float dst[][3], float src[][3], const float s
{
float srot[3][3], drot[3][3];
float squat[4], dquat[4], fquat[4];
- float ssize[3], dsize[3], fsize[3];
+ float sscale[3], dscale[3], fsize[3];
float rmat[3][3], smat[3][3];
- mat3_to_rot_size(drot, dsize, dst);
- mat3_to_rot_size(srot, ssize, src);
+ mat3_to_rot_size(drot, dscale, dst);
+ mat3_to_rot_size(srot, sscale, src);
mat3_to_quat(dquat, drot);
mat3_to_quat(squat, srot);
/* do blending */
interp_qt_qtqt(fquat, dquat, squat, srcweight);
- interp_v3_v3v3(fsize, dsize, ssize, srcweight);
+ interp_v3_v3v3(fsize, dscale, sscale, srcweight);
/* compose new matrix */
quat_to_mat3(rmat,fquat);
@@ -1145,10 +1145,10 @@ void blend_m4_m4m4(float out[][4], float dst[][4], float src[][4], const float s
float sloc[3], dloc[3], floc[3];
float srot[3][3], drot[3][3];
float squat[4], dquat[4], fquat[4];
- float ssize[3], dsize[3], fsize[3];
+ float sscale[3], dscale[3], fsize[3];
- mat4_to_loc_rot_size(dloc, drot, dsize, dst);
- mat4_to_loc_rot_size(sloc, srot, ssize, src);
+ mat4_to_loc_rot_size(dloc, drot, dscale, dst);
+ mat4_to_loc_rot_size(sloc, srot, sscale, src);
mat3_to_quat(dquat, drot);
mat3_to_quat(squat, srot);
@@ -1156,7 +1156,7 @@ void blend_m4_m4m4(float out[][4], float dst[][4], float src[][4], const float s
/* do blending */
interp_v3_v3v3(floc, dloc, sloc, srcweight);
interp_qt_qtqt(fquat, dquat, squat, srcweight);
- interp_v3_v3v3(fsize, dsize, ssize, srcweight);
+ interp_v3_v3v3(fsize, dscale, sscale, srcweight);
/* compose new matrix */
loc_quat_size_to_mat4(out, floc, fquat, fsize);
diff --git a/source/blender/blenlib/intern/scanfill.c b/source/blender/blenlib/intern/scanfill.c
index 41b1fea32a6..369984c1719 100644
--- a/source/blender/blenlib/intern/scanfill.c
+++ b/source/blender/blenlib/intern/scanfill.c
@@ -96,7 +96,7 @@ ListBase fillvertbase = {NULL, NULL};
ListBase filledgebase = {NULL, NULL};
ListBase fillfacebase = {NULL, NULL};
-static short cox, coy;
+static int cox, coy;
/* **** FUBCTIONS FOR QSORT *************************** */
@@ -825,19 +825,7 @@ int BLI_edgefill(short mat_nr)
if(len==0.0f) return 0; /* no fill possible */
- norm[0]= fabs(norm[0]);
- norm[1]= fabs(norm[1]);
- norm[2]= fabs(norm[2]);
-
- if(norm[2]>=norm[0] && norm[2]>=norm[1]) {
- cox= 0; coy= 1;
- }
- else if(norm[1]>=norm[0] && norm[1]>=norm[2]) {
- cox= 0; coy= 2;
- }
- else {
- cox= 1; coy= 2;
- }
+ axis_dominant_v3(&cox, &coy, norm);
/* STEP 1: COUNT POLYS */
eve= fillvertbase.first;
diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c
index 7b3066043fb..c80b062463d 100644
--- a/source/blender/blenloader/intern/readfile.c
+++ b/source/blender/blenloader/intern/readfile.c
@@ -48,6 +48,9 @@
#include "BLI_winstuff.h"
#endif
+/* allow readfile to use deprecated functionality */
+#define DNA_DEPRECATED_ALLOW
+
#include "DNA_anim_types.h"
#include "DNA_armature_types.h"
#include "DNA_actuator_types.h"
@@ -12617,10 +12620,10 @@ static void do_versions(FileData *fd, Library *lib, Main *main)
if ( (ob->dsize[i] == 0.0f) || /* simple case, user never touched dsize */
(ob->size[i] == 0.0f)) /* cant scale the dsize to give a non zero result, so fallback to 1.0f */
{
- ob->dsize[i]= 1.0f;
+ ob->dscale[i]= 1.0f;
}
else {
- ob->size[i]= (ob->size[i] + ob->dsize[i]) / ob->size[i];
+ ob->dscale[i]= (ob->size[i] + ob->dsize[i]) / ob->size[i];
}
}
}
diff --git a/source/blender/editors/animation/keyframing.c b/source/blender/editors/animation/keyframing.c
index 9f466ef52d3..4595bf3f64f 100644
--- a/source/blender/editors/animation/keyframing.c
+++ b/source/blender/editors/animation/keyframing.c
@@ -310,10 +310,17 @@ int insert_vert_fcurve (FCurve *fcu, float x, float y, short flag)
beztr.vec[1][1]= y;
beztr.vec[2][0]= x+1.0f;
beztr.vec[2][1]= y;
- beztr.ipo= U.ipo_new; /* use default interpolation mode here... */
beztr.f1= beztr.f2= beztr.f3= SELECT;
beztr.h1= beztr.h2= U.keyhandles_new; /* use default handle type here */
//BEZKEYTYPE(&beztr)= scene->keytype; /* default keyframe type */
+
+ /* use default interpolation mode, with exceptions for int/discrete values */
+ beztr.ipo= U.ipo_new;
+
+ if(fcu->flag & FCURVE_DISCRETE_VALUES)
+ beztr.ipo = BEZT_IPO_CONST;
+ else if(beztr.ipo == BEZT_IPO_BEZ && (fcu->flag & FCURVE_INT_VALUES))
+ beztr.ipo = BEZT_IPO_LIN;
/* add temp beztriple to keyframes */
a= insert_bezt_fcurve(fcu, &beztr, flag);
diff --git a/source/blender/editors/armature/meshlaplacian.c b/source/blender/editors/armature/meshlaplacian.c
index 40d2d80f2b7..502da1be8ac 100644
--- a/source/blender/editors/armature/meshlaplacian.c
+++ b/source/blender/editors/armature/meshlaplacian.c
@@ -1608,7 +1608,7 @@ static void meshdeform_matrix_add_exterior_phi(MeshDeformBind *mdb, int x, int y
mdb->phi[acenter]= phi/totweight;
}
-static void meshdeform_matrix_solve(MeshDeformBind *mdb)
+static void meshdeform_matrix_solve(MeshDeformModifierData *mmd, MeshDeformBind *mdb)
{
NLContext *context;
float vec[3], gridvec[3];
@@ -1710,7 +1710,8 @@ static void meshdeform_matrix_solve(MeshDeformBind *mdb)
}
}
else {
- error("Mesh Deform: failed to find solution");
+ modifier_setError(&mmd->modifier, "Failed to find bind solution (increase precision?).");
+ error("Mesh Deform: failed to find bind solution.");
break;
}
@@ -1819,7 +1820,7 @@ static void harmonic_coordinates_bind(Scene *UNUSED(scene), MeshDeformModifierDa
meshdeform_check_semibound(mdb, x, y, z);
/* solve */
- meshdeform_matrix_solve(mdb);
+ meshdeform_matrix_solve(mmd, mdb);
/* assign results */
if(mmd->flag & MOD_MDEF_DYNAMIC_BIND) {
diff --git a/source/blender/editors/gpencil/drawgpencil.c b/source/blender/editors/gpencil/drawgpencil.c
index d40831f9e87..cf3961e0820 100644
--- a/source/blender/editors/gpencil/drawgpencil.c
+++ b/source/blender/editors/gpencil/drawgpencil.c
@@ -703,7 +703,7 @@ void draw_gpencil_2dimage (bContext *C, ImBuf *ibuf)
dflag |= GP_DRAWDATA_ONLYV2D|GP_DRAWDATA_IEDITHACK;
}
break;
-
+#if 0 /* removed since 2.5x, needs to be added back */
case SPACE_SEQ: /* sequence */
{
SpaceSeq *sseq= (SpaceSeq *)sa->spacedata.first;
@@ -728,7 +728,7 @@ void draw_gpencil_2dimage (bContext *C, ImBuf *ibuf)
dflag |= GP_DRAWDATA_ONLYI2D;
}
break;
-
+#endif
default: /* for spacetype not yet handled */
offsx= 0;
offsy= 0;
diff --git a/source/blender/editors/mesh/editmesh.c b/source/blender/editors/mesh/editmesh.c
index f6aae0e20ae..159ef3a46c7 100644
--- a/source/blender/editors/mesh/editmesh.c
+++ b/source/blender/editors/mesh/editmesh.c
@@ -743,7 +743,8 @@ void make_editMesh(Scene *scene, Object *ob)
EditSelection *ese;
float *co, (*keyco)[3]= NULL;
int tot, a, eekadoodle= 0;
- const short is_paint_sel= paint_facesel_test(ob);
+ const short is_paint_face_sel= paint_facesel_test(ob);
+ const short is_paint_vert_sel= is_paint_face_sel ? FALSE : paint_vertsel_test(ob);
if(me->edit_mesh==NULL)
me->edit_mesh= MEM_callocN(sizeof(EditMesh), "editmesh");
@@ -794,8 +795,8 @@ void make_editMesh(Scene *scene, Object *ob)
evlist[a]= eve;
/* face select sets selection in next loop */
- if(!is_paint_sel)
- eve->f |= (mvert->flag & 1);
+ if(!is_paint_face_sel)
+ eve->f |= (mvert->flag & SELECT);
if (mvert->flag & ME_HIDE) eve->h= 1;
normal_short_to_float_v3(eve->no, mvert->no);
@@ -821,15 +822,25 @@ void make_editMesh(Scene *scene, Object *ob)
eed= addedgelist(em, evlist[medge->v1], evlist[medge->v2], NULL);
/* eed can be zero when v1 and v2 are identical, dxf import does this... */
if(eed) {
+ int is_sel;
+ if (is_paint_vert_sel) {
+ /* when from vertex select, flush flags to edges,
+ * allow selection, code below handles editmode selection conversion */
+ is_sel= (eed->v1->f & SELECT) && (eed->v2->f & SELECT);
+ }
+ else {
+ is_sel= (medge->flag & SELECT);
+ }
+
eed->crease= ((float)medge->crease)/255.0f;
eed->bweight= ((float)medge->bweight)/255.0f;
if(medge->flag & ME_SEAM) eed->seam= 1;
if(medge->flag & ME_SHARP) eed->sharp = 1;
- if(medge->flag & SELECT) eed->f |= SELECT;
if(medge->flag & ME_FGON) eed->h= EM_FGON; // 2 different defines!
if(medge->flag & ME_HIDE) eed->h |= 1;
- if(em->selectmode==SCE_SELECT_EDGE)
+ if(is_sel) eed->f |= SELECT;
+ if(em->selectmode==SCE_SELECT_EDGE)
EM_select_edge(eed, eed->f & SELECT); // force edge selection to vertices, seems to be needed ...
CustomData_to_em_block(&me->edata,&em->edata, a, &eed->data);
}
@@ -859,15 +870,30 @@ void make_editMesh(Scene *scene, Object *ob)
if(mface->flag & ME_HIDE) {
efa->h= 1;
} else {
+ int is_sel;
+
+ if (!is_paint_vert_sel) {
+ is_sel= (mface->flag & ME_FACE_SEL);
+ }
+ else {
+ /* when from vertex select, flush flags to edges,
+ * allow selection, code below handles editmode selection conversion */
+ is_sel= ( (efa->v1->f & SELECT) &&
+ (efa->v2->f & SELECT) &&
+ (efa->v3->f & SELECT) &&
+ (efa->v4 == NULL || efa->v4->f & SELECT)
+ );
+ }
+
if (a==me->act_face) {
EM_set_actFace(em, efa);
}
/* dont allow hidden and selected */
- if(mface->flag & ME_FACE_SEL) {
+ if(is_sel) {
efa->f |= SELECT;
- if(is_paint_sel) {
+ if(is_paint_face_sel) {
EM_select_face(efa, 1); /* flush down */
}
diff --git a/source/blender/editors/mesh/editmesh_mods.c b/source/blender/editors/mesh/editmesh_mods.c
index a4d418aee69..b1754fa2f2e 100644
--- a/source/blender/editors/mesh/editmesh_mods.c
+++ b/source/blender/editors/mesh/editmesh_mods.c
@@ -4151,20 +4151,10 @@ static int smooth_vertex(bContext *C, wmOperator *op)
for (eve= em->verts.first; eve; eve= eve->next) {
if(eve->f & SELECT) {
- switch(mmd->axis){
- case 0:
- if (fabsf(eve->co[0]) < mmd->tolerance)
- eve->f2 |= 1;
- break;
- case 1:
- if (fabsf(eve->co[1]) < mmd->tolerance)
- eve->f2 |= 2;
- break;
- case 2:
- if (fabsf(eve->co[2]) < mmd->tolerance)
- eve->f2 |= 4;
- break;
- }
+ if (mmd->flag & MOD_MIR_AXIS_X && fabsf(eve->co[0]) < mmd->tolerance) eve->f2 |= 1;
+ if (mmd->flag & MOD_MIR_AXIS_Y && fabsf(eve->co[1]) < mmd->tolerance) eve->f2 |= 2;
+ if (mmd->flag & MOD_MIR_AXIS_Z && fabsf(eve->co[2]) < mmd->tolerance) eve->f2 |= 4;
+
}
}
}
diff --git a/source/blender/editors/mesh/editmesh_tools.c b/source/blender/editors/mesh/editmesh_tools.c
index acc6ab1fc0e..df81f80ade8 100644
--- a/source/blender/editors/mesh/editmesh_tools.c
+++ b/source/blender/editors/mesh/editmesh_tools.c
@@ -2666,20 +2666,11 @@ void esubdivideflag(Object *obedit, EditMesh *em, int flag, float smooth, float
if(mmd->flag & MOD_MIR_CLIPPING) {
for (eve= em->verts.first; eve; eve= eve->next) {
eve->f2= 0;
- switch(mmd->axis){
- case 0:
- if (fabsf(eve->co[0]) < mmd->tolerance)
- eve->f2 |= 1;
- break;
- case 1:
- if (fabsf(eve->co[1]) < mmd->tolerance)
- eve->f2 |= 2;
- break;
- case 2:
- if (fabsf(eve->co[2]) < mmd->tolerance)
- eve->f2 |= 4;
- break;
- }
+
+ if (mmd->flag & MOD_MIR_AXIS_X && fabsf(eve->co[0]) < mmd->tolerance) eve->f2 |= 1;
+ if (mmd->flag & MOD_MIR_AXIS_Y && fabsf(eve->co[1]) < mmd->tolerance) eve->f2 |= 2;
+ if (mmd->flag & MOD_MIR_AXIS_Z && fabsf(eve->co[2]) < mmd->tolerance) eve->f2 |= 4;
+
}
}
}
diff --git a/source/blender/editors/mesh/meshtools.c b/source/blender/editors/mesh/meshtools.c
index 3caafb12f82..707936351cf 100644
--- a/source/blender/editors/mesh/meshtools.c
+++ b/source/blender/editors/mesh/meshtools.c
@@ -497,7 +497,6 @@ int join_mesh_exec(bContext *C, wmOperator *op)
MEM_freeN(matar);
ob->totcol= me->totcol= totcol;
- ob->colbits= 0;
if (matmap) MEM_freeN(matmap);
diff --git a/source/blender/editors/metaball/mball_edit.c b/source/blender/editors/metaball/mball_edit.c
index a77a34e05ec..414d3344511 100644
--- a/source/blender/editors/metaball/mball_edit.c
+++ b/source/blender/editors/metaball/mball_edit.c
@@ -40,6 +40,7 @@
#include "BLI_rand.h"
#include "BLI_utildefines.h"
+#include "DNA_defs.h"
#include "DNA_meta_types.h"
#include "DNA_object_types.h"
#include "DNA_scene_types.h"
diff --git a/source/blender/editors/object/object_edit.c b/source/blender/editors/object/object_edit.c
index 722e7057ece..fc6f0937c3d 100644
--- a/source/blender/editors/object/object_edit.c
+++ b/source/blender/editors/object/object_edit.c
@@ -1142,7 +1142,7 @@ static void copy_attr(Main *bmain, Scene *scene, View3D *v3d, short event)
}
else if(event==3) { /* size */
copy_v3_v3(base->object->size, ob->size);
- copy_v3_v3(base->object->dsize, ob->dsize);
+ copy_v3_v3(base->object->dscale, ob->dscale);
}
else if(event==4) { /* drawtype */
base->object->dt= ob->dt;
diff --git a/source/blender/editors/object/object_relations.c b/source/blender/editors/object/object_relations.c
index 3a4cd6135cf..6b517b6eeb0 100644
--- a/source/blender/editors/object/object_relations.c
+++ b/source/blender/editors/object/object_relations.c
@@ -340,7 +340,7 @@ static int make_proxy_exec (bContext *C, wmOperator *op)
/* Add new object for the proxy */
newob= add_object(scene, OB_EMPTY);
- BLI_snprintf(name, sizeof(name), "%s_proxy", ((ID *)(gob ? gob : ob))->name);
+ BLI_snprintf(name, sizeof(name), "%s_proxy", ((ID *)(gob ? gob : ob))->name+2);
rename_id(&newob->id, name);
diff --git a/source/blender/editors/object/object_transform.c b/source/blender/editors/object/object_transform.c
index 0d2b35eec02..a83896e7280 100644
--- a/source/blender/editors/object/object_transform.c
+++ b/source/blender/editors/object/object_transform.c
@@ -188,15 +188,15 @@ static void object_clear_scale(Object *ob)
{
/* clear scale factors which are not locked */
if ((ob->protectflag & OB_LOCK_SCALEX)==0) {
- ob->dsize[0]= 1.0f;
+ ob->dscale[0]= 1.0f;
ob->size[0]= 1.0f;
}
if ((ob->protectflag & OB_LOCK_SCALEY)==0) {
- ob->dsize[1]= 1.0f;
+ ob->dscale[1]= 1.0f;
ob->size[1]= 1.0f;
}
if ((ob->protectflag & OB_LOCK_SCALEZ)==0) {
- ob->dsize[2]= 1.0f;
+ ob->dscale[2]= 1.0f;
ob->size[2]= 1.0f;
}
}
diff --git a/source/blender/editors/space_clip/tracking_ops.c b/source/blender/editors/space_clip/tracking_ops.c
index 89c58ab5d81..3d004ab73da 100644
--- a/source/blender/editors/space_clip/tracking_ops.c
+++ b/source/blender/editors/space_clip/tracking_ops.c
@@ -1209,11 +1209,16 @@ static int track_count_markers(SpaceClip *sc, MovieClip *clip)
{
int tot= 0;
MovieTrackingTrack *track;
+ int framenr= sc->user.framenr;
track= clip->tracking.tracks.first;
while(track) {
- if(TRACK_VIEW_SELECTED(sc, track) && (track->flag&TRACK_LOCKED)==0)
- tot++;
+ if(TRACK_VIEW_SELECTED(sc, track) && (track->flag&TRACK_LOCKED)==0) {
+ MovieTrackingMarker *marker= BKE_tracking_exact_marker(track, framenr);
+
+ if (!marker || (marker->flag&MARKER_DISABLED) == 0)
+ tot++;
+ }
track= track->next;
}
diff --git a/source/blender/editors/space_outliner/outliner_select.c b/source/blender/editors/space_outliner/outliner_select.c
index 42fe14cd59c..aa50b3d5154 100644
--- a/source/blender/editors/space_outliner/outliner_select.c
+++ b/source/blender/editors/space_outliner/outliner_select.c
@@ -237,7 +237,6 @@ static int tree_element_active_material(bContext *C, Scene *scene, SpaceOops *so
if(set) {
ob->actcol= te->index+1;
ob->matbits[te->index]= 1; // make ob material active too
- ob->colbits |= (1<<te->index);
}
else {
if(ob->actcol == te->index+1)
@@ -249,7 +248,6 @@ static int tree_element_active_material(bContext *C, Scene *scene, SpaceOops *so
if(set) {
ob->actcol= te->index+1;
ob->matbits[te->index]= 0; // make obdata material active too
- ob->colbits &= ~(1<<te->index);
}
else {
if(ob->actcol == te->index+1)
diff --git a/source/blender/editors/space_sequencer/space_sequencer.c b/source/blender/editors/space_sequencer/space_sequencer.c
index bf268b0e304..303f6912ff1 100644
--- a/source/blender/editors/space_sequencer/space_sequencer.c
+++ b/source/blender/editors/space_sequencer/space_sequencer.c
@@ -105,7 +105,6 @@ static SpaceLink *sequencer_new(const bContext *C)
sseq= MEM_callocN(sizeof(SpaceSeq), "initsequencer");
sseq->spacetype= SPACE_SEQ;
- sseq->zoom= 4;
sseq->chanshown = 0;
sseq->view = SEQ_VIEW_SEQUENCE;
sseq->mainb = SEQ_DRAW_IMG_IMBUF;
diff --git a/source/blender/editors/space_view3d/drawobject.c b/source/blender/editors/space_view3d/drawobject.c
index 673a5d30300..36f6e5c6ff7 100644
--- a/source/blender/editors/space_view3d/drawobject.c
+++ b/source/blender/editors/space_view3d/drawobject.c
@@ -689,7 +689,8 @@ static void drawcentercircle(View3D *v3d, RegionView3D *rv3d, const float co[3],
const float size= ED_view3d_pixel_size(rv3d, co) * (float)U.obcenter_dia * 0.5f;
float verts[CIRCLE_RESOL][3];
- /* using gldepthfunc guarantees that it does write z values, but not checks for it, so centers remain visible independt order of drawing */
+ /* using gldepthfunc guarantees that it does write z values,
+ * but not checks for it, so centers remain visible independt order of drawing */
if(v3d->zbuf) glDepthFunc(GL_ALWAYS);
glEnable(GL_BLEND);
@@ -750,10 +751,14 @@ void view3d_cached_text_draw_begin(void)
CachedTextLevel++;
}
-void view3d_cached_text_draw_add(const float co[3], const char *str, short xoffs, short flag, const unsigned char col[4])
+void view3d_cached_text_draw_add(const float co[3],
+ const char *str,
+ short xoffs, short flag,
+ const unsigned char col[4])
{
int alloc_len= strlen(str) + 1;
ListBase *strings= &CachedText[CachedTextLevel-1];
+ /* TODO, replace with more efficient malloc, perhaps memarena per draw? */
ViewCachedString *vos= MEM_callocN(sizeof(ViewCachedString) + alloc_len, "ViewCachedString");
BLI_addtail(strings, vos);
@@ -815,7 +820,9 @@ void view3d_cached_text_draw_end(View3D *v3d, ARegion *ar, int depth_write, floa
else glDepthMask(0);
for(vos= strings->first; vos; vos= vos->next) {
-#if 0 // too slow, reading opengl info while drawing is very bad, better to see if we can use the zbuffer while in pixel space - campbell
+ /* too slow, reading opengl info while drawing is very bad,
+ * better to see if we can use the zbuffer while in pixel space - campbell */
+#if 0
if(v3d->zbuf && (vos->flag & V3D_CACHE_TEXT_ZBUF)) {
gluProject(vos->vec[0], vos->vec[1], vos->vec[2], mats.modelview, mats.projection, (GLint *)mats.viewport, &ux, &uy, &uz);
glReadPixels(ar->winrct.xmin+vos->mval[0]+vos->xoffs, ar->winrct.ymin+vos->mval[1], 1, 1, GL_DEPTH_COMPONENT, GL_FLOAT, &depth);
@@ -831,12 +838,14 @@ void view3d_cached_text_draw_end(View3D *v3d, ARegion *ar, int depth_write, floa
glColor3ubv(vos->col.ub);
col_pack_prev= vos->col.pack;
}
- if(vos->flag & V3D_CACHE_TEXT_ASCII) {
- BLF_draw_default_ascii((float)vos->sco[0]+vos->xoffs, (float)vos->sco[1], (depth_write)? 0.0f: 2.0f, str, vos->str_len);
- }
- else {
- BLF_draw_default((float)vos->sco[0]+vos->xoffs, (float)vos->sco[1], (depth_write)? 0.0f: 2.0f, str, vos->str_len);
- }
+ ((vos->flag & V3D_CACHE_TEXT_ASCII) ?
+ BLF_draw_default_ascii :
+ BLF_draw_default
+ ) ( (float)vos->sco[0] + vos->xoffs,
+ (float)vos->sco[1],
+ (depth_write) ? 0.0f: 2.0f,
+ str,
+ vos->str_len);
}
}
@@ -891,8 +900,12 @@ static void drawcube(void)
static void drawcube_size(float size)
{
glBegin(GL_LINE_STRIP);
- glVertex3f(-size,-size,-size); glVertex3f(-size,-size,size);glVertex3f(-size,size,size); glVertex3f(-size,size,-size);
- glVertex3f(-size,-size,-size); glVertex3f(size,-size,-size);glVertex3f(size,-size,size); glVertex3f(size,size,size);
+ glVertex3f(-size,-size,-size); glVertex3f(-size,-size,size);
+ glVertex3f(-size,size,size); glVertex3f(-size,size,-size);
+
+ glVertex3f(-size,-size,-size); glVertex3f(size,-size,-size);
+ glVertex3f(size,-size,size); glVertex3f(size,size,size);
+
glVertex3f(size,size,-size); glVertex3f(size,-size,-size);
glEnd();
@@ -1717,7 +1730,8 @@ static void drawcamera(Scene *scene, View3D *v3d, RegionView3D *rv3d, Base *base
}
/* flag similar to draw_object() */
-static void drawspeaker(Scene *UNUSED(scene), View3D *UNUSED(v3d), RegionView3D *UNUSED(rv3d), Object *UNUSED(ob), int UNUSED(flag))
+static void drawspeaker(Scene *UNUSED(scene), View3D *UNUSED(v3d), RegionView3D *UNUSED(rv3d),
+ Object *UNUSED(ob), int UNUSED(flag))
{
//Speaker *spk = ob->data;
@@ -1919,7 +1933,10 @@ static void mesh_foreachScreenVert__mapFunc(void *userData, int index, float *co
}
}
-void mesh_foreachScreenVert(ViewContext *vc, void (*func)(void *userData, EditVert *eve, int x, int y, int index), void *userData, eV3DClipTest clipVerts)
+void mesh_foreachScreenVert(
+ ViewContext *vc,
+ void (*func)(void *userData, EditVert *eve, int x, int y, int index),
+ void *userData, eV3DClipTest clipVerts)
{
struct { void (*func)(void *userData, EditVert *eve, int x, int y, int index);
void *userData; ViewContext vc; eV3DClipTest clipVerts; } data;
@@ -2004,7 +2021,10 @@ static void mesh_foreachScreenEdge__mapFunc(void *userData, int index, float *v0
}
}
-void mesh_foreachScreenEdge(ViewContext *vc, void (*func)(void *userData, EditEdge *eed, int x0, int y0, int x1, int y1, int index), void *userData, eV3DClipTest clipVerts)
+void mesh_foreachScreenEdge(
+ ViewContext *vc,
+ void (*func)(void *userData, EditEdge *eed, int x0, int y0, int x1, int y1, int index),
+ void *userData, eV3DClipTest clipVerts)
{
struct { void (*func)(void *userData, EditEdge *eed, int x0, int y0, int x1, int y1, int index);
void *userData; ViewContext vc; eV3DClipTest clipVerts; } data;
@@ -2040,7 +2060,10 @@ static void mesh_foreachScreenFace__mapFunc(void *userData, int index, float *ce
}
}
-void mesh_foreachScreenFace(ViewContext *vc, void (*func)(void *userData, EditFace *efa, int x, int y, int index), void *userData)
+void mesh_foreachScreenFace(
+ ViewContext *vc,
+ void (*func)(void *userData, EditFace *efa, int x, int y, int index),
+ void *userData)
{
struct { void (*func)(void *userData, EditFace *efa, int x, int y, int index); void *userData; ViewContext vc; } data;
DerivedMesh *dm = editmesh_get_derived_cage(vc->scene, vc->obedit, vc->em, CD_MASK_BAREMESH);
@@ -2059,7 +2082,10 @@ void mesh_foreachScreenFace(ViewContext *vc, void (*func)(void *userData, EditFa
dm->release(dm);
}
-void nurbs_foreachScreenVert(ViewContext *vc, void (*func)(void *userData, Nurb *nu, BPoint *bp, BezTriple *bezt, int beztindex, int x, int y), void *userData)
+void nurbs_foreachScreenVert(
+ ViewContext *vc,
+ void (*func)(void *userData, Nurb *nu, BPoint *bp, BezTriple *bezt, int beztindex, int x, int y),
+ void *userData)
{
Curve *cu= vc->obedit->data;
short s[2] = {IS_CLIPPED, 0};
@@ -2747,7 +2773,8 @@ static int draw_em_fancy__setGLSLFaceOpts(void *UNUSED(userData), int index)
return (efa->h==0);
}
-static void draw_em_fancy(Scene *scene, View3D *v3d, RegionView3D *rv3d, Object *ob, EditMesh *em, DerivedMesh *cageDM, DerivedMesh *finalDM, int dt)
+static void draw_em_fancy(Scene *scene, View3D *v3d, RegionView3D *rv3d,
+ Object *ob, EditMesh *em, DerivedMesh *cageDM, DerivedMesh *finalDM, int dt)
{
Mesh *me = ob->data;
EditFace *efa_act = EM_get_actFace(em, 0); /* annoying but active faces is stored differently */
@@ -2784,7 +2811,8 @@ static void draw_em_fancy(Scene *scene, View3D *v3d, RegionView3D *rv3d, Object
}
}
else {
- /* 3 floats for position, 3 for normal and times two because the faces may actually be quads instead of triangles */
+ /* 3 floats for position,
+ * 3 for normal and times two because the faces may actually be quads instead of triangles */
glLightModeli(GL_LIGHT_MODEL_TWO_SIDE, me->flag & ME_TWOSIDED);
glEnable(GL_LIGHTING);
@@ -2897,8 +2925,11 @@ static void draw_em_fancy(Scene *scene, View3D *v3d, RegionView3D *rv3d, Object
draw_dm_vert_normals(scene, cageDM);
}
- if(me->drawflag & (ME_DRAWEXTRA_EDGELEN|ME_DRAWEXTRA_FACEAREA|ME_DRAWEXTRA_FACEANG) && !((v3d->flag2 & V3D_RENDER_OVERRIDE)))
+ if ( (me->drawflag & (ME_DRAWEXTRA_EDGELEN|ME_DRAWEXTRA_FACEAREA|ME_DRAWEXTRA_FACEANG)) &&
+ !(v3d->flag2 & V3D_RENDER_OVERRIDE))
+ {
draw_em_measure_stats(v3d, rv3d, ob, em, &scene->unit);
+ }
}
if(dt>OB_WIRE) {
@@ -2952,7 +2983,8 @@ static void draw_mesh_fancy(Scene *scene, ARegion *ar, View3D *v3d, RegionView3D
int /* totvert,*/ totedge, totface;
DerivedMesh *dm= mesh_get_derived_final(scene, ob, scene->customdata_mask);
ModifierData *md = NULL;
- int draw_flags = (ob==OBACT && paint_facesel_test(ob)) ? DRAW_FACE_SELECT : 0;
+ const short is_obact= (ob != NULL && ob == OBACT);
+ int draw_flags = (is_obact && paint_facesel_test(ob)) ? DRAW_FACE_SELECT : 0;
if(!dm)
return;
@@ -2999,7 +3031,7 @@ static void draw_mesh_fancy(Scene *scene, ARegion *ar, View3D *v3d, RegionView3D
else if(dt==OB_WIRE || totface==0) {
draw_wire= OBDRAW_WIRE_ON; /* draw wire only, no depth buffer stuff */
}
- else if ( (draw_flags & DRAW_FACE_SELECT || (ob==OBACT && ob->mode & OB_MODE_TEXTURE_PAINT)) ||
+ else if ( (draw_flags & DRAW_FACE_SELECT || (is_obact && ob->mode & OB_MODE_TEXTURE_PAINT)) ||
CHECK_OB_DRAWTEXTURE(v3d, dt))
{
if ( (v3d->flag & V3D_SELECT_OUTLINE) &&
@@ -3027,7 +3059,7 @@ static void draw_mesh_fancy(Scene *scene, ARegion *ar, View3D *v3d, RegionView3D
if(!(draw_flags & DRAW_FACE_SELECT)) {
if(base->flag & SELECT)
- UI_ThemeColor((ob==OBACT)?TH_ACTIVE:TH_SELECT);
+ UI_ThemeColor(is_obact ? TH_ACTIVE : TH_SELECT);
else
UI_ThemeColor(TH_WIRE);
@@ -3036,7 +3068,7 @@ static void draw_mesh_fancy(Scene *scene, ARegion *ar, View3D *v3d, RegionView3D
}
}
else if(dt==OB_SOLID) {
- if(ob==OBACT && ob && ob->mode & OB_MODE_WEIGHT_PAINT) {
+ if(is_obact && ob->mode & OB_MODE_WEIGHT_PAINT) {
/* weight paint in solid mode, special case. focus on making the weights clear
* rather than the shading, this is also forced in wire view */
GPU_enable_material(0, NULL);
@@ -3140,7 +3172,7 @@ static void draw_mesh_fancy(Scene *scene, ARegion *ar, View3D *v3d, RegionView3D
glDisable(GL_LIGHTING);
if(base->flag & SELECT) {
- UI_ThemeColor((ob==OBACT)?TH_ACTIVE:TH_SELECT);
+ UI_ThemeColor(is_obact ? TH_ACTIVE : TH_SELECT);
} else {
UI_ThemeColor(TH_WIRE);
}
@@ -3149,7 +3181,7 @@ static void draw_mesh_fancy(Scene *scene, ARegion *ar, View3D *v3d, RegionView3D
}
}
else if(dt==OB_PAINT) {
- if(ob==OBACT) {
+ if (is_obact) {
if(ob && ob->mode & OB_MODE_WEIGHT_PAINT) {
/* enforce default material settings */
GPU_enable_material(0, NULL);
@@ -3184,12 +3216,12 @@ static void draw_mesh_fancy(Scene *scene, ARegion *ar, View3D *v3d, RegionView3D
/* set default draw color back for wire or for draw-extra later on */
if (dt!=OB_WIRE) {
if(base->flag & SELECT) {
- if(ob==OBACT && ob->flag & OB_FROMGROUP)
+ if (is_obact && ob->flag & OB_FROMGROUP)
UI_ThemeColor(TH_GROUP_ACTIVE);
else if(ob->flag & OB_FROMGROUP)
UI_ThemeColorShade(TH_GROUP_ACTIVE, -16);
else if(flag!=DRAW_CONSTCOLOR)
- UI_ThemeColor((ob==OBACT)?TH_ACTIVE:TH_SELECT);
+ UI_ThemeColor(is_obact ? TH_ACTIVE : TH_SELECT);
else
glColor3ub(80,80,80);
} else {
@@ -3208,7 +3240,7 @@ static void draw_mesh_fancy(Scene *scene, ARegion *ar, View3D *v3d, RegionView3D
/* When using wireframe object traw in particle edit mode
* the mesh gets in the way of seeing the particles, fade the wire color
* with the background. */
- if(ob==OBACT && (ob->mode & OB_MODE_PARTICLE_EDIT)) {
+ if(is_obact && (ob->mode & OB_MODE_PARTICLE_EDIT)) {
float col_wire[4], col_bg[4], col[3];
UI_GetThemeColor3fv(TH_BACK, col_bg);
@@ -3240,7 +3272,7 @@ static void draw_mesh_fancy(Scene *scene, ARegion *ar, View3D *v3d, RegionView3D
}
}
- if(paint_vertsel_test(ob)) {
+ if(is_obact && paint_vertsel_test(ob)) {
glColor3f(0.0f, 0.0f, 0.0f);
glPointSize(UI_GetThemeValuef(TH_VERTEX_SIZE));
@@ -3741,7 +3773,8 @@ static void draw_particle_arrays(int draw_as, int totpoint, int ob_dt, int selec
break;
}
}
-static void draw_particle(ParticleKey *state, int draw_as, short draw, float pixsize, float imat[4][4], float *draw_line, ParticleBillboardData *bb, ParticleDrawData *pdd)
+static void draw_particle(ParticleKey *state, int draw_as, short draw, float pixsize,
+ float imat[4][4], float *draw_line, ParticleBillboardData *bb, ParticleDrawData *pdd)
{
float vec[3], vec2[3];
float *vd = NULL;
@@ -3896,7 +3929,8 @@ static void draw_particle(ParticleKey *state, int draw_as, short draw, float pix
/* 5. start filling the arrays */
/* 6. draw the arrays */
/* 7. clean up */
-static void draw_new_particle_system(Scene *scene, View3D *v3d, RegionView3D *rv3d, Base *base, ParticleSystem *psys, int ob_dt)
+static void draw_new_particle_system(Scene *scene, View3D *v3d, RegionView3D *rv3d,
+ Base *base, ParticleSystem *psys, int ob_dt)
{
Object *ob=base->object;
ParticleEditSettings *pset = PE_settings(scene);
@@ -6063,7 +6097,7 @@ void draw_object(Scene *scene, ARegion *ar, View3D *v3d, Base *base, int flag)
{
static int warning_recursive= 0;
ModifierData *md = NULL;
- Object *ob;
+ Object *ob= base->object;
Curve *cu;
RegionView3D *rv3d= ar->regiondata;
float vec1[3], vec2[3];
@@ -6071,12 +6105,11 @@ void draw_object(Scene *scene, ARegion *ar, View3D *v3d, Base *base, int flag)
int /*sel, drawtype,*/ colindex= 0;
int i, selstart, selend, empty_object=0;
short dt, dtx, zbufoff= 0;
+ const short is_obact= (ob != NULL && ob == OBACT);
/* only once set now, will be removed too, should become a global standard */
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
- ob= base->object;
-
if (ob!=scene->obedit) {
if (ob->restrictflag & OB_RESTRICT_VIEW)
return;
@@ -6202,7 +6235,7 @@ void draw_object(Scene *scene, ARegion *ar, View3D *v3d, Base *base, int flag)
dtx= 0;
/* faceselect exception: also draw solid when dt==wire, except in editmode */
- if(ob==OBACT && (ob->mode & (OB_MODE_VERTEX_PAINT|OB_MODE_WEIGHT_PAINT|OB_MODE_TEXTURE_PAINT))) {
+ if (is_obact && (ob->mode & (OB_MODE_VERTEX_PAINT|OB_MODE_WEIGHT_PAINT|OB_MODE_TEXTURE_PAINT))) {
if(ob->type==OB_MESH) {
if(ob->mode & OB_MODE_EDIT);
@@ -6398,9 +6431,12 @@ void draw_object(Scene *scene, ARegion *ar, View3D *v3d, Base *base, int flag)
}
break;
case OB_CAMERA:
- if((v3d->flag2 & V3D_RENDER_OVERRIDE)==0 || (rv3d->persp==RV3D_CAMOB && v3d->camera==ob)) /* special exception for active camera */
- drawcamera(scene, v3d, rv3d, base, flag);
+ if ( (v3d->flag2 & V3D_RENDER_OVERRIDE)==0 ||
+ (rv3d->persp==RV3D_CAMOB && v3d->camera==ob)) /* special exception for active camera */
+ {
+ drawcamera(scene, v3d, rv3d, base, flag);
break;
+ }
case OB_SPEAKER:
if((v3d->flag2 & V3D_RENDER_OVERRIDE)==0)
drawspeaker(scene, v3d, rv3d, ob, flag);
@@ -6464,7 +6500,7 @@ void draw_object(Scene *scene, ARegion *ar, View3D *v3d, Base *base, int flag)
for(psys=ob->particlesystem.first; psys; psys=psys->next) {
/* run this so that possible child particles get cached */
- if(ob->mode & OB_MODE_PARTICLE_EDIT && ob==OBACT) {
+ if (ob->mode & OB_MODE_PARTICLE_EDIT && is_obact) {
PTCacheEdit *edit = PE_create_current(scene, ob);
if(edit && edit->psys == psys)
draw_update_ptcache_edit(scene, ob, edit);
@@ -6482,12 +6518,12 @@ void draw_object(Scene *scene, ARegion *ar, View3D *v3d, Base *base, int flag)
}
/* draw edit particles last so that they can draw over child particles */
- if( (warning_recursive==0) &&
- (flag & DRAW_PICKING)==0 &&
- (!scene->obedit)
- ) {
+ if ( (warning_recursive==0) &&
+ (flag & DRAW_PICKING)==0 &&
+ (!scene->obedit))
+ {
- if(ob->mode & OB_MODE_PARTICLE_EDIT && ob==OBACT) {
+ if (ob->mode & OB_MODE_PARTICLE_EDIT && is_obact) {
PTCacheEdit *edit = PE_create_current(scene, ob);
if(edit) {
glLoadMatrixf(rv3d->viewmat);
@@ -6547,7 +6583,10 @@ void draw_object(Scene *scene, ARegion *ar, View3D *v3d, Base *base, int flag)
// #if 0
smd->domain->tex = NULL;
GPU_create_smoke(smd, 0);
- draw_volume(ar, smd->domain->tex, smd->domain->p0, smd->domain->p1, smd->domain->res, smd->domain->dx, smd->domain->tex_shadow);
+ draw_volume(ar, smd->domain->tex,
+ smd->domain->p0, smd->domain->p1,
+ smd->domain->res, smd->domain->dx,
+ smd->domain->tex_shadow);
GPU_free_smoke(smd);
// #endif
#if 0
@@ -6598,7 +6637,10 @@ void draw_object(Scene *scene, ARegion *ar, View3D *v3d, Base *base, int flag)
{
smd->domain->tex = NULL;
GPU_create_smoke(smd, 1);
- draw_volume(ar, smd->domain->tex, smd->domain->p0, smd->domain->p1, smd->domain->res_wt, smd->domain->dx_wt, smd->domain->tex_shadow);
+ draw_volume(ar, smd->domain->tex,
+ smd->domain->p0, smd->domain->p1,
+ smd->domain->res_wt, smd->domain->dx_wt,
+ smd->domain->tex_shadow);
GPU_free_smoke(smd);
}
}
@@ -6679,7 +6721,7 @@ void draw_object(Scene *scene, ARegion *ar, View3D *v3d, Base *base, int flag)
if(v3d->flag2 & V3D_RENDER_OVERRIDE) return;
/* object centers, need to be drawn in viewmat space for speed, but OK for picking select */
- if(ob!=OBACT || !(ob->mode & (OB_MODE_VERTEX_PAINT|OB_MODE_WEIGHT_PAINT|OB_MODE_TEXTURE_PAINT))) {
+ if (!is_obact || !(ob->mode & (OB_MODE_VERTEX_PAINT|OB_MODE_WEIGHT_PAINT|OB_MODE_TEXTURE_PAINT))) {
int do_draw_center= -1; /* defines below are zero or positive... */
if(v3d->flag2 & V3D_RENDER_OVERRIDE) {
@@ -6917,9 +6959,11 @@ static void bbs_mesh_solid(Scene *scene, Object *ob)
Mesh *me = (Mesh*)ob->data;
glColor3ub(0, 0, 0);
-
- if((me->editflag & ME_EDIT_PAINT_MASK)) dm->drawMappedFaces(dm, bbs_mesh_solid_hide__setDrawOpts, GPU_enable_material, NULL, me, 0);
- else dm->drawMappedFaces(dm, bbs_mesh_solid__setDrawOpts, GPU_enable_material, NULL, me, 0);
+
+ if((me->editflag & ME_EDIT_PAINT_MASK))
+ dm->drawMappedFaces(dm, bbs_mesh_solid_hide__setDrawOpts, GPU_enable_material, NULL, me, 0);
+ else
+ dm->drawMappedFaces(dm, bbs_mesh_solid__setDrawOpts, GPU_enable_material, NULL, me, 0);
dm->release(dm);
}
diff --git a/source/blender/editors/transform/transform.h b/source/blender/editors/transform/transform.h
index 8b8ae95631c..fcc285d52f0 100644
--- a/source/blender/editors/transform/transform.h
+++ b/source/blender/editors/transform/transform.h
@@ -130,7 +130,7 @@ typedef struct TransDataExtension {
// float drotAngle; /* Initial object drotAngle, TODO: not yet implimented */
// float drotAxis[3]; /* Initial object drotAxis, TODO: not yet implimented */
float dquat[4]; /* Initial object dquat */
- float dsize[3]; /* Initial object dsize */
+ float dscale[3]; /* Initial object dscale */
float *rot; /* Rotation of the data to transform (Faculative) */
float irot[3]; /* Initial rotation */
float *quat; /* Rotation quaternion of the data to transform (Faculative) */
diff --git a/source/blender/editors/transform/transform_conversions.c b/source/blender/editors/transform/transform_conversions.c
index e19c115b194..5527ab0d331 100644
--- a/source/blender/editors/transform/transform_conversions.c
+++ b/source/blender/editors/transform/transform_conversions.c
@@ -4314,7 +4314,7 @@ static void ObjectToTransData(TransInfo *t, TransData *td, Object *ob)
td->ext->size = ob->size;
copy_v3_v3(td->ext->isize, ob->size);
- copy_v3_v3(td->ext->dsize, ob->dsize);
+ copy_v3_v3(td->ext->dscale, ob->dscale);
copy_v3_v3(td->center, ob->obmat[3]);
diff --git a/source/blender/editors/transform/transform_input.c b/source/blender/editors/transform/transform_input.c
index 3de68a6e312..a4f03e76fd1 100644
--- a/source/blender/editors/transform/transform_input.c
+++ b/source/blender/editors/transform/transform_input.c
@@ -189,16 +189,16 @@ void setCustomPoints(TransInfo *UNUSED(t), MouseInput *mi, int start[2], int end
static void InputCustomRatio(TransInfo *UNUSED(t), MouseInput *mi, const int mval[2], float output[3])
{
- float length;
- float distance;
+ double length;
+ double distance;
+ double dx, dy;
int *data = mi->data;
- int dx, dy;
if (data) {
dx = data[2] - data[0];
dy = data[3] - data[1];
- length = (float)sqrtf(dx*dx + dy*dy);
+ length = sqrt(dx*dx + dy*dy);
if (mi->precision) {
/* deal with Shift key by adding motion / 10 to motion before shift press */
@@ -216,7 +216,7 @@ static void InputCustomRatio(TransInfo *UNUSED(t), MouseInput *mi, const int mva
distance = (length != 0.0f)? (mdx*dx + mdy*dy) / length: 0.0f;
}
- output[0] = (length != 0.0f)? distance / length: 0.0f;
+ output[0] = (float)((length != 0.0f)? distance / length: 0.0f);
}
}
diff --git a/source/blender/editors/uvedit/uvedit_unwrap_ops.c b/source/blender/editors/uvedit/uvedit_unwrap_ops.c
index c565e2fc305..830dc224c94 100644
--- a/source/blender/editors/uvedit/uvedit_unwrap_ops.c
+++ b/source/blender/editors/uvedit/uvedit_unwrap_ops.c
@@ -1342,16 +1342,9 @@ static int cube_project_exec(bContext *C, wmOperator *op)
if(efa->f & SELECT) {
tf= CustomData_em_get(&em->fdata, efa->data, CD_MTFACE);
normal_tri_v3( no,efa->v1->co, efa->v2->co, efa->v3->co);
-
- no[0]= fabs(no[0]);
- no[1]= fabs(no[1]);
- no[2]= fabs(no[2]);
-
- cox=0; coy= 1;
- if(no[2]>=no[0] && no[2]>=no[1]);
- else if(no[1]>=no[0] && no[1]>=no[2]) coy= 2;
- else { cox= 1; coy= 2; }
-
+
+ axis_dominant_v3(&cox, &coy, no);
+
tf->uv[0][0]= 0.5f+0.5f*cube_size*(loc[cox] + efa->v1->co[cox]);
tf->uv[0][1]= 0.5f+0.5f*cube_size*(loc[coy] + efa->v1->co[coy]);
dx = floor(tf->uv[0][0]);
diff --git a/source/blender/makesdna/DNA_action_types.h b/source/blender/makesdna/DNA_action_types.h
index b198231df3a..7dce437e543 100644
--- a/source/blender/makesdna/DNA_action_types.h
+++ b/source/blender/makesdna/DNA_action_types.h
@@ -582,7 +582,7 @@ typedef struct SpaceAction {
short blockhandler[8];
- View2D v2d; /* depricated, copied to region */
+ View2D v2d DNA_DEPRECATED; /* copied to region */
bAction *action; /* the currently active action */
bDopeSheet ads; /* the currently active context (when not showing action) */
diff --git a/source/blender/makesdna/DNA_camera_types.h b/source/blender/makesdna/DNA_camera_types.h
index 292f920da66..ff04a7fd366 100644
--- a/source/blender/makesdna/DNA_camera_types.h
+++ b/source/blender/makesdna/DNA_camera_types.h
@@ -31,6 +31,8 @@
* \ingroup DNA
*/
+#include "DNA_defs.h"
+
#include "DNA_ID.h"
#ifdef __cplusplus
@@ -59,7 +61,7 @@ typedef struct Camera {
The name was not changed so that no other files need to be modified */
float YF_dofdist;
- struct Ipo *ipo; // XXX depreceated... old animation system
+ struct Ipo *ipo DNA_DEPRECATED; /* old animation system, deprecated for 2.5 */
struct Object *dof_ob;
diff --git a/source/blender/makesdna/DNA_constraint_types.h b/source/blender/makesdna/DNA_constraint_types.h
index c85ef72d337..4aff540a948 100644
--- a/source/blender/makesdna/DNA_constraint_types.h
+++ b/source/blender/makesdna/DNA_constraint_types.h
@@ -33,6 +33,7 @@
* \ingroup DNA
*/
+#include "DNA_defs.h"
#include "DNA_ID.h"
#include "DNA_listBase.h"
@@ -66,7 +67,7 @@ typedef struct bConstraint {
float headtail; /* Point along subtarget bone where the actual target is. 0=head (default for all), 1=tail*/
int pad;
- struct Ipo *ipo; /* local influence ipo or driver */ // XXX depreceated for 2.5... old animation system hack
+ struct Ipo *ipo DNA_DEPRECATED; /* local influence ipo or driver */ /* old animation system, deprecated for 2.5 */
/* below are readonly fields that are set at runtime by the solver for use in the GE (only IK atm) */
float lin_error; /* residual error on constraint expressed in blender unit*/
diff --git a/source/blender/makesdna/DNA_curve_types.h b/source/blender/makesdna/DNA_curve_types.h
index 236d6dd4732..8214a32e9fb 100644
--- a/source/blender/makesdna/DNA_curve_types.h
+++ b/source/blender/makesdna/DNA_curve_types.h
@@ -31,6 +31,7 @@
* \ingroup DNA
*/
+#include "DNA_defs.h"
#include "DNA_listBase.h"
#include "DNA_vec_types.h"
#include "DNA_ID.h"
@@ -174,7 +175,7 @@ typedef struct Curve {
EditNurb *editnurb; /* edited data, not in file, use pointer so we can check for it */
struct Object *bevobj, *taperobj, *textoncurve;
- struct Ipo *ipo; // XXX depreceated... old animation system
+ struct Ipo *ipo DNA_DEPRECATED; /* old animation system, deprecated for 2.5 */
Path *path;
struct Key *key;
struct Material **mat;
diff --git a/source/blender/makesdna/DNA_defs.h b/source/blender/makesdna/DNA_defs.h
new file mode 100644
index 00000000000..88401d3d2d4
--- /dev/null
+++ b/source/blender/makesdna/DNA_defs.h
@@ -0,0 +1,45 @@
+/*
+ * ***** 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ * Contributor(s): Campbell Barton
+ *
+ * ***** END GPL LICENSE BLOCK *****
+ */
+
+#ifndef DNA_DEFS_H
+#define DNA_DEFS_H
+
+/** \file DNA_defs.h
+ * \ingroup DNA
+ */
+
+/* makesdna ignores */
+#ifdef DNA_DEPRECATED_ALLOW
+ /* allow use of deprecated items */
+# define DNA_DEPRECATED
+#else
+# ifndef DNA_DEPRECATED
+# ifdef __GNUC__
+# define DNA_DEPRECATED __attribute__ ((deprecated))
+# else
+ /* TODO, msvc & others */
+# define DNA_DEPRECATED
+# endif
+# endif
+#endif
+
+#endif /* DNA_DEFS_H */
diff --git a/source/blender/makesdna/DNA_key_types.h b/source/blender/makesdna/DNA_key_types.h
index 105aa4280ef..12fb9b92602 100644
--- a/source/blender/makesdna/DNA_key_types.h
+++ b/source/blender/makesdna/DNA_key_types.h
@@ -31,6 +31,7 @@
* \ingroup DNA
*/
+#include "DNA_defs.h"
#include "DNA_listBase.h"
#include "DNA_ID.h"
@@ -62,10 +63,10 @@ typedef struct Key {
KeyBlock *refkey;
char elemstr[32];
int elemsize;
- float curval;
+ float curval DNA_DEPRECATED;
ListBase block;
- struct Ipo *ipo; // XXX depreceated... old animation system
+ struct Ipo *ipo DNA_DEPRECATED; /* old animation system, deprecated for 2.5 */
ID *from;
@@ -93,4 +94,3 @@ typedef struct Key {
#define KEYBLOCK_LOCKED (1<<2)
#endif
-
diff --git a/source/blender/makesdna/DNA_lamp_types.h b/source/blender/makesdna/DNA_lamp_types.h
index 91930f5766e..1c22583b82c 100644
--- a/source/blender/makesdna/DNA_lamp_types.h
+++ b/source/blender/makesdna/DNA_lamp_types.h
@@ -31,6 +31,7 @@
* \ingroup DNA
*/
+#include "DNA_defs.h"
#include "DNA_ID.h"
#ifndef MAX_MTEX
@@ -97,7 +98,7 @@ typedef struct Lamp {
short sky_colorspace;
char pad4[6];
- struct Ipo *ipo; // XXX depreceated... old animation system
+ struct Ipo *ipo DNA_DEPRECATED; /* old animation system, deprecated for 2.5 */
struct MTex *mtex[18]; /* MAX_MTEX */
short pr_texture, use_nodes;
char pad6[4];
diff --git a/source/blender/makesdna/DNA_lattice_types.h b/source/blender/makesdna/DNA_lattice_types.h
index f694e611089..baa2f5f911a 100644
--- a/source/blender/makesdna/DNA_lattice_types.h
+++ b/source/blender/makesdna/DNA_lattice_types.h
@@ -31,6 +31,7 @@
* \ingroup DNA
*/
+#include "DNA_defs.h"
#include "DNA_ID.h"
struct AnimData;
@@ -60,7 +61,7 @@ typedef struct Lattice {
struct BPoint *def;
- struct Ipo *ipo; /* XXX: depreceated... old animation system */
+ struct Ipo *ipo DNA_DEPRECATED; /* old animation system, deprecated for 2.5 */
struct Key *key;
struct MDeformVert *dvert;
diff --git a/source/blender/makesdna/DNA_material_types.h b/source/blender/makesdna/DNA_material_types.h
index ea168d953bc..3e1cdd08086 100644
--- a/source/blender/makesdna/DNA_material_types.h
+++ b/source/blender/makesdna/DNA_material_types.h
@@ -31,6 +31,7 @@
* \ingroup DNA
*/
+#include "DNA_defs.h"
#include "DNA_ID.h"
#include "DNA_listBase.h"
@@ -150,7 +151,7 @@ typedef struct Material {
struct MTex *mtex[18]; /* MAX_MTEX */
struct bNodeTree *nodetree;
- struct Ipo *ipo; // XXX depreceated... old animation system
+ struct Ipo *ipo DNA_DEPRECATED; /* old animation system, deprecated for 2.5 */
struct Group *group; /* light group */
struct PreviewImage * preview;
diff --git a/source/blender/makesdna/DNA_mesh_types.h b/source/blender/makesdna/DNA_mesh_types.h
index bb67b46a7e5..b7d9208e595 100644
--- a/source/blender/makesdna/DNA_mesh_types.h
+++ b/source/blender/makesdna/DNA_mesh_types.h
@@ -31,6 +31,7 @@
* \ingroup DNA
*/
+#include "DNA_defs.h"
#include "DNA_listBase.h"
#include "DNA_ID.h"
#include "DNA_customdata_types.h"
@@ -57,7 +58,7 @@ typedef struct Mesh {
struct BoundBox *bb;
- struct Ipo *ipo; // XXX depreceated... old animation system
+ struct Ipo *ipo DNA_DEPRECATED; /* old animation system, deprecated for 2.5 */
struct Key *key;
struct Material **mat;
@@ -92,13 +93,13 @@ typedef struct Mesh {
short texflag, drawflag;
short smoothresh, flag;
- short subdiv, subdivr;
- char subsurftype; /* only kept for backwards compat, not used anymore */
+ short subdiv DNA_DEPRECATED, subdivr DNA_DEPRECATED;
+ char subsurftype DNA_DEPRECATED; /* only kept for backwards compat, not used anymore */
char editflag;
short totcol;
- struct Multires *mr; /* deprecated multiresolution modeling data, only keep for loading old files */
+ struct Multires *mr DNA_DEPRECATED; /* deprecated multiresolution modeling data, only keep for loading old files */
struct PartialVisibility *pv;
} Mesh;
diff --git a/source/blender/makesdna/DNA_meta_types.h b/source/blender/makesdna/DNA_meta_types.h
index 12345ede3c4..1ce90e7d526 100644
--- a/source/blender/makesdna/DNA_meta_types.h
+++ b/source/blender/makesdna/DNA_meta_types.h
@@ -70,7 +70,7 @@ typedef struct MetaBall {
ListBase elems;
ListBase disp;
ListBase *editelems; /* not saved in files, note we use pointer for editmode check */
- struct Ipo *ipo; // XXX... depreceated (old animation system)
+ struct Ipo *ipo DNA_DEPRECATED; /* old animation system, deprecated for 2.5 */
/* material of the mother ball will define the material used of all others */
struct Material **mat;
diff --git a/source/blender/makesdna/DNA_modifier_types.h b/source/blender/makesdna/DNA_modifier_types.h
index 4abbbd7146d..5edc0869d9b 100644
--- a/source/blender/makesdna/DNA_modifier_types.h
+++ b/source/blender/makesdna/DNA_modifier_types.h
@@ -25,6 +25,7 @@
* \ingroup DNA
*/
+#include "DNA_defs.h"
#include "DNA_listBase.h"
@@ -238,7 +239,7 @@ typedef struct ArrayModifierData {
typedef struct MirrorModifierData {
ModifierData modifier;
- short axis; /* deprecated, use flag instead */
+ short axis DNA_DEPRECATED; /* deprecated, use flag instead */
short flag;
float tolerance;
struct Object *mirror_ob;
diff --git a/source/blender/makesdna/DNA_node_types.h b/source/blender/makesdna/DNA_node_types.h
index 8f22b1b31cb..845d8a87c5b 100644
--- a/source/blender/makesdna/DNA_node_types.h
+++ b/source/blender/makesdna/DNA_node_types.h
@@ -91,7 +91,7 @@ typedef struct bNodeSocket {
/* internal data to retrieve relations and groups */
int own_index; /* group socket identifiers, to find matching pairs after reading files */
- int to_index; /* XXX deprecated, only used for restoring old group node links */
+ int to_index DNA_DEPRECATED; /* XXX deprecated, only used for restoring old group node links */
struct bNodeSocket *groupsock;
struct bNodeLink *link; /* a link pointer, set in ntreeUpdateTree */
diff --git a/source/blender/makesdna/DNA_object_types.h b/source/blender/makesdna/DNA_object_types.h
index 29568fdd0fb..f5d327f50da 100644
--- a/source/blender/makesdna/DNA_object_types.h
+++ b/source/blender/makesdna/DNA_object_types.h
@@ -32,6 +32,7 @@
* \brief Object is a sort of wrapper for general info.
*/
+#include "DNA_defs.h"
#include "DNA_listBase.h"
#include "DNA_ID.h"
#include "DNA_action_types.h" /* bAnimVizSettings */
@@ -110,10 +111,10 @@ typedef struct Object {
/* if ob->proxy (or proxy_group), this object is proxy for object ob->proxy */
/* proxy_from is set in target back to the proxy. */
struct Object *proxy, *proxy_group, *proxy_from;
- struct Ipo *ipo; // XXX depreceated... old animation system
+ struct Ipo *ipo DNA_DEPRECATED; /* old animation system, deprecated for 2.5 */
/* struct Path *path; */
struct BoundBox *bb;
- struct bAction *action; // XXX depreceated... old animation system
+ struct bAction *action DNA_DEPRECATED; // XXX depreceated... old animation system
struct bAction *poselib;
struct bPose *pose; /* pose data, armature objects only */
void *data; /* pointer to objects data - an 'ID' or NULL */
@@ -123,8 +124,8 @@ typedef struct Object {
bAnimVizSettings avs; /* settings for visualisation of object-transform animation */
bMotionPath *mpath; /* motion path cache for this object */
- ListBase constraintChannels; // XXX depreceated... old animation system
- ListBase effect; // XXX depreceated... keep for readfile
+ ListBase constraintChannels DNA_DEPRECATED; // XXX depreceated... old animation system
+ ListBase effect DNA_DEPRECATED; // XXX depreceated... keep for readfile
ListBase disp; /* list of DispList, used by lattice, metaballs curve & surfaces */
ListBase defbase; /* list of bDeformGroup (vertex groups) names and flag only */
ListBase modifiers; /* list of ModifierData structures */
@@ -140,7 +141,9 @@ typedef struct Object {
/* rot en drot have to be together! (transform('r' en 's')) */
float loc[3], dloc[3], orig[3];
- float size[3], dsize[3]; /* scale and delta scale */
+ float size[3]; /* scale infact */
+ float dsize[3] DNA_DEPRECATED ; /* DEPRECATED, 2.60 and older only */
+ float dscale[3]; /* ack!, changing */
float rot[3], drot[3]; /* euler rotation */
float quat[4], dquat[4]; /* quaternion rotation */
float rotAxis[3], drotAxis[3]; /* axis angle rotation - axis part */
@@ -158,8 +161,10 @@ typedef struct Object {
unsigned int lay; /* copy of Base's layer in the scene */
+ int pad6;
+
short flag; /* copy of Base */
- short colbits; /* deprecated */
+ short colbits DNA_DEPRECATED; /* deprecated */
short transflag, protectflag; /* transformation settings and transform locks */
short trackflag, upflag;
@@ -229,8 +234,8 @@ typedef struct Object {
float anisotropicFriction[3];
ListBase constraints; /* object constraints */
- ListBase nlastrips; // XXX depreceated... old animation system
- ListBase hooks; // XXX depreceated... old animation system
+ ListBase nlastrips DNA_DEPRECATED; // XXX depreceated... old animation system
+ ListBase hooks DNA_DEPRECATED; // XXX depreceated... old animation system
ListBase particlesystem; /* particle systems */
struct PartDeflect *pd; /* particle deflector/attractor/collision data */
diff --git a/source/blender/makesdna/DNA_particle_types.h b/source/blender/makesdna/DNA_particle_types.h
index 11a6460b1fc..c56d771d3b3 100644
--- a/source/blender/makesdna/DNA_particle_types.h
+++ b/source/blender/makesdna/DNA_particle_types.h
@@ -32,6 +32,7 @@
* \ingroup DNA
*/
+#include "DNA_defs.h"
#include "DNA_ID.h"
#include "DNA_boid_types.h"
@@ -225,10 +226,10 @@ typedef struct ParticleSettings {
struct Group *dup_group;
struct ListBase dupliweights;
- struct Group *eff_group; // deprecated
+ struct Group *eff_group DNA_DEPRECATED; // deprecated
struct Object *dup_ob;
struct Object *bb_ob;
- struct Ipo *ipo; // xxx depreceated... old animation system
+ struct Ipo *ipo DNA_DEPRECATED; /* old animation system, deprecated for 2.5 */
struct PartDeflect *pd;
struct PartDeflect *pd2;
} ParticleSettings;
diff --git a/source/blender/makesdna/DNA_scene_types.h b/source/blender/makesdna/DNA_scene_types.h
index faacde9e44f..d8d3f05ce01 100644
--- a/source/blender/makesdna/DNA_scene_types.h
+++ b/source/blender/makesdna/DNA_scene_types.h
@@ -31,6 +31,8 @@
* \ingroup DNA
*/
+#include "DNA_defs.h"
+
// XXX, temp feature - campbell
#define DURIAN_CAMERA_SWITCH
@@ -331,11 +333,11 @@ typedef struct RenderData {
/** For UR edge rendering: give the edges this color */
float edgeR, edgeG, edgeB;
- short fullscreen, xplay, yplay, freqplay; /* standalone player */ // XXX deprecated since 2.5
- short depth, attrib; /* standalone player */ // XXX deprecated since 2.5
+ short fullscreen DNA_DEPRECATED, xplay DNA_DEPRECATED, yplay DNA_DEPRECATED, freqplay DNA_DEPRECATED; /* standalone player */ // XXX deprecated since 2.5
+ short depth DNA_DEPRECATED, attrib DNA_DEPRECATED; /* standalone player */ // XXX deprecated since 2.5
int frame_step; /* frames to jump during render/playback */
- short stereomode; /* standalone player stereo settings */ // XXX deprecated since 2.5
+ short stereomode DNA_DEPRECATED; /* standalone player stereo settings */ // XXX deprecated since 2.5
short dimensionspreset; /* for the dimensions presets menu */
@@ -360,7 +362,7 @@ typedef struct RenderData {
*/
short yparts;
- short planes, imtype, subimtype, quality; /*deprecated!*/
+ short planes DNA_DEPRECATED, imtype DNA_DEPRECATED, subimtype DNA_DEPRECATED, quality DNA_DEPRECATED; /*deprecated!*/
/**
* Render to image editor, fullscreen or to new window.
@@ -388,7 +390,7 @@ typedef struct RenderData {
short raytrace_structure;
/* renderer (deprecated) */
- short renderer;
+ short renderer DNA_DEPRECATED;
/* octree resolution */
short ocres;
@@ -434,7 +436,7 @@ typedef struct RenderData {
/* color management settings - color profiles, gamma correction, etc */
int color_mgt_flag;
- /** post-production settings. Depricated, but here for upwards compat (initialized to 1) */
+ /** post-production settings. deprecated, but here for upwards compat (initialized to 1) */
float postgamma, posthue, postsat;
/* Dither noise intensity */
@@ -473,19 +475,19 @@ typedef struct RenderData {
float simplify_aosss;
/* cineon */
- short cineonwhite, cineonblack; /*deprecated*/
- float cineongamma; /*deprecated*/
+ short cineonwhite DNA_DEPRECATED, cineonblack DNA_DEPRECATED; /*deprecated*/
+ float cineongamma DNA_DEPRECATED; /*deprecated*/
/* jpeg2000 */
- short jp2_preset, jp2_depth; /*deprecated*/
+ short jp2_preset DNA_DEPRECATED, jp2_depth DNA_DEPRECATED; /*deprecated*/
int rpad3;
/* Dome variables */ // XXX deprecated since 2.5
- short domeres, domemode; // XXX deprecated since 2.5
- short domeangle, dometilt; // XXX deprecated since 2.5
- float domeresbuf; // XXX deprecated since 2.5
- float pad2; // XXX deprecated since 2.5
- struct Text *dometext; // XXX deprecated since 2.5
+ short domeres DNA_DEPRECATED, domemode DNA_DEPRECATED; // XXX deprecated since 2.5
+ short domeangle DNA_DEPRECATED, dometilt DNA_DEPRECATED; // XXX deprecated since 2.5
+ float domeresbuf DNA_DEPRECATED; // XXX deprecated since 2.5
+ float pad2;
+ struct Text *dometext DNA_DEPRECATED; // XXX deprecated since 2.5
/* render engine */
char engine[32];
@@ -744,7 +746,7 @@ typedef struct VPaint {
#define VP_NORMALS 8
#define VP_SPRAY 16
-// #define VP_MIRROR_X 32 // depricated in 2.5x use (me->editflag & ME_EDIT_MIRROR_X)
+// #define VP_MIRROR_X 32 // deprecated in 2.5x use (me->editflag & ME_EDIT_MIRROR_X)
#define VP_ONLYVGROUP 128
@@ -956,7 +958,7 @@ typedef struct Scene {
ListBase keyingsets; /* KeyingSets for the given frame */
/* Game Settings */
- struct GameFraming framing; // XXX deprecated since 2.5
+ struct GameFraming framing DNA_DEPRECATED; // XXX deprecated since 2.5
struct GameData gm;
/* Units */
diff --git a/source/blender/makesdna/DNA_sequence_types.h b/source/blender/makesdna/DNA_sequence_types.h
index 399ae0208bd..ce01f100239 100644
--- a/source/blender/makesdna/DNA_sequence_types.h
+++ b/source/blender/makesdna/DNA_sequence_types.h
@@ -32,6 +32,7 @@
* \author nzc
*/
+#include "DNA_defs.h"
#include "DNA_listBase.h"
#include "DNA_vec_types.h"
@@ -142,7 +143,7 @@ typedef struct Sequence {
Strip *strip;
- struct Ipo *ipo; // xxx depreceated... old animation system
+ struct Ipo *ipo DNA_DEPRECATED; /* old animation system, deprecated for 2.5 */
struct Scene *scene;
struct Object *scene_camera; /* override scene camera */
diff --git a/source/blender/makesdna/DNA_space_types.h b/source/blender/makesdna/DNA_space_types.h
index 01bb6a5235e..649b849ea5e 100644
--- a/source/blender/makesdna/DNA_space_types.h
+++ b/source/blender/makesdna/DNA_space_types.h
@@ -32,6 +32,7 @@
* \author nzc
*/
+#include "DNA_defs.h"
#include "DNA_listBase.h"
#include "DNA_color_types.h" /* for Histogram */
#include "DNA_vec_types.h"
@@ -76,17 +77,17 @@ typedef struct SpaceLink {
struct SpaceLink *next, *prev;
ListBase regionbase; /* storage of regions for inactive spaces */
int spacetype;
- float blockscale; /* XXX depricate this */
- short blockhandler[8]; /* XXX depricate this */
+ float blockscale DNA_DEPRECATED; /* XXX make deprecated */
+ short blockhandler[8] DNA_DEPRECATED; /* XXX make deprecated */
} SpaceLink;
typedef struct SpaceInfo {
SpaceLink *next, *prev;
ListBase regionbase; /* storage of regions for inactive spaces */
int spacetype;
- float blockscale;
+ float blockscale DNA_DEPRECATED;
- short blockhandler[8]; /* XXX depricate this */
+ short blockhandler[8] DNA_DEPRECATED; /* XXX make deprecated */
char rpt_mask;
char pad[7];
@@ -107,10 +108,10 @@ typedef struct SpaceIpo {
SpaceLink *next, *prev;
ListBase regionbase; /* storage of regions for inactive spaces */
int spacetype;
- float blockscale;
+ float blockscale DNA_DEPRECATED;
- short blockhandler[8];
- View2D v2d; /* deprecated, copied to region */
+ short blockhandler[8] DNA_DEPRECATED;
+ View2D v2d DNA_DEPRECATED; /* deprecated, copied to region */
struct bDopeSheet *ads; /* settings for filtering animation data (NOTE: we use a pointer due to code-linking issues) */
@@ -128,13 +129,13 @@ typedef struct SpaceButs {
SpaceLink *next, *prev;
ListBase regionbase; /* storage of regions for inactive spaces */
int spacetype;
- float blockscale;
+ float blockscale DNA_DEPRECATED;
- short blockhandler[8];
+ short blockhandler[8] DNA_DEPRECATED;
struct RenderInfo *ri;
- View2D v2d; /* deprecated, copied to region */
+ View2D v2d DNA_DEPRECATED; /* deprecated, copied to region */
short mainb, mainbo, mainbuser; /* context tabs */
short re_align, align; /* align for panels */
@@ -153,19 +154,19 @@ typedef struct SpaceSeq {
SpaceLink *next, *prev;
ListBase regionbase; /* storage of regions for inactive spaces */
int spacetype;
- float blockscale;
+ float blockscale DNA_DEPRECATED;
- short blockhandler[8];
+ short blockhandler[8] DNA_DEPRECATED;
- View2D v2d; /* deprecated, copied to region */
+ View2D v2d DNA_DEPRECATED; /* deprecated, copied to region */
- float xof, yof; /* deprecated: offset for drawing the image preview */
+ float xof DNA_DEPRECATED, yof DNA_DEPRECATED; /* deprecated: offset for drawing the image preview */
short mainb; /* weird name for the sequencer subtype (seq, image, luma... etc) */
short render_size;
short chanshown;
short zebra;
int flag;
- float zoom; /* deprecated, handled by View2D now */
+ float zoom DNA_DEPRECATED; /* deprecated, handled by View2D now */
int view; /* see SEQ_VIEW_* below */
int pad;
@@ -232,11 +233,11 @@ typedef struct SpaceOops {
SpaceLink *next, *prev;
ListBase regionbase; /* storage of regions for inactive spaces */
int spacetype;
- float blockscale;
+ float blockscale DNA_DEPRECATED;
- short blockhandler[8];
+ short blockhandler[8] DNA_DEPRECATED;
- View2D v2d; /* deprecated, copied to region */
+ View2D v2d DNA_DEPRECATED; /* deprecated, copied to region */
ListBase tree;
struct TreeStore *treestore;
@@ -283,25 +284,25 @@ typedef struct SpaceNla {
struct SpaceLink *next, *prev;
ListBase regionbase; /* storage of regions for inactive spaces */
int spacetype;
- float blockscale;
+ float blockscale DNA_DEPRECATED;
- short blockhandler[8];
+ short blockhandler[8] DNA_DEPRECATED;
short autosnap; /* this uses the same settings as autosnap for Action Editor */
short flag;
int pad;
struct bDopeSheet *ads;
- View2D v2d; /* deprecated, copied to region */
+ View2D v2d DNA_DEPRECATED; /* deprecated, copied to region */
} SpaceNla;
typedef struct SpaceText {
SpaceLink *next, *prev;
ListBase regionbase; /* storage of regions for inactive spaces */
int spacetype;
- float blockscale;
+ float blockscale DNA_DEPRECATED;
- short blockhandler[8];
+ short blockhandler[8] DNA_DEPRECATED;
struct Text *text;
@@ -352,7 +353,7 @@ typedef struct SpaceScript {
SpaceLink *next, *prev;
ListBase regionbase; /* storage of regions for inactive spaces */
int spacetype;
- float blockscale;
+ float blockscale DNA_DEPRECATED;
struct Script *script;
short flags, menunr;
@@ -372,14 +373,16 @@ typedef struct SpaceTime {
SpaceLink *next, *prev;
ListBase regionbase; /* storage of regions for inactive spaces */
int spacetype;
- float blockscale;
+ float blockscale DNA_DEPRECATED;
- View2D v2d; /* deprecated, copied to region */
+ View2D v2d DNA_DEPRECATED; /* deprecated, copied to region */
ListBase caches;
int cache_display, pad;
- int flag, redraws; /* redraws is deprecated... moved to screen */
+ int flag;
+
+ int redraws DNA_DEPRECATED; /* redraws is deprecated... moved to screen */
} SpaceTime;
@@ -387,11 +390,11 @@ typedef struct SpaceNode {
SpaceLink *next, *prev;
ListBase regionbase; /* storage of regions for inactive spaces */
int spacetype;
- float blockscale;
+ float blockscale DNA_DEPRECATED;
- short blockhandler[8];
+ short blockhandler[8] DNA_DEPRECATED;
- View2D v2d; /* deprecated, copied to region */
+ View2D v2d DNA_DEPRECATED; /* deprecated, copied to region */
struct ID *id, *from; /* context, no need to save in file? well... pinning... */
short flag, menunr; /* menunr: browse id block in header */
@@ -433,9 +436,9 @@ typedef struct SpaceLogic {
SpaceLink *next, *prev;
ListBase regionbase; /* storage of regions for inactive spaces */
int spacetype;
- float blockscale;
+ float blockscale DNA_DEPRECATED;
- short blockhandler[8];
+ short blockhandler[8] DNA_DEPRECATED;
short flag, scaflag;
int pad;
@@ -467,9 +470,9 @@ typedef struct SpaceConsole {
SpaceLink *next, *prev;
ListBase regionbase; /* storage of regions for inactive spaces */
int spacetype;
- float blockscale; // XXX are these needed?
+ float blockscale DNA_DEPRECATED; // XXX are these needed?
- short blockhandler[8]; // XXX are these needed?
+ short blockhandler[8] DNA_DEPRECATED; // XXX are these needed?
/* space vars */
int lheight, pad;
diff --git a/source/blender/makesdna/DNA_texture_types.h b/source/blender/makesdna/DNA_texture_types.h
index 6a4a9970b40..cb545d2ee73 100644
--- a/source/blender/makesdna/DNA_texture_types.h
+++ b/source/blender/makesdna/DNA_texture_types.h
@@ -33,6 +33,7 @@
* \author nzc
*/
+#include "DNA_defs.h"
#include "DNA_ID.h"
#include "DNA_image_types.h" /* ImageUser */
@@ -263,7 +264,7 @@ typedef struct Tex {
struct ImageUser iuser;
struct bNodeTree *nodetree;
- struct Ipo *ipo; // XXX depreceated... old animation system
+ struct Ipo *ipo DNA_DEPRECATED; /* old animation system, deprecated for 2.5 */
struct Image *ima;
struct PluginTex *plugin;
struct ColorBand *coba;
diff --git a/source/blender/makesdna/DNA_userdef_types.h b/source/blender/makesdna/DNA_userdef_types.h
index 6c359f2c040..4f6c7e22f5e 100644
--- a/source/blender/makesdna/DNA_userdef_types.h
+++ b/source/blender/makesdna/DNA_userdef_types.h
@@ -356,7 +356,7 @@ typedef struct UserDef {
struct ListBase themes;
struct ListBase uifonts;
struct ListBase uistyles;
- struct ListBase keymaps; /* deprecated in favor of user_keymaps */
+ struct ListBase keymaps DNA_DEPRECATED; /* deprecated in favor of user_keymaps */
struct ListBase user_keymaps;
struct ListBase addons;
char keyconfigstr[64];
diff --git a/source/blender/makesdna/DNA_view3d_types.h b/source/blender/makesdna/DNA_view3d_types.h
index 50136fdcc99..51ee8f63df5 100644
--- a/source/blender/makesdna/DNA_view3d_types.h
+++ b/source/blender/makesdna/DNA_view3d_types.h
@@ -55,6 +55,7 @@ struct wmTimer;
#define far clipend
#endif
+#include "DNA_defs.h"
#include "DNA_listBase.h"
#include "DNA_image_types.h"
#include "DNA_movieclip_types.h"
@@ -150,8 +151,9 @@ typedef struct View3D {
int spacetype;
float blockscale;
short blockhandler[8];
-
- float viewquat[4], dist; /* XXX depricated */
+
+ float viewquat[4] DNA_DEPRECATED;
+ float dist DNA_DEPRECATED;
float bundle_size; /* size of bundles in reconstructed data */
short bundle_drawtype; /* display style for bundle */
@@ -160,13 +162,13 @@ typedef struct View3D {
unsigned int lay_used; /* used while drawing */
- short persp; /* XXX depricated */
- short view; /* XXX depricated */
+ short persp DNA_DEPRECATED;
+ short view DNA_DEPRECATED;
struct Object *camera, *ob_centre;
struct ListBase bgpicbase;
- struct BGpic *bgpic; /* deprecated, use bgpicbase, only kept for do_versions(...) */
+ struct BGpic *bgpic DNA_DEPRECATED; /* deprecated, use bgpicbase, only kept for do_versions(...) */
struct View3D *localvd; /* allocated backup of its self while in localview */
@@ -185,7 +187,7 @@ typedef struct View3D {
float lens, grid;
float near, far;
- float ofs[3]; /* XXX deprecated */
+ float ofs[3] DNA_DEPRECATED; /* XXX deprecated */
float cursor[3];
short modeselect;
@@ -208,8 +210,8 @@ typedef struct View3D {
void *properties_storage; /* Nkey panel stores stuff here (runtime only!) */
- /* XXX depricated? */
- struct bGPdata *gpd; /* Grease-Pencil Data (annotation layers) */
+ /* XXX deprecated? */
+ struct bGPdata *gpd DNA_DEPRECATED; /* Grease-Pencil Data (annotation layers) */
} View3D;
diff --git a/source/blender/makesdna/DNA_world_types.h b/source/blender/makesdna/DNA_world_types.h
index 0c455022db4..1e8a4574120 100644
--- a/source/blender/makesdna/DNA_world_types.h
+++ b/source/blender/makesdna/DNA_world_types.h
@@ -31,6 +31,7 @@
* \ingroup DNA
*/
+#include "DNA_defs.h"
#include "DNA_ID.h"
struct AnimData;
@@ -96,7 +97,7 @@ typedef struct World {
float misi, miststa, mistdist, misthi;
- float starr, starg, starb, stark; /* Deprecated */
+ float starr DNA_DEPRECATED, starg DNA_DEPRECATED, starb DNA_DEPRECATED, stark DNA_DEPRECATED; /* Deprecated */
float starsize, starmindist;
float stardist, starcolnoise;
@@ -119,7 +120,7 @@ typedef struct World {
float *aosphere, *aotables;
- struct Ipo *ipo; // XXX depreceated... old animation system
+ struct Ipo *ipo DNA_DEPRECATED; /* old animation system, deprecated for 2.5 */
struct MTex *mtex[18]; /* MAX_MTEX */
short pr_texture, use_nodes, pad[2];
diff --git a/source/blender/makesdna/intern/makesdna.c b/source/blender/makesdna/intern/makesdna.c
index b9bd2c073bf..11ab9b1efcf 100644
--- a/source/blender/makesdna/intern/makesdna.c
+++ b/source/blender/makesdna/intern/makesdna.c
@@ -475,6 +475,13 @@ static int preprocess_include(char *maindata, int len)
if(comment);
else if( cp[0]==' ' && cp[1]==' ' );
else if( cp[-1]=='*' && cp[0]==' ' ); /* pointers with a space */
+
+ /* skip special keywords */
+ else if (strncmp("DNA_DEPRECATED", cp, 14)==0) {
+ /* single values are skipped already, so decrement 1 less */
+ a -= 13;
+ cp += 13;
+ }
else {
md[0]= cp[0];
md++;
diff --git a/source/blender/makesrna/intern/rna_object.c b/source/blender/makesrna/intern/rna_object.c
index 11c248adac7..f7df7c3928e 100644
--- a/source/blender/makesrna/intern/rna_object.c
+++ b/source/blender/makesrna/intern/rna_object.c
@@ -2071,7 +2071,7 @@ static void rna_def_object(BlenderRNA *brna)
#endif
prop= RNA_def_property(srna, "delta_scale", PROP_FLOAT, PROP_XYZ);
- RNA_def_property_float_sdna(prop, NULL, "dsize");
+ RNA_def_property_float_sdna(prop, NULL, "dscale");
RNA_def_property_ui_text(prop, "Delta Scale", "Extra scaling added to the scale of the object");
RNA_def_property_update(prop, NC_OBJECT|ND_TRANSFORM, "rna_Object_internal_update");
diff --git a/source/blender/modifiers/intern/MOD_mirror.c b/source/blender/modifiers/intern/MOD_mirror.c
index 2e744337b97..5336cb03efa 100644
--- a/source/blender/modifiers/intern/MOD_mirror.c
+++ b/source/blender/modifiers/intern/MOD_mirror.c
@@ -64,7 +64,6 @@ static void copyData(ModifierData *md, ModifierData *target)
MirrorModifierData *mmd = (MirrorModifierData*) md;
MirrorModifierData *tmmd = (MirrorModifierData*) target;
- tmmd->axis = mmd->axis;
tmmd->flag = mmd->flag;
tmmd->tolerance = mmd->tolerance;
tmmd->mirror_ob = mmd->mirror_ob;
diff --git a/source/blender/nodes/shader/nodes/node_shader_camera.c b/source/blender/nodes/shader/nodes/node_shader_camera.c
index d95cc1460df..3ec75dfa4fd 100644
--- a/source/blender/nodes/shader/nodes/node_shader_camera.c
+++ b/source/blender/nodes/shader/nodes/node_shader_camera.c
@@ -62,7 +62,7 @@ void register_node_type_sh_camera(bNodeTreeType *ttype)
static bNodeType ntype;
node_type_base(ttype, &ntype, SH_NODE_CAMERA, "Camera Data", NODE_CLASS_INPUT, 0);
- node_type_compatibility(&ntype, NODE_OLD_SHADING);
+ node_type_compatibility(&ntype, NODE_OLD_SHADING|NODE_NEW_SHADING);
node_type_socket_templates(&ntype, NULL, sh_node_camera_out);
node_type_size(&ntype, 95, 95, 120);
node_type_storage(&ntype, "node_camera", NULL, NULL);
diff --git a/source/blender/nodes/shader/nodes/node_shader_invert.c b/source/blender/nodes/shader/nodes/node_shader_invert.c
index 6d21b93fb65..2c20df2274d 100644
--- a/source/blender/nodes/shader/nodes/node_shader_invert.c
+++ b/source/blender/nodes/shader/nodes/node_shader_invert.c
@@ -77,7 +77,7 @@ void register_node_type_sh_invert(bNodeTreeType *ttype)
static bNodeType ntype;
node_type_base(ttype, &ntype, SH_NODE_INVERT, "Invert", NODE_CLASS_OP_COLOR, NODE_OPTIONS);
- node_type_compatibility(&ntype, NODE_OLD_SHADING);
+ node_type_compatibility(&ntype, NODE_OLD_SHADING|NODE_NEW_SHADING);
node_type_socket_templates(&ntype, sh_node_invert_in, sh_node_invert_out);
node_type_size(&ntype, 90, 80, 100);
node_type_exec(&ntype, node_shader_exec_invert);
diff --git a/source/blender/python/intern/bpy_rna.c b/source/blender/python/intern/bpy_rna.c
index d317066ee24..f099994fc57 100644
--- a/source/blender/python/intern/bpy_rna.c
+++ b/source/blender/python/intern/bpy_rna.c
@@ -2107,9 +2107,18 @@ static PyObject *pyrna_prop_collection_subscript_str(BPy_PropertyRNA *self, cons
/* static PyObject *pyrna_prop_array_subscript_str(BPy_PropertyRNA *self, char *keyname) */
/* special case: bpy.data.objects["some_id_name", "//some_lib_name.blend"]
- * also for: bpy.data.objects.get(("some_id_name", "//some_lib_name.blend"), fallback) */
-static PyObject *pyrna_prop_collection_subscript_str_lib_pair(BPy_PropertyRNA *self, PyObject *key,
- const char *err_prefix, const short err_not_found)
+ * also for: bpy.data.objects.get(("some_id_name", "//some_lib_name.blend"), fallback)
+ *
+ * note:
+ * error codes since this is not to be called directly from python,
+ * this matches pythons __contains__ values capi.
+ * -1: exception set
+ * 0: not found
+ * 1: found */
+int pyrna_prop_collection_subscript_str_lib_pair_ptr(BPy_PropertyRNA *self, PyObject *key,
+ const char *err_prefix, const short err_not_found,
+ PointerRNA *r_ptr
+ )
{
char *keyname;
@@ -2118,24 +2127,24 @@ static PyObject *pyrna_prop_collection_subscript_str_lib_pair(BPy_PropertyRNA *s
PyErr_Format(PyExc_KeyError,
"%s: tuple key must be a pair, not size %d",
err_prefix, PyTuple_GET_SIZE(key));
- return NULL;
+ return -1;
}
else if (self->ptr.type != &RNA_BlendData) {
PyErr_Format(PyExc_KeyError,
"%s: is only valid for bpy.data collections, not %.200s",
err_prefix, RNA_struct_identifier(self->ptr.type));
- return NULL;
+ return -1;
}
else if ((keyname= _PyUnicode_AsString(PyTuple_GET_ITEM(key, 0))) == NULL) {
PyErr_Format(PyExc_KeyError,
"%s: id must be a string, not %.200s",
err_prefix, Py_TYPE(PyTuple_GET_ITEM(key, 0))->tp_name);
- return NULL;
+ return -1;
}
else {
PyObject *keylib= PyTuple_GET_ITEM(key, 1);
Library *lib;
- PyObject *ret= NULL;
+ int found= FALSE;
if (keylib == Py_None) {
lib= NULL;
@@ -2150,16 +2159,19 @@ static PyObject *pyrna_prop_collection_subscript_str_lib_pair(BPy_PropertyRNA *s
"%s: lib name '%.240s' "
"does not reference a valid library",
err_prefix, keylib_str);
+ return -1;
+ }
+ else {
+ return 0;
}
- return NULL;
}
}
else {
PyErr_Format(PyExc_KeyError,
"%s: lib must be a sting or None, not %.200s",
err_prefix, Py_TYPE(keylib)->tp_name);
- return NULL;
+ return -1;
}
/* lib is either a valid poniter or NULL,
@@ -2168,23 +2180,43 @@ static PyObject *pyrna_prop_collection_subscript_str_lib_pair(BPy_PropertyRNA *s
RNA_PROP_BEGIN(&self->ptr, itemptr, self->prop) {
ID *id= itemptr.data; /* always an ID */
if (id->lib == lib && (strncmp(keyname, id->name+2, sizeof(id->name)-2) == 0)) {
- ret= pyrna_struct_CreatePyObject(&itemptr);
+ found= TRUE;
+ if (r_ptr) {
+ *r_ptr= itemptr;
+ }
break;
}
}
RNA_PROP_END;
/* we may want to fail silently as with collection.get() */
- if ((ret == NULL) && err_not_found) {
+ if ((found == FALSE) && err_not_found) {
/* only runs for getitem access so use fixed string */
PyErr_SetString(PyExc_KeyError,
"bpy_prop_collection[key, lib]: not found");
+ return -1;
}
+ else {
+ return found; /* 1 / 0, no exception */
+ }
+ }
+}
- return ret;
+static PyObject *pyrna_prop_collection_subscript_str_lib_pair(BPy_PropertyRNA *self, PyObject *key,
+ const char *err_prefix, const short err_not_found)
+{
+ PointerRNA ptr;
+ const int contains= pyrna_prop_collection_subscript_str_lib_pair_ptr(self, key, err_prefix, err_not_found, &ptr);
+
+ if (contains == 1) {
+ return pyrna_struct_CreatePyObject(&ptr);
+ }
+ else {
+ return NULL;
}
}
+
static PyObject *pyrna_prop_collection_subscript_slice(BPy_PropertyRNA *self, Py_ssize_t start, Py_ssize_t stop)
{
CollectionPropertyIterator rna_macro_iter;
@@ -2771,22 +2803,30 @@ static int pyrna_prop_array_contains(BPy_PropertyRNA *self, PyObject *value)
return pyrna_array_contains_py(&self->ptr, self->prop, value);
}
-static int pyrna_prop_collection_contains(BPy_PropertyRNA *self, PyObject *value)
+static int pyrna_prop_collection_contains(BPy_PropertyRNA *self, PyObject *key)
{
PointerRNA newptr; /* not used, just so RNA_property_collection_lookup_string runs */
- /* key in dict style check */
- const char *keyname= _PyUnicode_AsString(value);
-
- if (keyname==NULL) {
- PyErr_SetString(PyExc_TypeError, "bpy_prop_collection.__contains__: expected a string");
- return -1;
+ if (PyTuple_Check(key)) {
+ /* special case, for ID datablocks we */
+ return pyrna_prop_collection_subscript_str_lib_pair_ptr(self, key,
+ "(id, lib) in bpy_prop_collection", FALSE, NULL);
}
+ else {
- if (RNA_property_collection_lookup_string(&self->ptr, self->prop, keyname, &newptr))
- return 1;
+ /* key in dict style check */
+ const char *keyname= _PyUnicode_AsString(key);
- return 0;
+ if (keyname==NULL) {
+ PyErr_SetString(PyExc_TypeError, "bpy_prop_collection.__contains__: expected a string or a typle of strings");
+ return -1;
+ }
+
+ if (RNA_property_collection_lookup_string(&self->ptr, self->prop, keyname, &newptr))
+ return 1;
+
+ return 0;
+ }
}
static int pyrna_struct_contains(BPy_StructRNA *self, PyObject *value)
diff --git a/source/blender/render/intern/source/convertblender.c b/source/blender/render/intern/source/convertblender.c
index a3c452c7ea7..00a53349141 100644
--- a/source/blender/render/intern/source/convertblender.c
+++ b/source/blender/render/intern/source/convertblender.c
@@ -2391,7 +2391,7 @@ static void do_displacement(Render *re, ObjectRen *obr, float mat[][4], float im
/* Object Size with parenting */
obt=obr->ob;
while(obt){
- mul_v3_v3v3(temp, obt->size, obt->dsize);
+ mul_v3_v3v3(temp, obt->size, obt->dscale);
scale[0]*=temp[0]; scale[1]*=temp[1]; scale[2]*=temp[2];
obt=obt->parent;
}
diff --git a/source/blender/render/intern/source/rayshade.c b/source/blender/render/intern/source/rayshade.c
index 1a58a665e0a..b8c4b05de50 100644
--- a/source/blender/render/intern/source/rayshade.c
+++ b/source/blender/render/intern/source/rayshade.c
@@ -485,18 +485,12 @@ void makeraytree(Render *re)
/* if(shi->osatex) */
static void shade_ray_set_derivative(ShadeInput *shi)
{
- float detsh, t00, t10, t01, t11, xn, yn, zn;
+ float detsh, t00, t10, t01, t11;
int axis1, axis2;
/* find most stable axis to project */
- xn= fabs(shi->facenor[0]);
- yn= fabs(shi->facenor[1]);
- zn= fabs(shi->facenor[2]);
-
- if(zn>=xn && zn>=yn) { axis1= 0; axis2= 1; }
- else if(yn>=xn && yn>=zn) { axis1= 0; axis2= 2; }
- else { axis1= 1; axis2= 2; }
-
+ axis_dominant_v3(&axis1, &axis2, shi->facenor);
+
/* compute u,v and derivatives */
if(shi->obi->flag & R_TRANSFORMED) {
float v1[3], v2[3], v3[3];
diff --git a/source/blender/render/intern/source/render_texture.c b/source/blender/render/intern/source/render_texture.c
index 9459745cdbc..ae48b0f777f 100644
--- a/source/blender/render/intern/source/render_texture.c
+++ b/source/blender/render/intern/source/render_texture.c
@@ -3494,17 +3494,11 @@ void render_realtime_texture(ShadeInput *shi, Image *ima)
static void textured_face_generate_uv(float *uv, float *normal, float *hit, float *v1, float *v2, float *v3)
{
- float detsh, t00, t10, t01, t11, xn, yn, zn;
+ float detsh, t00, t10, t01, t11;
int axis1, axis2;
/* find most stable axis to project */
- xn= fabs(normal[0]);
- yn= fabs(normal[1]);
- zn= fabs(normal[2]);
-
- if(zn>=xn && zn>=yn) { axis1= 0; axis2= 1; }
- else if(yn>=xn && yn>=zn) { axis1= 0; axis2= 2; }
- else { axis1= 1; axis2= 2; }
+ axis_dominant_v3(&axis1, &axis2, normal);
/* compute u,v and derivatives */
t00= v3[axis1]-v1[axis1]; t01= v3[axis2]-v1[axis2];
diff --git a/source/blender/render/intern/source/shadeinput.c b/source/blender/render/intern/source/shadeinput.c
index f2a053e89d9..dd026740c33 100644
--- a/source/blender/render/intern/source/shadeinput.c
+++ b/source/blender/render/intern/source/shadeinput.c
@@ -756,17 +756,11 @@ void shade_input_set_uv(ShadeInput *shi)
}
else {
/* most of this could become re-used for faces */
- float detsh, t00, t10, t01, t11, xn, yn, zn;
+ float detsh, t00, t10, t01, t11;
int axis1, axis2;
/* find most stable axis to project */
- xn= fabs(shi->facenor[0]);
- yn= fabs(shi->facenor[1]);
- zn= fabs(shi->facenor[2]);
-
- if(zn>=xn && zn>=yn) { axis1= 0; axis2= 1; }
- else if(yn>=xn && yn>=zn) { axis1= 0; axis2= 2; }
- else { axis1= 1; axis2= 2; }
+ axis_dominant_v3(&axis1, &axis2, shi->facenor);
/* compute u,v and derivatives */
t00= v3[axis1]-v1[axis1]; t01= v3[axis2]-v1[axis2];
diff --git a/source/blender/windowmanager/intern/wm_event_system.c b/source/blender/windowmanager/intern/wm_event_system.c
index 5d48a3c7a7f..9d8f68115cf 100644
--- a/source/blender/windowmanager/intern/wm_event_system.c
+++ b/source/blender/windowmanager/intern/wm_event_system.c
@@ -2667,6 +2667,11 @@ void wm_event_add_ghostevent(wmWindowManager *wm, wmWindow *win, int type, int U
key we don't want the key modifier */
if(event.keymodifier == event.type)
event.keymodifier= 0;
+ /* this case happened with an external numpad, it's not really clear
+ why, but it's also impossible to map a key modifier to an unknwon
+ key, so it shouldn't harm */
+ if(event.keymodifier == UNKNOWNKEY)
+ event.keymodifier= 0;
/* if test_break set, it catches this. XXX Keep global for now? */
if(event.type==ESCKEY)