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:
authorCampbell Barton <ideasman42@gmail.com>2011-10-14 05:35:20 +0400
committerCampbell Barton <ideasman42@gmail.com>2011-10-14 05:35:20 +0400
commit4e118bb22f246468a6e0a5524c87c0243b7a3d5d (patch)
tree7326c91636f991c8bcaa95fe0efd49aa570f4e65 /source
parent7eadd540d48ceaae0078d48a05ede663df3ea01a (diff)
parentbe24b4dfccfda38c776545d571897ab17ecc96a6 (diff)
svn merge ^/trunk/blender -r40890:40950
Diffstat (limited to 'source')
-rw-r--r--source/blender/blenfont/intern/blf_lang.c1
-rw-r--r--source/blender/blenkernel/BKE_action.h2
-rw-r--r--source/blender/blenkernel/BKE_anim.h2
-rw-r--r--source/blender/blenkernel/BKE_animsys.h2
-rw-r--r--source/blender/blenkernel/BKE_armature.h2
-rw-r--r--source/blender/blenkernel/BKE_bullet.h1
-rw-r--r--source/blender/blenkernel/BKE_cdderivedmesh.h54
-rw-r--r--source/blender/blenkernel/BKE_customdata.h54
-rw-r--r--source/blender/blenkernel/BKE_displist.h2
-rw-r--r--source/blender/blenkernel/BKE_icons.h55
-rw-r--r--source/blender/blenkernel/BKE_mesh.h4
-rw-r--r--source/blender/blenkernel/BKE_navmesh_conversion.h56
-rw-r--r--source/blender/blenkernel/BKE_nla.h2
-rw-r--r--source/blender/blenkernel/BKE_paint.h2
-rw-r--r--source/blender/blenkernel/BKE_pointcache.h53
-rw-r--r--source/blender/blenkernel/BKE_shrinkwrap.h2
-rw-r--r--source/blender/blenkernel/BKE_subsurf.h3
-rw-r--r--source/blender/blenkernel/BKE_suggestions.h2
-rw-r--r--source/blender/blenkernel/BKE_unit.h1
-rw-r--r--source/blender/blenkernel/BKE_writeffmpeg.h2
-rw-r--r--source/blender/blenkernel/BKE_writeframeserver.h2
-rw-r--r--source/blender/blenkernel/intern/CCGSubSurf.c3
-rw-r--r--source/blender/blenkernel/intern/CCGSubSurf.h3
-rw-r--r--source/blender/blenkernel/intern/DerivedMesh.c28
-rw-r--r--source/blender/blenkernel/intern/action.c2
-rw-r--r--source/blender/blenkernel/intern/anim.c4
-rw-r--r--source/blender/blenkernel/intern/anim_sys.c2
-rw-r--r--source/blender/blenkernel/intern/armature.c2
-rw-r--r--source/blender/blenkernel/intern/blender.c5
-rw-r--r--source/blender/blenkernel/intern/bmfont.c6
-rw-r--r--source/blender/blenkernel/intern/boids.c4
-rw-r--r--source/blender/blenkernel/intern/bullet.c3
-rw-r--r--source/blender/blenkernel/intern/bvhutils.c1
-rw-r--r--source/blender/blenkernel/intern/cdderivedmesh.c66
-rw-r--r--source/blender/blenkernel/intern/colortools.c2
-rw-r--r--source/blender/blenkernel/intern/constraint.c2
-rw-r--r--source/blender/blenkernel/intern/curve.c5
-rw-r--r--source/blender/blenkernel/intern/customdata.c64
-rw-r--r--source/blender/blenkernel/intern/deform.c9
-rw-r--r--source/blender/blenkernel/intern/displist.c4
-rw-r--r--source/blender/blenkernel/intern/effect.c4
-rw-r--r--source/blender/blenkernel/intern/fcurve.c2
-rw-r--r--source/blender/blenkernel/intern/fmodifier.c2
-rw-r--r--source/blender/blenkernel/intern/font.c6
-rw-r--r--source/blender/blenkernel/intern/gpencil.c2
-rw-r--r--source/blender/blenkernel/intern/icons.c56
-rw-r--r--source/blender/blenkernel/intern/image.c3
-rw-r--r--source/blender/blenkernel/intern/image_gen.c3
-rw-r--r--source/blender/blenkernel/intern/ipo.c4
-rw-r--r--source/blender/blenkernel/intern/key.c5
-rw-r--r--source/blender/blenkernel/intern/lattice.c3
-rw-r--r--source/blender/blenkernel/intern/material.c24
-rw-r--r--source/blender/blenkernel/intern/mball.c16
-rw-r--r--source/blender/blenkernel/intern/mesh.c6
-rw-r--r--source/blender/blenkernel/intern/modifier.c68
-rw-r--r--source/blender/blenkernel/intern/navmesh_conversion.c60
-rw-r--r--source/blender/blenkernel/intern/nla.c2
-rw-r--r--source/blender/blenkernel/intern/object.c4
-rw-r--r--source/blender/blenkernel/intern/packedFile.c2
-rw-r--r--source/blender/blenkernel/intern/particle.c4
-rw-r--r--source/blender/blenkernel/intern/particle_system.c4
-rw-r--r--source/blender/blenkernel/intern/property.c7
-rw-r--r--source/blender/blenkernel/intern/scene.c4
-rw-r--r--source/blender/blenkernel/intern/script.c6
-rw-r--r--[-rwxr-xr-x]source/blender/blenkernel/intern/seqcache.c6
-rw-r--r--source/blender/blenkernel/intern/sequencer.c2
-rw-r--r--source/blender/blenkernel/intern/sketch.c1
-rw-r--r--source/blender/blenkernel/intern/smoke.c2
-rw-r--r--source/blender/blenkernel/intern/softbody.c3
-rw-r--r--source/blender/blenkernel/intern/speaker.c4
-rw-r--r--source/blender/blenkernel/intern/text.c4
-rw-r--r--source/blender/blenkernel/intern/texture.c4
-rw-r--r--source/blender/blenkernel/intern/world.c5
-rw-r--r--source/blender/blenkernel/intern/writeavi.c7
-rw-r--r--source/blender/blenkernel/intern/writeffmpeg.c7
-rw-r--r--source/blender/blenkernel/intern/writeframeserver.c7
-rw-r--r--source/blender/blenlib/intern/path_util.c59
-rw-r--r--source/blender/blenloader/intern/readfile.c12
-rw-r--r--source/blender/editors/animation/keyframing.c53
-rw-r--r--source/blender/editors/armature/poseobject.c57
-rw-r--r--source/blender/editors/curve/editfont.c14
-rw-r--r--source/blender/editors/gpencil/drawgpencil.c9
-rw-r--r--source/blender/editors/include/ED_keyframing.h5
-rw-r--r--source/blender/editors/interface/interface_handlers.c2
-rw-r--r--source/blender/editors/mesh/mesh_intern.h7
-rw-r--r--source/blender/editors/mesh/mesh_navmesh.c181
-rw-r--r--source/blender/editors/mesh/mesh_ops.c8
-rw-r--r--source/blender/editors/object/object_modifier.c3
-rw-r--r--source/blender/editors/object/object_transform.c18
-rw-r--r--source/blender/editors/render/render_shading.c3
-rw-r--r--source/blender/editors/sound/sound_ops.c6
-rw-r--r--source/blender/editors/space_buttons/buttons_ops.c2
-rw-r--r--source/blender/editors/space_file/filesel.c6
-rw-r--r--source/blender/editors/space_image/image_ops.c7
-rw-r--r--source/blender/editors/space_info/space_info.c2
-rw-r--r--source/blender/editors/space_sequencer/sequencer_add.c15
-rw-r--r--source/blender/editors/space_sequencer/sequencer_draw.c28
-rw-r--r--source/blender/editors/space_sequencer/sequencer_edit.c8
-rw-r--r--source/blender/editors/space_view3d/view3d_snap.c20
-rw-r--r--source/blender/makesdna/DNA_modifier_types.h1
-rw-r--r--source/blender/makesrna/intern/rna_ID.c10
-rw-r--r--source/blender/makesrna/intern/rna_object.c4
-rw-r--r--source/blender/makesrna/intern/rna_scene.c4
-rw-r--r--source/blender/makesrna/intern/rna_sculpt_paint.c18
-rw-r--r--source/blender/makesrna/intern/rna_userdef.c11
-rw-r--r--source/blender/python/intern/bpy_rna.c101
-rw-r--r--source/blender/python/intern/bpy_rna_anim.c8
-rw-r--r--source/blender/python/mathutils/mathutils_Quaternion.c2
-rw-r--r--source/blender/windowmanager/intern/wm_operators.c15
-rw-r--r--source/gameengine/Converter/KX_IpoConvert.cpp2
110 files changed, 850 insertions, 719 deletions
diff --git a/source/blender/blenfont/intern/blf_lang.c b/source/blender/blenfont/intern/blf_lang.c
index 0a102884969..ec9501c06a6 100644
--- a/source/blender/blenfont/intern/blf_lang.c
+++ b/source/blender/blenfont/intern/blf_lang.c
@@ -94,6 +94,7 @@ static const char *locales[] = {
"greek", "el_GR",
"korean", "ko_KR",
"nepali", "ne_NP",
+ "persian", "fa_PE",
};
void BLF_lang_init(void)
diff --git a/source/blender/blenkernel/BKE_action.h b/source/blender/blenkernel/BKE_action.h
index 67efb7752ea..7d3de68c005 100644
--- a/source/blender/blenkernel/BKE_action.h
+++ b/source/blender/blenkernel/BKE_action.h
@@ -1,4 +1,6 @@
/*
+ * $Id$
+ *
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
diff --git a/source/blender/blenkernel/BKE_anim.h b/source/blender/blenkernel/BKE_anim.h
index 44aebdf6205..da389c6f1d0 100644
--- a/source/blender/blenkernel/BKE_anim.h
+++ b/source/blender/blenkernel/BKE_anim.h
@@ -1,4 +1,6 @@
/*
+ * $Id$
+ *
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
diff --git a/source/blender/blenkernel/BKE_animsys.h b/source/blender/blenkernel/BKE_animsys.h
index 98f9ee14c7e..bf619d76e68 100644
--- a/source/blender/blenkernel/BKE_animsys.h
+++ b/source/blender/blenkernel/BKE_animsys.h
@@ -1,4 +1,6 @@
/*
+ * $Id$
+ *
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
diff --git a/source/blender/blenkernel/BKE_armature.h b/source/blender/blenkernel/BKE_armature.h
index 8836999bc9b..a0660490baf 100644
--- a/source/blender/blenkernel/BKE_armature.h
+++ b/source/blender/blenkernel/BKE_armature.h
@@ -1,4 +1,6 @@
/*
+ * $Id$
+ *
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
diff --git a/source/blender/blenkernel/BKE_bullet.h b/source/blender/blenkernel/BKE_bullet.h
index 76358c4485b..2756ded3a08 100644
--- a/source/blender/blenkernel/BKE_bullet.h
+++ b/source/blender/blenkernel/BKE_bullet.h
@@ -1,5 +1,4 @@
/*
- *
* $Id$
*
* ***** BEGIN GPL LICENSE BLOCK *****
diff --git a/source/blender/blenkernel/BKE_cdderivedmesh.h b/source/blender/blenkernel/BKE_cdderivedmesh.h
index 8491faf2ceb..f26d22defa6 100644
--- a/source/blender/blenkernel/BKE_cdderivedmesh.h
+++ b/source/blender/blenkernel/BKE_cdderivedmesh.h
@@ -1,31 +1,31 @@
/*
-* $Id$
-*
-* ***** BEGIN GPL LICENSE BLOCK *****
-*
-* This program is free software; you can redistribute it and/or
-* modify it under the terms of the GNU General Public License
-* as published by the Free Software Foundation; either version 2
-* of the License, or (at your 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.
-*
-* The Original Code is Copyright (C) 2006 Blender Foundation.
-* All rights reserved.
-*
-* The Original Code is: all of this file.
-*
-* Contributor(s): Ben Batt <benbatt@gmail.com>
-*
-* ***** END GPL LICENSE BLOCK *****
-*/
+ * $Id$
+ *
+ * ***** BEGIN GPL LICENSE BLOCK *****
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your 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.
+ *
+ * The Original Code is Copyright (C) 2006 Blender Foundation.
+ * All rights reserved.
+ *
+ * The Original Code is: all of this file.
+ *
+ * Contributor(s): Ben Batt <benbatt@gmail.com>
+ *
+ * ***** END GPL LICENSE BLOCK *****
+ */
/** \file BKE_cdderivedmesh.h
* \ingroup bke
diff --git a/source/blender/blenkernel/BKE_customdata.h b/source/blender/blenkernel/BKE_customdata.h
index 44f2db93663..84b4fd96265 100644
--- a/source/blender/blenkernel/BKE_customdata.h
+++ b/source/blender/blenkernel/BKE_customdata.h
@@ -1,31 +1,31 @@
/*
-* $Id$
-*
-* ***** BEGIN GPL LICENSE BLOCK *****
-*
-* This program is free software; you can redistribute it and/or
-* modify it under the terms of the GNU General Public License
-* as published by the Free Software Foundation; either version 2
-* of the License, or (at your 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.
-*
-* The Original Code is Copyright (C) 2006 Blender Foundation.
-* All rights reserved.
-*
-* The Original Code is: all of this file.
-*
-* Contributor(s): Ben Batt <benbatt@gmail.com>
-*
-* ***** END GPL LICENSE BLOCK *****
-*/
+ * $Id$
+ *
+ * ***** BEGIN GPL LICENSE BLOCK *****
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your 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.
+ *
+ * The Original Code is Copyright (C) 2006 Blender Foundation.
+ * All rights reserved.
+ *
+ * The Original Code is: all of this file.
+ *
+ * Contributor(s): Ben Batt <benbatt@gmail.com>
+ *
+ * ***** END GPL LICENSE BLOCK *****
+ */
/** \file BKE_customdata.h
* \ingroup bke
diff --git a/source/blender/blenkernel/BKE_displist.h b/source/blender/blenkernel/BKE_displist.h
index b00db53a199..1eed0aaca00 100644
--- a/source/blender/blenkernel/BKE_displist.h
+++ b/source/blender/blenkernel/BKE_displist.h
@@ -1,5 +1,5 @@
/*
- $Id$
+ * $Id$
*
* ***** BEGIN GPL LICENSE BLOCK *****
*
diff --git a/source/blender/blenkernel/BKE_icons.h b/source/blender/blenkernel/BKE_icons.h
index 3c12a5d615d..9f7d4aeb0d3 100644
--- a/source/blender/blenkernel/BKE_icons.h
+++ b/source/blender/blenkernel/BKE_icons.h
@@ -1,32 +1,31 @@
/*
-* $Id$
-*
-* ***** BEGIN GPL LICENSE BLOCK *****
-*
-* This program is free software; you can redistribute it and/or
-* modify it under the terms of the GNU General Public License
-* as published by the Free Software Foundation; either version 2
-* of the License, or (at your 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.
-*
-* The Original Code is Copyright (C) 2006-2007 Blender Foundation.
-* All rights reserved.
-*
-* The Original Code is: all of this file.
-*
-* Contributor(s): none yet.
-*
-* ***** END GPL LICENSE BLOCK *****
-*
-*/
+ * $Id$
+ *
+ * ***** BEGIN GPL LICENSE BLOCK *****
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your 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.
+ *
+ * The Original Code is Copyright (C) 2006-2007 Blender Foundation.
+ * All rights reserved.
+ *
+ * The Original Code is: all of this file.
+ *
+ * Contributor(s): none yet.
+ *
+ * ***** END GPL LICENSE BLOCK *****
+ */
#ifndef BKE_ICONS_H
#define BKE_ICONS_H
diff --git a/source/blender/blenkernel/BKE_mesh.h b/source/blender/blenkernel/BKE_mesh.h
index b414bcef474..98b4830fa65 100644
--- a/source/blender/blenkernel/BKE_mesh.h
+++ b/source/blender/blenkernel/BKE_mesh.h
@@ -1,6 +1,4 @@
/*
- * blenlib/BKE_mesh.h (mar-2001 nzc)
- *
* $Id$
*
* ***** BEGIN GPL LICENSE BLOCK *****
@@ -24,7 +22,7 @@
*
* The Original Code is: all of this file.
*
- * Contributor(s): none yet.
+ * Contributor(s): (mar-2001 nzc)
*
* ***** END GPL LICENSE BLOCK *****
*/
diff --git a/source/blender/blenkernel/BKE_navmesh_conversion.h b/source/blender/blenkernel/BKE_navmesh_conversion.h
index 01d32321c81..1880e1e6728 100644
--- a/source/blender/blenkernel/BKE_navmesh_conversion.h
+++ b/source/blender/blenkernel/BKE_navmesh_conversion.h
@@ -1,31 +1,31 @@
-/**
-* $Id$
-*
-* ***** BEGIN GPL LICENSE BLOCK *****
-*
-* This program is free software; you can redistribute it and/or
-* modify it under the terms of the GNU General Public License
-* as published by the Free Software Foundation; either version 2
-* of the License, or (at your 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.
-*
-* The Original Code is Copyright (C) 2001-2002 by NaN Holding BV.
-* All rights reserved.
-*
-* The Original Code is: all of this file.
-*
-* Contributor(s): none yet.
-*
-* ***** END GPL LICENSE BLOCK *****
-*/
+/*
+ * $Id$
+ *
+ * ***** BEGIN GPL LICENSE BLOCK *****
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your 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.
+ *
+ * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV.
+ * All rights reserved.
+ *
+ * The Original Code is: all of this file.
+ *
+ * Contributor(s): none yet.
+ *
+ * ***** END GPL LICENSE BLOCK *****
+ */
#ifndef BKE_NAVMESH_CONVERSION_H
#define BKE_NAVMESH_CONVERSION_H
diff --git a/source/blender/blenkernel/BKE_nla.h b/source/blender/blenkernel/BKE_nla.h
index 773c5ced1cb..49c1f8acd24 100644
--- a/source/blender/blenkernel/BKE_nla.h
+++ b/source/blender/blenkernel/BKE_nla.h
@@ -1,4 +1,6 @@
/*
+ * $Id$
+ *
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
diff --git a/source/blender/blenkernel/BKE_paint.h b/source/blender/blenkernel/BKE_paint.h
index f71279837a2..733ff3f357a 100644
--- a/source/blender/blenkernel/BKE_paint.h
+++ b/source/blender/blenkernel/BKE_paint.h
@@ -1,4 +1,6 @@
/*
+ * $Id$
+ *
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
diff --git a/source/blender/blenkernel/BKE_pointcache.h b/source/blender/blenkernel/BKE_pointcache.h
index 346368a5958..fcfa6ccf9f4 100644
--- a/source/blender/blenkernel/BKE_pointcache.h
+++ b/source/blender/blenkernel/BKE_pointcache.h
@@ -1,30 +1,31 @@
/*
-*
-* ***** 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.
-*
-* The Original Code is Copyright (C) 2006 Blender Foundation.
-* All rights reserved.
-*
-* The Original Code is: all of this file.
-*
-* Contributor(s): Campbell Barton <ideasman42@gmail.com>
-*
-* ***** END GPL LICENSE BLOCK *****
-*/
+ * $Id$
+ *
+ * ***** BEGIN GPL LICENSE BLOCK *****
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your 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.
+ *
+ * The Original Code is Copyright (C) 2006 Blender Foundation.
+ * All rights reserved.
+ *
+ * The Original Code is: all of this file.
+ *
+ * Contributor(s): Campbell Barton <ideasman42@gmail.com>
+ *
+ * ***** END GPL LICENSE BLOCK *****
+ */
#ifndef BKE_POINTCACHE_H
#define BKE_POINTCACHE_H
diff --git a/source/blender/blenkernel/BKE_shrinkwrap.h b/source/blender/blenkernel/BKE_shrinkwrap.h
index d1fef8b0ce1..9deb71a3474 100644
--- a/source/blender/blenkernel/BKE_shrinkwrap.h
+++ b/source/blender/blenkernel/BKE_shrinkwrap.h
@@ -1,4 +1,6 @@
/*
+ * $Id$
+ *
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
diff --git a/source/blender/blenkernel/BKE_subsurf.h b/source/blender/blenkernel/BKE_subsurf.h
index 9ba74eaf2fc..4f0ce433997 100644
--- a/source/blender/blenkernel/BKE_subsurf.h
+++ b/source/blender/blenkernel/BKE_subsurf.h
@@ -1,4 +1,5 @@
-/* $Id$
+/*
+ * $Id$
*
* ***** BEGIN GPL LICENSE BLOCK *****
*
diff --git a/source/blender/blenkernel/BKE_suggestions.h b/source/blender/blenkernel/BKE_suggestions.h
index e215cabd70f..c684271cbbf 100644
--- a/source/blender/blenkernel/BKE_suggestions.h
+++ b/source/blender/blenkernel/BKE_suggestions.h
@@ -1,4 +1,4 @@
-/*
+/*
* $Id$
*
* ***** BEGIN GPL LICENSE BLOCK *****
diff --git a/source/blender/blenkernel/BKE_unit.h b/source/blender/blenkernel/BKE_unit.h
index 0a3e56c8cba..269941597b0 100644
--- a/source/blender/blenkernel/BKE_unit.h
+++ b/source/blender/blenkernel/BKE_unit.h
@@ -1,4 +1,5 @@
/*
+ * $Id$
*
* ***** BEGIN GPL LICENSE BLOCK *****
*
diff --git a/source/blender/blenkernel/BKE_writeffmpeg.h b/source/blender/blenkernel/BKE_writeffmpeg.h
index 2b10f1b246c..8345f0f5d2e 100644
--- a/source/blender/blenkernel/BKE_writeffmpeg.h
+++ b/source/blender/blenkernel/BKE_writeffmpeg.h
@@ -1,4 +1,6 @@
/*
+ * $Id$
+ *
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
diff --git a/source/blender/blenkernel/BKE_writeframeserver.h b/source/blender/blenkernel/BKE_writeframeserver.h
index 2117a23b938..8b2022076bb 100644
--- a/source/blender/blenkernel/BKE_writeframeserver.h
+++ b/source/blender/blenkernel/BKE_writeframeserver.h
@@ -1,4 +1,6 @@
/*
+ * $Id$
+ *
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
diff --git a/source/blender/blenkernel/intern/CCGSubSurf.c b/source/blender/blenkernel/intern/CCGSubSurf.c
index a311ca15e5e..bf9acb224d5 100644
--- a/source/blender/blenkernel/intern/CCGSubSurf.c
+++ b/source/blender/blenkernel/intern/CCGSubSurf.c
@@ -1,7 +1,8 @@
+/* $Id$ */
+
/** \file blender/blenkernel/intern/CCGSubSurf.c
* \ingroup bke
*/
-/* $Id$ */
#include <stdlib.h>
#include <string.h>
diff --git a/source/blender/blenkernel/intern/CCGSubSurf.h b/source/blender/blenkernel/intern/CCGSubSurf.h
index 363d1e01f98..1835e63727d 100644
--- a/source/blender/blenkernel/intern/CCGSubSurf.h
+++ b/source/blender/blenkernel/intern/CCGSubSurf.h
@@ -1,7 +1,8 @@
+/* $Id$ */
+
/** \file blender/blenkernel/intern/CCGSubSurf.h
* \ingroup bke
*/
-/* $Id$ */
typedef void* CCGMeshHDL;
typedef void* CCGVertHDL;
diff --git a/source/blender/blenkernel/intern/DerivedMesh.c b/source/blender/blenkernel/intern/DerivedMesh.c
index 1578eebb4fe..36753fcb02c 100644
--- a/source/blender/blenkernel/intern/DerivedMesh.c
+++ b/source/blender/blenkernel/intern/DerivedMesh.c
@@ -68,6 +68,7 @@
#ifdef WITH_GAMEENGINE
#include "BKE_navmesh_conversion.h"
+static DerivedMesh *navmesh_dm_createNavMeshForVisualization(DerivedMesh *dm);
#endif
#include "BLO_sys_types.h" // for intptr_t support
@@ -84,8 +85,6 @@ extern GLubyte stipple_quarttone[128]; /* glutil.c, bad level data */
static void add_shapekey_layers(DerivedMesh *dm, Mesh *me, Object *ob);
static void shapekey_layers_to_keyblocks(DerivedMesh *dm, Mesh *me, int actshape_uid);
-static DerivedMesh *navmesh_dm_createNavMeshForVisualization(DerivedMesh *dm);
-
///////////////////////////////////
///////////////////////////////////
@@ -2309,7 +2308,7 @@ BM_INLINE int navmesh_bit(int a, int b)
return (a & (1 << b)) >> b;
}
-static void navmesh_intToCol(int i, float* col)
+BM_INLINE void navmesh_intToCol(int i, float col[3])
{
int r = navmesh_bit(i, 0) + navmesh_bit(i, 3) * 2 + 1;
int g = navmesh_bit(i, 1) + navmesh_bit(i, 4) * 2 + 1;
@@ -2324,8 +2323,7 @@ static void navmesh_drawColored(DerivedMesh *dm)
int a, glmode;
MVert *mvert = (MVert *)CustomData_get_layer(&dm->vertData, CD_MVERT);
MFace *mface = (MFace *)CustomData_get_layer(&dm->faceData, CD_MFACE);
- int* polygonIdx = (int*)CustomData_get_layer(&dm->faceData, CD_RECAST);
- const float BLACK_COLOR[3] = {0.f, 0.f, 0.f};
+ int *polygonIdx = (int *)CustomData_get_layer(&dm->faceData, CD_RECAST);
float col[3];
if (!polygonIdx)
@@ -2340,17 +2338,19 @@ static void navmesh_drawColored(DerivedMesh *dm)
glEnable(GL_LIGHTING);*/
glDisable(GL_LIGHTING);
- if(GPU_buffer_legacy(dm) ) {
+ /* if(GPU_buffer_legacy(dm) ) */ { /* TODO - VBO draw code, not high priority - campbell */
DEBUG_VBO( "Using legacy code. drawNavMeshColored\n" );
//glShadeModel(GL_SMOOTH);
glBegin(glmode = GL_QUADS);
for(a = 0; a < dm->numFaceData; a++, mface++) {
int new_glmode = mface->v4?GL_QUADS:GL_TRIANGLES;
- int polygonIdx = *(int*)CustomData_get(&dm->faceData, a, CD_RECAST);
- if (polygonIdx<=0)
- memcpy(col, BLACK_COLOR, 3*sizeof(float));
- else
- navmesh_intToCol(polygonIdx, col);
+ int pi = polygonIdx[a];
+ if (pi <= 0) {
+ zero_v3(col);
+ }
+ else {
+ navmesh_intToCol(pi, col);
+ }
if(new_glmode != glmode) {
glEnd();
@@ -2401,8 +2401,10 @@ static DerivedMesh *navmesh_dm_createNavMeshForVisualization(DerivedMesh *dm)
result = CDDM_copy(dm);
if (!CustomData_has_layer(&result->faceData, CD_RECAST)) {
int *sourceRecastData = (int*)CustomData_get_layer(&dm->faceData, CD_RECAST);
- CustomData_add_layer_named(&result->faceData, CD_RECAST, CD_DUPLICATE,
- sourceRecastData, maxFaces, "recastData");
+ if (sourceRecastData) {
+ CustomData_add_layer_named(&result->faceData, CD_RECAST, CD_DUPLICATE,
+ sourceRecastData, maxFaces, "recastData");
+ }
}
recastData = (int*)CustomData_get_layer(&result->faceData, CD_RECAST);
diff --git a/source/blender/blenkernel/intern/action.c b/source/blender/blenkernel/intern/action.c
index 8d18a1c27e7..8b9f5ac98d3 100644
--- a/source/blender/blenkernel/intern/action.c
+++ b/source/blender/blenkernel/intern/action.c
@@ -1,4 +1,6 @@
/*
+ * $Id$
+ *
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
diff --git a/source/blender/blenkernel/intern/anim.c b/source/blender/blenkernel/intern/anim.c
index a7f3888532e..96d603875e4 100644
--- a/source/blender/blenkernel/intern/anim.c
+++ b/source/blender/blenkernel/intern/anim.c
@@ -1,4 +1,6 @@
-/*
+/*
+ * $Id$
+ *
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
diff --git a/source/blender/blenkernel/intern/anim_sys.c b/source/blender/blenkernel/intern/anim_sys.c
index 13abf18e20c..3cf14fa45ab 100644
--- a/source/blender/blenkernel/intern/anim_sys.c
+++ b/source/blender/blenkernel/intern/anim_sys.c
@@ -1,4 +1,6 @@
/*
+ * $Id$
+ *
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
diff --git a/source/blender/blenkernel/intern/armature.c b/source/blender/blenkernel/intern/armature.c
index 1149d8eee25..fbbce58414e 100644
--- a/source/blender/blenkernel/intern/armature.c
+++ b/source/blender/blenkernel/intern/armature.c
@@ -1,4 +1,6 @@
/*
+ * $Id$
+ *
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
diff --git a/source/blender/blenkernel/intern/blender.c b/source/blender/blenkernel/intern/blender.c
index 63c6d35a1d8..601c77f8e43 100644
--- a/source/blender/blenkernel/intern/blender.c
+++ b/source/blender/blenkernel/intern/blender.c
@@ -1,7 +1,4 @@
-/* blender.c jan 94 MIXED MODEL
- *
- * common help functions and data
- *
+/*
* $Id$
*
* ***** BEGIN GPL LICENSE BLOCK *****
diff --git a/source/blender/blenkernel/intern/bmfont.c b/source/blender/blenkernel/intern/bmfont.c
index 6b1f313d88d..d73d7509644 100644
--- a/source/blender/blenkernel/intern/bmfont.c
+++ b/source/blender/blenkernel/intern/bmfont.c
@@ -1,8 +1,4 @@
/*
- * bmfont.c
- *
- * 04-10-2000 frank
- *
* $Id$
*
* ***** BEGIN GPL LICENSE BLOCK *****
@@ -26,7 +22,7 @@
*
* The Original Code is: all of this file.
*
- * Contributor(s): none yet.
+ * Contributor(s): 04-10-2000 frank.
*
* ***** END GPL LICENSE BLOCK *****
*
diff --git a/source/blender/blenkernel/intern/boids.c b/source/blender/blenkernel/intern/boids.c
index f9f210fbae4..2a478d4ffe2 100644
--- a/source/blender/blenkernel/intern/boids.c
+++ b/source/blender/blenkernel/intern/boids.c
@@ -1,6 +1,4 @@
-/* boids.c
- *
- *
+/*
* $Id$
*
* ***** BEGIN GPL LICENSE BLOCK *****
diff --git a/source/blender/blenkernel/intern/bullet.c b/source/blender/blenkernel/intern/bullet.c
index 72f5e907800..e4a02434cba 100644
--- a/source/blender/blenkernel/intern/bullet.c
+++ b/source/blender/blenkernel/intern/bullet.c
@@ -1,5 +1,4 @@
-/*
- *
+/*
* $Id$
*
* ***** BEGIN GPL LICENSE BLOCK *****
diff --git a/source/blender/blenkernel/intern/bvhutils.c b/source/blender/blenkernel/intern/bvhutils.c
index e41fe45e121..a4e8a1fc4bd 100644
--- a/source/blender/blenkernel/intern/bvhutils.c
+++ b/source/blender/blenkernel/intern/bvhutils.c
@@ -1,5 +1,4 @@
/*
- *
* $Id$
*
* ***** BEGIN GPL LICENSE BLOCK *****
diff --git a/source/blender/blenkernel/intern/cdderivedmesh.c b/source/blender/blenkernel/intern/cdderivedmesh.c
index 5fbb87e618c..fc571627ec9 100644
--- a/source/blender/blenkernel/intern/cdderivedmesh.c
+++ b/source/blender/blenkernel/intern/cdderivedmesh.c
@@ -1,41 +1,41 @@
/*
-* $Id$
-*
-* ***** BEGIN GPL LICENSE BLOCK *****
-*
-* This program is free software; you can redistribute it and/or
-* modify it under the terms of the GNU General Public License
-* as published by the Free Software Foundation; either version 2
-* of the License, or (at your 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.
-*
-* The Original Code is Copyright (C) 2006 Blender Foundation.
-* All rights reserved.
-*
-* The Original Code is: all of this file.
-*
-* Contributor(s): Ben Batt <benbatt@gmail.com>
-*
-* ***** END GPL LICENSE BLOCK *****
-*
-* Implementation of CDDerivedMesh.
-*
-* BKE_cdderivedmesh.h contains the function prototypes for this file.
-*
-*/
+ * $Id$
+ *
+ * ***** BEGIN GPL LICENSE BLOCK *****
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your 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.
+ *
+ * The Original Code is Copyright (C) 2006 Blender Foundation.
+ * All rights reserved.
+ *
+ * The Original Code is: all of this file.
+ *
+ * Contributor(s): Ben Batt <benbatt@gmail.com>
+ *
+ * ***** END GPL LICENSE BLOCK *****
+ *
+ * Implementation of CDDerivedMesh.
+ *
+ * BKE_cdderivedmesh.h contains the function prototypes for this file.
+ *
+ */
/** \file blender/blenkernel/intern/cdderivedmesh.c
* \ingroup bke
*/
-
+
#include "GL/glew.h"
#include "BKE_cdderivedmesh.h"
diff --git a/source/blender/blenkernel/intern/colortools.c b/source/blender/blenkernel/intern/colortools.c
index 7e92a09ce99..83003809a37 100644
--- a/source/blender/blenkernel/intern/colortools.c
+++ b/source/blender/blenkernel/intern/colortools.c
@@ -1,4 +1,4 @@
-/*
+/*
* $Id$
*
* ***** BEGIN GPL LICENSE BLOCK *****
diff --git a/source/blender/blenkernel/intern/constraint.c b/source/blender/blenkernel/intern/constraint.c
index 0031acd5dc7..5c39fbfb9bb 100644
--- a/source/blender/blenkernel/intern/constraint.c
+++ b/source/blender/blenkernel/intern/constraint.c
@@ -1,4 +1,6 @@
/*
+ * $Id$
+ *
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
diff --git a/source/blender/blenkernel/intern/curve.c b/source/blender/blenkernel/intern/curve.c
index 8177f69c418..a51909b3714 100644
--- a/source/blender/blenkernel/intern/curve.c
+++ b/source/blender/blenkernel/intern/curve.c
@@ -1,7 +1,4 @@
-
-/* curve.c
- *
- *
+/*
* $Id$
*
* ***** BEGIN GPL LICENSE BLOCK *****
diff --git a/source/blender/blenkernel/intern/customdata.c b/source/blender/blenkernel/intern/customdata.c
index d44edda4b68..c8abcc3a594 100644
--- a/source/blender/blenkernel/intern/customdata.c
+++ b/source/blender/blenkernel/intern/customdata.c
@@ -1,36 +1,36 @@
/*
-* $Id$
-*
-* ***** BEGIN GPL LICENSE BLOCK *****
-*
-* This program is free software; you can redistribute it and/or
-* modify it under the terms of the GNU General Public License
-* as published by the Free Software Foundation; either version 2
-* of the License, or (at your 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.
-*
-* The Original Code is Copyright (C) 2006 Blender Foundation.
-* All rights reserved.
-*
-* The Original Code is: all of this file.
-*
-* Contributor(s): Ben Batt <benbatt@gmail.com>
-*
-* ***** END GPL LICENSE BLOCK *****
-*
-* Implementation of CustomData.
-*
-* BKE_customdata.h contains the function prototypes for this file.
-*
-*/
+ * $Id$
+ *
+ * ***** BEGIN GPL LICENSE BLOCK *****
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your 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.
+ *
+ * The Original Code is Copyright (C) 2006 Blender Foundation.
+ * All rights reserved.
+ *
+ * The Original Code is: all of this file.
+ *
+ * Contributor(s): Ben Batt <benbatt@gmail.com>
+ *
+ * ***** END GPL LICENSE BLOCK *****
+ *
+ * Implementation of CustomData.
+ *
+ * BKE_customdata.h contains the function prototypes for this file.
+ *
+ */
/** \file blender/blenkernel/intern/customdata.c
* \ingroup bke
diff --git a/source/blender/blenkernel/intern/deform.c b/source/blender/blenkernel/intern/deform.c
index e4b4732e21a..7c6bd45ad14 100644
--- a/source/blender/blenkernel/intern/deform.c
+++ b/source/blender/blenkernel/intern/deform.c
@@ -1,9 +1,4 @@
-/* deform.c June 2001
- *
- * support for deformation groups
- *
- * Reevan McKay
- *
+/*
* $Id$
*
* ***** BEGIN GPL LICENSE BLOCK *****
@@ -27,7 +22,7 @@
*
* The Original Code is: all of this file.
*
- * Contributor(s): none yet.
+ * Contributor(s): Reevan McKay
*
* ***** END GPL LICENSE BLOCK *****
*/
diff --git a/source/blender/blenkernel/intern/displist.c b/source/blender/blenkernel/intern/displist.c
index fd4e3877f60..3a5e7e90ff0 100644
--- a/source/blender/blenkernel/intern/displist.c
+++ b/source/blender/blenkernel/intern/displist.c
@@ -1,6 +1,4 @@
-/* displist.c
- *
- *
+/*
* $Id$
*
* ***** BEGIN GPL LICENSE BLOCK *****
diff --git a/source/blender/blenkernel/intern/effect.c b/source/blender/blenkernel/intern/effect.c
index 500d4ae13f7..b64af28771c 100644
--- a/source/blender/blenkernel/intern/effect.c
+++ b/source/blender/blenkernel/intern/effect.c
@@ -1,6 +1,4 @@
-/* effect.c
- *
- *
+/*
* $Id$
*
* ***** BEGIN GPL LICENSE BLOCK *****
diff --git a/source/blender/blenkernel/intern/fcurve.c b/source/blender/blenkernel/intern/fcurve.c
index 8ea80ae9296..e2326b005c1 100644
--- a/source/blender/blenkernel/intern/fcurve.c
+++ b/source/blender/blenkernel/intern/fcurve.c
@@ -1,4 +1,6 @@
/*
+ * $Id$
+ *
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
diff --git a/source/blender/blenkernel/intern/fmodifier.c b/source/blender/blenkernel/intern/fmodifier.c
index 95c0aa60991..d5c54893128 100644
--- a/source/blender/blenkernel/intern/fmodifier.c
+++ b/source/blender/blenkernel/intern/fmodifier.c
@@ -1,4 +1,6 @@
/*
+ * $Id$
+ *
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
diff --git a/source/blender/blenkernel/intern/font.c b/source/blender/blenkernel/intern/font.c
index c82aa855a7b..9c01b35b91a 100644
--- a/source/blender/blenkernel/intern/font.c
+++ b/source/blender/blenkernel/intern/font.c
@@ -1,6 +1,4 @@
-/* font.c
- *
- *
+/*
* $Id$
*
* ***** BEGIN GPL LICENSE BLOCK *****
@@ -548,7 +546,7 @@ static void buildchar(Main *bmain, Curve *cu, unsigned long character, CharInfo
nu2->knotsu = nu2->knotsv = NULL;
nu2->flag= CU_SMOOTH;
nu2->charidx = charidx;
- if (info->mat_nr) {
+ if (info->mat_nr > 0) {
nu2->mat_nr= info->mat_nr-1;
}
else {
diff --git a/source/blender/blenkernel/intern/gpencil.c b/source/blender/blenkernel/intern/gpencil.c
index d56c9a63a91..06ca7b7b509 100644
--- a/source/blender/blenkernel/intern/gpencil.c
+++ b/source/blender/blenkernel/intern/gpencil.c
@@ -1,4 +1,6 @@
/*
+ * $Id$
+ *
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
diff --git a/source/blender/blenkernel/intern/icons.c b/source/blender/blenkernel/intern/icons.c
index 9effd25c142..07bb4666134 100644
--- a/source/blender/blenkernel/intern/icons.c
+++ b/source/blender/blenkernel/intern/icons.c
@@ -1,32 +1,32 @@
/*
-* $Id$
-*
-* ***** BEGIN GPL LICENSE BLOCK *****
-*
-* This program is free software; you can redistribute it and/or
-* modify it under the terms of the GNU General Public License
-* as published by the Free Software Foundation; either version 2
-* of the License, or (at your 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.
-*
-* The Original Code is Copyright (C) 2006-2007 Blender Foundation.
-* All rights reserved.
-*
-* The Original Code is: all of this file.
-*
-* Contributor(s): none yet.
-*
-* ***** END GPL LICENSE BLOCK *****
-*
-*/
+ * $Id$
+ *
+ * ***** BEGIN GPL LICENSE BLOCK *****
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your 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.
+ *
+ * The Original Code is Copyright (C) 2006-2007 Blender Foundation.
+ * All rights reserved.
+ *
+ * The Original Code is: all of this file.
+ *
+ * Contributor(s): none yet.
+ *
+ * ***** END GPL LICENSE BLOCK *****
+ *
+ */
/** \file blender/blenkernel/intern/icons.c
* \ingroup bke
diff --git a/source/blender/blenkernel/intern/image.c b/source/blender/blenkernel/intern/image.c
index f6210d3a516..cf8f96c143a 100644
--- a/source/blender/blenkernel/intern/image.c
+++ b/source/blender/blenkernel/intern/image.c
@@ -1,5 +1,4 @@
-/* image.c
- *
+/*
* $Id$
*
* ***** BEGIN GPL LICENSE BLOCK *****
diff --git a/source/blender/blenkernel/intern/image_gen.c b/source/blender/blenkernel/intern/image_gen.c
index 5b237665290..f4d1ff4241d 100644
--- a/source/blender/blenkernel/intern/image_gen.c
+++ b/source/blender/blenkernel/intern/image_gen.c
@@ -1,5 +1,4 @@
-/* image_gen.c
- *
+/*
* $Id$
*
* ***** BEGIN GPL LICENSE BLOCK *****
diff --git a/source/blender/blenkernel/intern/ipo.c b/source/blender/blenkernel/intern/ipo.c
index b885e608b15..91f3c7a22ba 100644
--- a/source/blender/blenkernel/intern/ipo.c
+++ b/source/blender/blenkernel/intern/ipo.c
@@ -1,4 +1,6 @@
-/*
+/*
+ * $Id$
+ *
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
diff --git a/source/blender/blenkernel/intern/key.c b/source/blender/blenkernel/intern/key.c
index 3ec47f344c5..81dd7607d20 100644
--- a/source/blender/blenkernel/intern/key.c
+++ b/source/blender/blenkernel/intern/key.c
@@ -1,7 +1,4 @@
-
-/* key.c
- *
- *
+/*
* $Id$
*
* ***** BEGIN GPL LICENSE BLOCK *****
diff --git a/source/blender/blenkernel/intern/lattice.c b/source/blender/blenkernel/intern/lattice.c
index 094214858f9..cbff9c2337e 100644
--- a/source/blender/blenkernel/intern/lattice.c
+++ b/source/blender/blenkernel/intern/lattice.c
@@ -1,7 +1,4 @@
/*
- * lattice.c
- *
- *
* $Id$
*
* ***** BEGIN GPL LICENSE BLOCK *****
diff --git a/source/blender/blenkernel/intern/material.c b/source/blender/blenkernel/intern/material.c
index a763941cfe9..ebd05ab9bf8 100644
--- a/source/blender/blenkernel/intern/material.c
+++ b/source/blender/blenkernel/intern/material.c
@@ -1,7 +1,4 @@
-
-/* material.c
- *
- *
+/*
* $Id$
*
* ***** BEGIN GPL LICENSE BLOCK *****
@@ -1108,8 +1105,17 @@ int object_remove_material_slot(Object *ob)
short *totcolp;
short a, actcol;
- if(ob==NULL || ob->totcol==0) return FALSE;
-
+ if (ob==NULL || ob->totcol==0) {
+ return FALSE;
+ }
+
+ /* this should never happen and used to crash */
+ if (ob->actcol <= 0) {
+ printf("%s: invalid material index %d, report a bug!\n", __func__, ob->actcol);
+ BLI_assert(0);
+ return FALSE;
+ }
+
/* take a mesh/curve/mball as starting point, remove 1 index,
* AND with all objects that share the ob->data
*
@@ -1122,10 +1128,8 @@ int object_remove_material_slot(Object *ob)
if(*matarar==NULL) return FALSE;
/* we delete the actcol */
- if(ob->totcol) {
- mao= (*matarar)[ob->actcol-1];
- if(mao) mao->id.us--;
- }
+ mao= (*matarar)[ob->actcol-1];
+ if(mao) mao->id.us--;
for(a=ob->actcol; a<ob->totcol; a++)
(*matarar)[a-1]= (*matarar)[a];
diff --git a/source/blender/blenkernel/intern/mball.c b/source/blender/blenkernel/intern/mball.c
index 555d35726bc..05d07ddf918 100644
--- a/source/blender/blenkernel/intern/mball.c
+++ b/source/blender/blenkernel/intern/mball.c
@@ -1,11 +1,4 @@
-/* mball.c
- *
- * MetaBalls are created from a single Object (with a name without number in it),
- * here the DispList and BoundBox also is located.
- * All objects with the same name (but with a number in it) are added to this.
- *
- * texture coordinates are patched within the displist
- *
+/*
* $Id$
*
* ***** BEGIN GPL LICENSE BLOCK *****
@@ -30,13 +23,18 @@
* Contributor(s): Jiri Hnidek <jiri.hnidek@vslib.cz>.
*
* ***** END GPL LICENSE BLOCK *****
+ *
+ * MetaBalls are created from a single Object (with a name without number in it),
+ * here the DispList and BoundBox also is located.
+ * All objects with the same name (but with a number in it) are added to this.
+ *
+ * texture coordinates are patched within the displist
*/
/** \file blender/blenkernel/intern/mball.c
* \ingroup bke
*/
-
#include <stdio.h>
#include <string.h>
#include <math.h>
diff --git a/source/blender/blenkernel/intern/mesh.c b/source/blender/blenkernel/intern/mesh.c
index 01f521e3a02..5fb984dda76 100644
--- a/source/blender/blenkernel/intern/mesh.c
+++ b/source/blender/blenkernel/intern/mesh.c
@@ -1,8 +1,4 @@
-
-/* mesh.c
- *
- *
- *
+/*
* $Id$
*
* ***** BEGIN GPL LICENSE BLOCK *****
diff --git a/source/blender/blenkernel/intern/modifier.c b/source/blender/blenkernel/intern/modifier.c
index fe26c0ccd2d..9de75a49998 100644
--- a/source/blender/blenkernel/intern/modifier.c
+++ b/source/blender/blenkernel/intern/modifier.c
@@ -1,38 +1,38 @@
/*
-* $Id$
-*
-* ***** BEGIN GPL LICENSE BLOCK *****
-*
-* This program is free software; you can redistribute it and/or
-* modify it under the terms of the GNU General Public License
-* as published by the Free Software Foundation; either version 2
-* of the License, or (at your 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.
-*
-* The Original Code is Copyright (C) 2005 by the Blender Foundation.
-* All rights reserved.
-*
-* Contributor(s): Daniel Dunbar
-* Ton Roosendaal,
-* Ben Batt,
-* Brecht Van Lommel,
-* Campbell Barton
-*
-* ***** END GPL LICENSE BLOCK *****
-*
-* Modifier stack implementation.
-*
-* BKE_modifier.h contains the function prototypes for this file.
-*
-*/
+ * $Id$
+ *
+ * ***** BEGIN GPL LICENSE BLOCK *****
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your 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.
+ *
+ * The Original Code is Copyright (C) 2005 by the Blender Foundation.
+ * All rights reserved.
+ *
+ * Contributor(s): Daniel Dunbar
+ * Ton Roosendaal,
+ * Ben Batt,
+ * Brecht Van Lommel,
+ * Campbell Barton
+ *
+ * ***** END GPL LICENSE BLOCK *****
+ *
+ * Modifier stack implementation.
+ *
+ * BKE_modifier.h contains the function prototypes for this file.
+ *
+ */
/** \file blender/blenkernel/intern/modifier.c
* \ingroup bke
diff --git a/source/blender/blenkernel/intern/navmesh_conversion.c b/source/blender/blenkernel/intern/navmesh_conversion.c
index 04f6ff19564..f670486484b 100644
--- a/source/blender/blenkernel/intern/navmesh_conversion.c
+++ b/source/blender/blenkernel/intern/navmesh_conversion.c
@@ -1,31 +1,35 @@
-/**
-* $Id$
-*
-* ***** BEGIN GPL LICENSE BLOCK *****
-*
-* This program is free software; you can redistribute it and/or
-* modify it under the terms of the GNU General Public License
-* as published by the Free Software Foundation; either version 2
-* of the License, or (at your 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.
-*
-* The Original Code is Copyright (C) 2001-2002 by NaN Holding BV.
-* All rights reserved.
-*
-* The Original Code is: all of this file.
-*
-* Contributor(s): none yet.
-*
-* ***** END GPL LICENSE BLOCK *****
-*/
+/*
+ * $Id$
+ *
+ * ***** BEGIN GPL LICENSE BLOCK *****
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your 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.
+ *
+ * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV.
+ * All rights reserved.
+ *
+ * The Original Code is: all of this file.
+ *
+ * Contributor(s): none yet.
+ *
+ * ***** END GPL LICENSE BLOCK *****
+ */
+
+/** \file blender/blenkernel/intern/navmesh_conversion.c
+ * \ingroup bke
+ */
#include <math.h>
#include <stdlib.h>
diff --git a/source/blender/blenkernel/intern/nla.c b/source/blender/blenkernel/intern/nla.c
index 9c5cf9f05fa..97347d85deb 100644
--- a/source/blender/blenkernel/intern/nla.c
+++ b/source/blender/blenkernel/intern/nla.c
@@ -1,4 +1,6 @@
/*
+ * $Id$
+ *
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
diff --git a/source/blender/blenkernel/intern/object.c b/source/blender/blenkernel/intern/object.c
index 311cb0a5d8a..bf2e46c86c5 100644
--- a/source/blender/blenkernel/intern/object.c
+++ b/source/blender/blenkernel/intern/object.c
@@ -1,6 +1,4 @@
-/* object.c
- *
- *
+/*
* $Id$
*
* ***** BEGIN GPL LICENSE BLOCK *****
diff --git a/source/blender/blenkernel/intern/packedFile.c b/source/blender/blenkernel/intern/packedFile.c
index 4bc40bde949..2c8975e9cb4 100644
--- a/source/blender/blenkernel/intern/packedFile.c
+++ b/source/blender/blenkernel/intern/packedFile.c
@@ -1,6 +1,4 @@
/*
- * blenkernel/packedFile.c - (cleaned up mar-01 nzc)
- *
* $Id$
*
* ***** BEGIN GPL LICENSE BLOCK *****
diff --git a/source/blender/blenkernel/intern/particle.c b/source/blender/blenkernel/intern/particle.c
index 7abdf6d1daa..c6f526415c8 100644
--- a/source/blender/blenkernel/intern/particle.c
+++ b/source/blender/blenkernel/intern/particle.c
@@ -1,6 +1,4 @@
-/* particle.c
- *
- *
+/*
* $Id$
*
* ***** BEGIN GPL LICENSE BLOCK *****
diff --git a/source/blender/blenkernel/intern/particle_system.c b/source/blender/blenkernel/intern/particle_system.c
index 3264614fff9..6a2cef41262 100644
--- a/source/blender/blenkernel/intern/particle_system.c
+++ b/source/blender/blenkernel/intern/particle_system.c
@@ -1,6 +1,4 @@
-/* particle_system.c
- *
- *
+/*
* $Id$
*
* ***** BEGIN GPL LICENSE BLOCK *****
diff --git a/source/blender/blenkernel/intern/property.c b/source/blender/blenkernel/intern/property.c
index d0e4832889b..cdf2e39a4dd 100644
--- a/source/blender/blenkernel/intern/property.c
+++ b/source/blender/blenkernel/intern/property.c
@@ -1,7 +1,4 @@
-
-/* property.c june 2000
- *
- * ton roosendaal
+/*
* $Id$
*
* ***** BEGIN GPL LICENSE BLOCK *****
@@ -25,7 +22,7 @@
*
* The Original Code is: all of this file.
*
- * Contributor(s): none yet.
+ * Contributor(s): ton roosendaal
*
* ***** END GPL LICENSE BLOCK *****
*/
diff --git a/source/blender/blenkernel/intern/scene.c b/source/blender/blenkernel/intern/scene.c
index 1a72405ad5e..5ea635d8c30 100644
--- a/source/blender/blenkernel/intern/scene.c
+++ b/source/blender/blenkernel/intern/scene.c
@@ -1,6 +1,4 @@
-/* scene.c
- *
- *
+/*
* $Id$
*
* ***** BEGIN GPL LICENSE BLOCK *****
diff --git a/source/blender/blenkernel/intern/script.c b/source/blender/blenkernel/intern/script.c
index 77153fc37ba..77a79a6c8a4 100644
--- a/source/blender/blenkernel/intern/script.c
+++ b/source/blender/blenkernel/intern/script.c
@@ -1,10 +1,6 @@
-/* blenkernel/script.c
- *
- *
+/*
* $Id$
*
- * Function(s) related to struct script management.
- *
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
diff --git a/source/blender/blenkernel/intern/seqcache.c b/source/blender/blenkernel/intern/seqcache.c
index 5ac6bb47705..88e9d9209d4 100755..100644
--- a/source/blender/blenkernel/intern/seqcache.c
+++ b/source/blender/blenkernel/intern/seqcache.c
@@ -1,5 +1,5 @@
/*
-* $Id: seqcache.c 36197 2011-04-17 10:05:27Z schlaile $
+ * $Id$
*
* ***** BEGIN GPL LICENSE BLOCK *****
*
@@ -150,8 +150,8 @@ void seq_stripelem_cache_init(void)
hash = BLI_ghash_new(HashHash, HashCmp, "seq stripelem cache hash");
limitor = new_MEM_CacheLimiter( IMB_seq_cache_destructor );
- entrypool = BLI_mempool_create(sizeof(seqCacheEntry), 64, 64, 0, 0);
- keypool = BLI_mempool_create(sizeof(seqCacheKey), 64, 64, 0, 0);
+ entrypool = BLI_mempool_create(sizeof(seqCacheEntry), 64, 64, 0);
+ keypool = BLI_mempool_create(sizeof(seqCacheKey), 64, 64, 0);
}
void seq_stripelem_cache_destruct(void)
diff --git a/source/blender/blenkernel/intern/sequencer.c b/source/blender/blenkernel/intern/sequencer.c
index 08848c35add..5a2c53f5b9b 100644
--- a/source/blender/blenkernel/intern/sequencer.c
+++ b/source/blender/blenkernel/intern/sequencer.c
@@ -1,5 +1,5 @@
/*
-* $Id$
+ * $Id$
*
* ***** BEGIN GPL LICENSE BLOCK *****
*
diff --git a/source/blender/blenkernel/intern/sketch.c b/source/blender/blenkernel/intern/sketch.c
index 432dc9ec609..a5afc0afda1 100644
--- a/source/blender/blenkernel/intern/sketch.c
+++ b/source/blender/blenkernel/intern/sketch.c
@@ -1,5 +1,4 @@
/*
- *
* $Id$
*
* ***** BEGIN GPL LICENSE BLOCK *****
diff --git a/source/blender/blenkernel/intern/smoke.c b/source/blender/blenkernel/intern/smoke.c
index 08c673c2c8c..002a4b7ec5a 100644
--- a/source/blender/blenkernel/intern/smoke.c
+++ b/source/blender/blenkernel/intern/smoke.c
@@ -1,6 +1,4 @@
/*
- * smoke.c
- *
* $Id$
*
* ***** BEGIN GPL LICENSE BLOCK *****
diff --git a/source/blender/blenkernel/intern/softbody.c b/source/blender/blenkernel/intern/softbody.c
index 784c67d6d77..88f72c33802 100644
--- a/source/blender/blenkernel/intern/softbody.c
+++ b/source/blender/blenkernel/intern/softbody.c
@@ -1,5 +1,4 @@
-/* softbody.c
- *
+/*
* $Id$
*
* ***** BEGIN GPL LICENSE BLOCK *****
diff --git a/source/blender/blenkernel/intern/speaker.c b/source/blender/blenkernel/intern/speaker.c
index 200dbd41899..ae29230423f 100644
--- a/source/blender/blenkernel/intern/speaker.c
+++ b/source/blender/blenkernel/intern/speaker.c
@@ -1,6 +1,4 @@
-/* speaker.c
- *
- *
+/*
* $Id$
*
* ***** BEGIN GPL LICENSE BLOCK *****
diff --git a/source/blender/blenkernel/intern/text.c b/source/blender/blenkernel/intern/text.c
index 02cffcec249..b5fc76a8551 100644
--- a/source/blender/blenkernel/intern/text.c
+++ b/source/blender/blenkernel/intern/text.c
@@ -1,6 +1,4 @@
-/* text.c
- *
- *
+/*
* $Id$
*
* ***** BEGIN GPL LICENSE BLOCK *****
diff --git a/source/blender/blenkernel/intern/texture.c b/source/blender/blenkernel/intern/texture.c
index ea6f6eb702b..d344f79bb6c 100644
--- a/source/blender/blenkernel/intern/texture.c
+++ b/source/blender/blenkernel/intern/texture.c
@@ -1,6 +1,4 @@
-/* texture.c
- *
- *
+/*
* $Id$
*
* ***** BEGIN GPL LICENSE BLOCK *****
diff --git a/source/blender/blenkernel/intern/world.c b/source/blender/blenkernel/intern/world.c
index d413177873f..7d278f37cfb 100644
--- a/source/blender/blenkernel/intern/world.c
+++ b/source/blender/blenkernel/intern/world.c
@@ -1,7 +1,4 @@
-
-/* world.c
- *
- *
+/*
* $Id$
*
* ***** BEGIN GPL LICENSE BLOCK *****
diff --git a/source/blender/blenkernel/intern/writeavi.c b/source/blender/blenkernel/intern/writeavi.c
index 769a3f9b11e..b989d44c391 100644
--- a/source/blender/blenkernel/intern/writeavi.c
+++ b/source/blender/blenkernel/intern/writeavi.c
@@ -1,7 +1,4 @@
/*
- * Functions for writing avi-format files.
- * Added interface for generic movie support (ton)
- *
* $Id$
*
* ***** BEGIN GPL LICENSE BLOCK *****
@@ -28,7 +25,9 @@
* Contributor(s): Robert Wenzlaff
*
* ***** END GPL LICENSE BLOCK *****
- *
+ *
+ * Functions for writing avi-format files.
+ * Added interface for generic movie support (ton)
*/
/** \file blender/blenkernel/intern/writeavi.c
diff --git a/source/blender/blenkernel/intern/writeffmpeg.c b/source/blender/blenkernel/intern/writeffmpeg.c
index 425af0272a3..58a2f45e876 100644
--- a/source/blender/blenkernel/intern/writeffmpeg.c
+++ b/source/blender/blenkernel/intern/writeffmpeg.c
@@ -1,6 +1,3 @@
-/** \file blender/blenkernel/intern/writeffmpeg.c
- * \ingroup bke
- */
/*
* $Id$
*
@@ -20,6 +17,10 @@
*
*/
+/** \file blender/blenkernel/intern/writeffmpeg.c
+ * \ingroup bke
+ */
+
#ifdef WITH_FFMPEG
#include <string.h>
#include <stdio.h>
diff --git a/source/blender/blenkernel/intern/writeframeserver.c b/source/blender/blenkernel/intern/writeframeserver.c
index 15cb3b66db7..d42b952617f 100644
--- a/source/blender/blenkernel/intern/writeframeserver.c
+++ b/source/blender/blenkernel/intern/writeframeserver.c
@@ -1,6 +1,3 @@
-/** \file blender/blenkernel/intern/writeframeserver.c
- * \ingroup bke
- */
/*
* $Id$
*
@@ -22,6 +19,10 @@
*
*/
+/** \file blender/blenkernel/intern/writeframeserver.c
+ * \ingroup bke
+ */
+
#ifdef WITH_FRAMESERVER
#include <string.h>
diff --git a/source/blender/blenlib/intern/path_util.c b/source/blender/blenlib/intern/path_util.c
index 807a42e82d7..1c71f1e1f27 100644
--- a/source/blender/blenlib/intern/path_util.c
+++ b/source/blender/blenlib/intern/path_util.c
@@ -1431,21 +1431,40 @@ void BLI_split_dirfile(const char *string, char *dir, char *file)
}
/* simple appending of filename to dir, does not check for valid path! */
-void BLI_join_dirfile(char *string, const size_t maxlen, const char *dir, const char *file)
+void BLI_join_dirfile(char *dst, const size_t maxlen, const char *dir, const char *file)
{
- int sl_dir;
-
- if(string != dir) /* compare pointers */
- BLI_strncpy(string, dir, maxlen);
+ size_t dirlen= BLI_strnlen(dir, maxlen);
+
+ if (dst != dir) {
+ if(dirlen == maxlen) {
+ memcpy(dst, dir, dirlen);
+ dst[dirlen - 1]= '\0';
+ return; /* dir fills the path */
+ }
+ else {
+ memcpy(dst, dir, dirlen + 1);
+ }
+ }
+
+ if (dirlen + 1 >= maxlen) {
+ return; /* fills the path */
+ }
+
+ /* inline BLI_add_slash */
+ if (dst[dirlen - 1] != SEP) {
+ dst[dirlen++]= SEP;
+ dst[dirlen ]= '\0';
+ }
+
+ if (dirlen >= maxlen) {
+ return; /* fills the path */
+ }
- if (!file)
+ if (file == NULL) {
return;
-
- sl_dir= BLI_add_slash(string);
-
- if (sl_dir <FILE_MAX) {
- BLI_strncpy(string + sl_dir, file, maxlen - sl_dir);
}
+
+ BLI_strncpy(dst + dirlen, file, maxlen - dirlen);
}
/* like pythons os.path.basename( ) */
@@ -1585,19 +1604,11 @@ char *BLI_last_slash(const char *string)
int BLI_add_slash(char *string)
{
int len = strlen(string);
-#ifdef WIN32
- if (len==0 || string[len-1]!='\\') {
- string[len] = '\\';
- string[len+1] = '\0';
- return len+1;
- }
-#else
- if (len==0 || string[len-1]!='/') {
- string[len] = '/';
+ if (len==0 || string[len-1] != SEP) {
+ string[len] = SEP;
string[len+1] = '\0';
return len+1;
}
-#endif
return len;
}
@@ -1606,11 +1617,7 @@ void BLI_del_slash(char *string)
{
int len = strlen(string);
while (len) {
-#ifdef WIN32
- if (string[len-1]=='\\') {
-#else
- if (string[len-1]=='/') {
-#endif
+ if (string[len-1] == SEP) {
string[len-1] = '\0';
len--;
} else {
diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c
index 91b17d783ab..4eca9401d53 100644
--- a/source/blender/blenloader/intern/readfile.c
+++ b/source/blender/blenloader/intern/readfile.c
@@ -12189,12 +12189,14 @@ static void do_versions(FileData *fd, Library *lib, Main *main)
if(mtex) {
if((mtex->texflag&MTEX_BUMP_FLIPPED)==0) {
- if((mtex->mapto&MAP_NORM) && mtex->texflag&(MTEX_COMPAT_BUMP|MTEX_3TAP_BUMP|MTEX_5TAP_BUMP)) {
- Tex *tex= newlibadr(fd, lib, mtex->tex);
+ if((mtex->mapto&MAP_DISPLACE)==0) {
+ if((mtex->mapto&MAP_NORM) && mtex->texflag&(MTEX_COMPAT_BUMP|MTEX_3TAP_BUMP|MTEX_5TAP_BUMP)) {
+ Tex *tex= newlibadr(fd, lib, mtex->tex);
- if(!tex || (tex->imaflag&TEX_NORMALMAP)==0) {
- mtex->norfac= -mtex->norfac;
- mtex->texflag|= MTEX_BUMP_FLIPPED;
+ if(!tex || (tex->imaflag&TEX_NORMALMAP)==0) {
+ mtex->norfac= -mtex->norfac;
+ mtex->texflag|= MTEX_BUMP_FLIPPED;
+ }
}
}
}
diff --git a/source/blender/editors/animation/keyframing.c b/source/blender/editors/animation/keyframing.c
index b52550832c3..fb34245d338 100644
--- a/source/blender/editors/animation/keyframing.c
+++ b/source/blender/editors/animation/keyframing.c
@@ -1748,3 +1748,56 @@ short id_frame_has_keyframe (ID *id, float frame, short filter)
}
/* ************************************************** */
+
+int ED_autokeyframe_object(bContext *C, Scene *scene, Object *ob, KeyingSet *ks)
+{
+ /* auto keyframing */
+ if (autokeyframe_cfra_can_key(scene, &ob->id)) {
+ ListBase dsources = {NULL, NULL};
+
+ /* now insert the keyframe(s) using the Keying Set
+ * 1) add datasource override for the Object
+ * 2) insert keyframes
+ * 3) free the extra info
+ */
+ ANIM_relative_keyingset_add_source(&dsources, &ob->id, NULL, NULL);
+ ANIM_apply_keyingset(C, &dsources, NULL, ks, MODIFYKEY_MODE_INSERT, (float)CFRA);
+ BLI_freelistN(&dsources);
+
+ return TRUE;
+ }
+ else {
+ return FALSE;
+ }
+}
+
+int ED_autokeyframe_pchan(bContext *C, Scene *scene, Object *ob, bPoseChannel *pchan, KeyingSet *ks)
+{
+ if (autokeyframe_cfra_can_key(scene, &ob->id)) {
+ ListBase dsources = {NULL, NULL};
+
+ /* now insert the keyframe(s) using the Keying Set
+ * 1) add datasource override for the PoseChannel
+ * 2) insert keyframes
+ * 3) free the extra info
+ */
+ ANIM_relative_keyingset_add_source(&dsources, &ob->id, &RNA_PoseBone, pchan);
+ ANIM_apply_keyingset(C, &dsources, NULL, ks, MODIFYKEY_MODE_INSERT, (float)CFRA);
+ BLI_freelistN(&dsources);
+
+ /* clear any unkeyed tags */
+ if (pchan->bone) {
+ pchan->bone->flag &= ~BONE_UNKEYED;
+ }
+
+ return TRUE;
+ }
+ else {
+ /* add unkeyed tags */
+ if (pchan->bone) {
+ pchan->bone->flag |= BONE_UNKEYED;
+ }
+
+ return FALSE;
+ }
+}
diff --git a/source/blender/editors/armature/poseobject.c b/source/blender/editors/armature/poseobject.c
index 43122ea08d3..61935aa72ca 100644
--- a/source/blender/editors/armature/poseobject.c
+++ b/source/blender/editors/armature/poseobject.c
@@ -1149,7 +1149,10 @@ static int pose_paste_exec (bContext *C, wmOperator *op)
bPoseChannel *chan;
int flip= RNA_boolean_get(op->ptr, "flipped");
int selOnly= RNA_boolean_get(op->ptr, "selected_mask");
-
+
+ /* get KeyingSet to use */
+ KeyingSet *ks = ANIM_get_keyingset_for_autokeying(scene, "LocRotScale");
+
/* sanity checks */
if ELEM(NULL, ob, ob->pose)
return OPERATOR_CANCELLED;
@@ -1166,7 +1169,7 @@ static int pose_paste_exec (bContext *C, wmOperator *op)
if (CTX_DATA_COUNT(C, selected_pose_bones) == 0)
selOnly = 0;
}
-
+
/* Safely merge all of the channels in the buffer pose into any existing pose */
for (chan= g_posebuf->chanbase.first; chan; chan=chan->next) {
if (chan->flag & POSE_KEY) {
@@ -1175,30 +1178,7 @@ static int pose_paste_exec (bContext *C, wmOperator *op)
if (pchan) {
/* keyframing tagging for successful paste */
- if (autokeyframe_cfra_can_key(scene, &ob->id)) {
- ListBase dsources = {NULL, NULL};
-
- /* get KeyingSet to use */
- KeyingSet *ks = ANIM_get_keyingset_for_autokeying(scene, "LocRotScale");
-
- /* now insert the keyframe(s) using the Keying Set
- * 1) add datasource override for the PoseChannel
- * 2) insert keyframes
- * 3) free the extra info
- */
- ANIM_relative_keyingset_add_source(&dsources, &ob->id, &RNA_PoseBone, pchan);
- ANIM_apply_keyingset(C, &dsources, NULL, ks, MODIFYKEY_MODE_INSERT, (float)CFRA);
- BLI_freelistN(&dsources);
-
- /* clear any unkeyed tags */
- if (chan->bone)
- chan->bone->flag &= ~BONE_UNKEYED;
- }
- else {
- /* add unkeyed tags */
- if (chan->bone)
- chan->bone->flag |= BONE_UNKEYED;
- }
+ ED_autokeyframe_pchan(C, scene, ob, pchan, ks);
}
}
}
@@ -2194,29 +2174,8 @@ static int pose_flip_quats_exec (bContext *C, wmOperator *UNUSED(op))
if (pchan->rotmode == ROT_MODE_QUAT) {
/* quaternions have 720 degree range */
negate_v4(pchan->quat);
-
- /* tagging */
- if (autokeyframe_cfra_can_key(scene, &ob->id)) {
- ListBase dsources = {NULL, NULL};
-
- /* now insert the keyframe(s) using the Keying Set
- * 1) add datasource override for the PoseChannel
- * 2) insert keyframes
- * 3) free the extra info
- */
- ANIM_relative_keyingset_add_source(&dsources, &ob->id, &RNA_PoseBone, pchan);
- ANIM_apply_keyingset(C, &dsources, NULL, ks, MODIFYKEY_MODE_INSERT, (float)CFRA);
- BLI_freelistN(&dsources);
-
- /* clear any unkeyed tags */
- if (pchan->bone)
- pchan->bone->flag &= ~BONE_UNKEYED;
- }
- else {
- /* add unkeyed tags */
- if (pchan->bone)
- pchan->bone->flag |= BONE_UNKEYED;
- }
+
+ ED_autokeyframe_pchan(C, scene, ob, pchan, ks);
}
}
CTX_DATA_END;
diff --git a/source/blender/editors/curve/editfont.c b/source/blender/editors/curve/editfont.c
index b617565dba3..ffb544d5570 100644
--- a/source/blender/editors/curve/editfont.c
+++ b/source/blender/editors/curve/editfont.c
@@ -264,9 +264,16 @@ static void text_update_edited(bContext *C, Scene *scene, Object *obedit, int re
EditFont *ef= cu->editfont;
cu->curinfo = ef->textbufinfo[cu->pos?cu->pos-1:0];
- if(obedit->totcol>0)
+ if(obedit->totcol > 0) {
obedit->actcol= ef->textbufinfo[cu->pos?cu->pos-1:0].mat_nr;
+ /* since this array is calloc'd, it can be 0 even though we try ensure
+ * (mat_nr > 0) almost everywhere */
+ if (obedit->actcol < 1) {
+ obedit->actcol= 1;
+ }
+ }
+
if(mode == FO_EDIT)
update_string(cu);
@@ -1700,10 +1707,7 @@ static int open_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(event))
}
path = (font && strcmp(font->name, FO_BUILTIN_NAME) != 0)? font->name: U.fontdir;
-
- if(!RNA_property_is_set(op->ptr, "relative_path"))
- RNA_boolean_set(op->ptr, "relative_path", U.flag & USER_RELPATHS);
-
+
if(RNA_property_is_set(op->ptr, "filepath"))
return open_exec(C, op);
diff --git a/source/blender/editors/gpencil/drawgpencil.c b/source/blender/editors/gpencil/drawgpencil.c
index cfa9585868e..b87166c51ca 100644
--- a/source/blender/editors/gpencil/drawgpencil.c
+++ b/source/blender/editors/gpencil/drawgpencil.c
@@ -114,12 +114,14 @@ static void gp_draw_stroke_buffer (tGPspoint *points, int totpoints, short thick
/* don't draw stroke at all! */
}
else {
- float oldpressure = 0.0f;
+ float oldpressure = points[0].pressure;
/* draw stroke curve */
if (G.f & G_DEBUG) setlinestyle(2);
-
+
+ glLineWidth(oldpressure * thickness);
glBegin(GL_LINE_STRIP);
+
for (i=0, pt=points; i < totpoints && pt; i++, pt++) {
/* if there was a significant pressure change, stop the curve, change the thickness of the stroke,
* and continue drawing again (since line-width cannot change in middle of GL_LINE_STRIP)
@@ -144,6 +146,9 @@ static void gp_draw_stroke_buffer (tGPspoint *points, int totpoints, short thick
glVertex2f(pt->x, pt->y);
}
glEnd();
+
+ /* reset for pradictable OpenGL context */
+ glLineWidth(1.0f);
if (G.f & G_DEBUG) setlinestyle(0);
}
diff --git a/source/blender/editors/include/ED_keyframing.h b/source/blender/editors/include/ED_keyframing.h
index cda3c4f3e71..8dd543d8f63 100644
--- a/source/blender/editors/include/ED_keyframing.h
+++ b/source/blender/editors/include/ED_keyframing.h
@@ -313,6 +313,11 @@ typedef enum eAnimFilterFlags {
ANIMFILTER_KEYS_NOSKEY = (1<<10), /* don't include shape keys (for geometry) */
} eAnimFilterFlags;
+/* utility funcs for auto keyframe */
+int ED_autokeyframe_object(struct bContext *C, struct Scene *scene, struct Object *ob, struct KeyingSet *ks);
+int ED_autokeyframe_pchan(struct bContext *C, struct Scene *scene, struct Object *ob, struct bPoseChannel *pchan, struct KeyingSet *ks);
+
+
#ifdef __cplusplus
}
#endif
diff --git a/source/blender/editors/interface/interface_handlers.c b/source/blender/editors/interface/interface_handlers.c
index 6417a6b58dd..9af9b2f55ad 100644
--- a/source/blender/editors/interface/interface_handlers.c
+++ b/source/blender/editors/interface/interface_handlers.c
@@ -4429,7 +4429,7 @@ static int ui_do_button(bContext *C, uiBlock *block, uiBut *but, wmEvent *event)
/* check prevval because of modal operators [#24016],
* modifier check is to allow Ctrl+C for copy.
* if this causes other problems, remove this check and suffer the bug :) - campbell */
- (event->prevval != KM_PRESS || ISKEYMODIFIER(event->prevtype))
+ ((event->prevval != KM_PRESS) || (ISKEYMODIFIER(event->prevtype)) || (event->type == EVT_DROP))
) {
/* handle copy-paste */
if(ELEM(event->type, CKEY, VKEY) && event->val==KM_PRESS && (event->ctrl || event->oskey)) {
diff --git a/source/blender/editors/mesh/mesh_intern.h b/source/blender/editors/mesh/mesh_intern.h
index a02335ae427..ffa3940849f 100644
--- a/source/blender/editors/mesh/mesh_intern.h
+++ b/source/blender/editors/mesh/mesh_intern.h
@@ -316,5 +316,12 @@ void MESH_OT_bevel(struct wmOperatorType *ot);
void MESH_OT_bridge_edge_loops(struct wmOperatorType *ot);
+/* ******************* mesh_navmesh.c */
+void MESH_OT_navmesh_make(struct wmOperatorType *ot);
+void MESH_OT_navmesh_face_copy(struct wmOperatorType *ot);
+void MESH_OT_navmesh_face_add(struct wmOperatorType *ot);
+void MESH_OT_navmesh_reset(struct wmOperatorType *ot);
+void MESH_OT_navmesh_clear(struct wmOperatorType *ot);
+
#endif // MESH_INTERN_H
diff --git a/source/blender/editors/mesh/mesh_navmesh.c b/source/blender/editors/mesh/mesh_navmesh.c
index f427b51570b..b8ace26991e 100644
--- a/source/blender/editors/mesh/mesh_navmesh.c
+++ b/source/blender/editors/mesh/mesh_navmesh.c
@@ -47,6 +47,7 @@
#include "BKE_scene.h"
#include "BKE_DerivedMesh.h"
#include "BKE_cdderivedmesh.h"
+#include "BKE_report.h"
#include "BLI_editVert.h"
#include "BLI_listbase.h"
@@ -423,44 +424,57 @@ static Object* createRepresentation(bContext *C, struct recast_polyMesh *pmesh,
return obedit;
}
-static int create_navmesh_exec(bContext *C, wmOperator *UNUSED(op))
+static int create_navmesh_exec(bContext *C, wmOperator *op)
{
Scene* scene= CTX_data_scene(C);
- int nverts= 0, ntris= 0;
- float *verts= NULL;
- int *tris= 0;
- struct recast_polyMesh *pmesh= NULL;
- struct recast_polyMeshDetail *dmesh= NULL;
LinkNode* obs= NULL;
Base* navmeshBase= NULL;
CTX_DATA_BEGIN(C, Base*, base, selected_editable_bases) {
- if(base->object->body_type==OB_BODY_TYPE_NAVMESH) {
- if(!navmeshBase || base==CTX_data_active_base(C))
- navmeshBase= base;
+ if (base->object->type == OB_MESH) {
+ if (base->object->body_type==OB_BODY_TYPE_NAVMESH) {
+ if (!navmeshBase || base == scene->basact) {
+ navmeshBase= base;
+ }
+ }
+ else {
+ BLI_linklist_append(&obs, (void*)base->object);
+ }
}
- else
- BLI_linklist_append(&obs, (void*)base->object);
}
CTX_DATA_END;
- createVertsTrisData(C, obs, &nverts, &verts, &ntris, &tris);
- BLI_linklist_free(obs, NULL);
- buildNavMesh(&scene->gm.recastData, nverts, verts, ntris, tris, &pmesh, &dmesh);
- createRepresentation(C, pmesh, dmesh, navmeshBase);
+ if (obs) {
+ struct recast_polyMesh *pmesh= NULL;
+ struct recast_polyMeshDetail *dmesh= NULL;
- MEM_freeN(verts);
- MEM_freeN(tris);
+ int nverts= 0, ntris= 0;
+ int *tris= 0;
+ float *verts= NULL;
- return OPERATOR_FINISHED;
+ createVertsTrisData(C, obs, &nverts, &verts, &ntris, &tris);
+ BLI_linklist_free(obs, NULL);
+ buildNavMesh(&scene->gm.recastData, nverts, verts, ntris, tris, &pmesh, &dmesh);
+ createRepresentation(C, pmesh, dmesh, navmeshBase);
+
+ MEM_freeN(verts);
+ MEM_freeN(tris);
+
+ return OPERATOR_FINISHED;
+ }
+ else {
+ BKE_report(op->reports, RPT_ERROR, "No mesh objects found");
+
+ return OPERATOR_CANCELLED;
+ }
}
-void MESH_OT_create_navmesh(wmOperatorType *ot)
+void MESH_OT_navmesh_make(wmOperatorType *ot)
{
/* identifiers */
ot->name= "Create navigation mesh";
ot->description= "Create navigation mesh for selected objects";
- ot->idname= "MESH_OT_create_navmesh";
+ ot->idname= "MESH_OT_navmesh_make";
/* api callbacks */
ot->exec= create_navmesh_exec;
@@ -469,35 +483,35 @@ void MESH_OT_create_navmesh(wmOperatorType *ot)
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
}
-static int assign_navpolygon_exec(bContext *C, wmOperator *UNUSED(op))
+static int navmesh_face_copy_exec(bContext *C, wmOperator *op)
{
Object *obedit= CTX_data_edit_object(C);
EditMesh *em= BKE_mesh_get_editmesh((Mesh *)obedit->data);
/* do work here */
- int targetPolyIdx= -1;
- EditFace *ef, *efa;
- efa= EM_get_actFace(em, 0);
+ EditFace *efa_act= EM_get_actFace(em, 0);
- if(efa) {
+ if(efa_act) {
if(CustomData_has_layer(&em->fdata, CD_RECAST)) {
- targetPolyIdx= *(int*)CustomData_em_get(&em->fdata, efa->data, CD_RECAST);
+ EditFace *efa;
+ int targetPolyIdx= *(int*)CustomData_em_get(&em->fdata, efa_act->data, CD_RECAST);
targetPolyIdx= targetPolyIdx>=0? targetPolyIdx : -targetPolyIdx;
- if(targetPolyIdx>0) {
+ if(targetPolyIdx > 0) {
/* set target poly idx to other selected faces */
- ef= (EditFace*)em->faces.last;
- while(ef) {
- if((ef->f & SELECT )&& ef!=efa) {
- int* recastDataBlock= (int*)CustomData_em_get(&em->fdata, ef->data, CD_RECAST);
+ for (efa= (EditFace *)em->faces.first; efa; efa= efa->next) {
+ if((efa->f & SELECT) && efa != efa_act) {
+ int* recastDataBlock= (int*)CustomData_em_get(&em->fdata, efa->data, CD_RECAST);
*recastDataBlock= targetPolyIdx;
}
- ef= ef->prev;
}
}
- }
+ else {
+ BKE_report(op->reports, RPT_ERROR, "Active face has no index set");
+ }
+ }
}
-
+
DAG_id_tag_update((ID*)obedit->data, OB_RECALC_DATA);
WM_event_add_notifier(C, NC_GEOM|ND_DATA, obedit->data);
@@ -506,16 +520,16 @@ static int assign_navpolygon_exec(bContext *C, wmOperator *UNUSED(op))
return OPERATOR_FINISHED;
}
-void MESH_OT_assign_navpolygon(struct wmOperatorType *ot)
+void MESH_OT_navmesh_face_copy(struct wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Assign polygon index";
- ot->description= "Assign polygon index to face by active face";
- ot->idname= "MESH_OT_assign_navpolygon";
+ ot->name= "NavMesh Copy Face Index";
+ ot->description= "Copy the index from the active face";
+ ot->idname= "MESH_OT_navmesh_face_copy";
/* api callbacks */
ot->poll= ED_operator_editmesh;
- ot->exec= assign_navpolygon_exec;
+ ot->exec= navmesh_face_copy_exec;
/* flags */
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
@@ -556,7 +570,7 @@ static int findFreeNavPolyIndex(EditMesh* em)
return freeIdx;
}
-static int assign_new_navpolygon_exec(bContext *C, wmOperator *UNUSED(op))
+static int navmesh_face_add_exec(bContext *C, wmOperator *UNUSED(op))
{
Object *obedit= CTX_data_edit_object(C);
EditMesh *em= BKE_mesh_get_editmesh((Mesh *)obedit->data);
@@ -585,16 +599,93 @@ static int assign_new_navpolygon_exec(bContext *C, wmOperator *UNUSED(op))
return OPERATOR_FINISHED;
}
-void MESH_OT_assign_new_navpolygon(struct wmOperatorType *ot)
+void MESH_OT_navmesh_face_add(struct wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Assign new polygon index";
- ot->description= "Assign new polygon index to face";
- ot->idname= "MESH_OT_assign_new_navpolygon";
+ ot->name= "NavMesh New Face Index";
+ ot->description= "Add a new index and assign it to selected faces";
+ ot->idname= "MESH_OT_navmesh_face_add";
/* api callbacks */
ot->poll= ED_operator_editmesh;
- ot->exec= assign_new_navpolygon_exec;
+ ot->exec= navmesh_face_add_exec;
+
+ /* flags */
+ ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+}
+
+static int navmesh_obmode_data_poll(bContext *C)
+{
+ Object *ob = ED_object_active_context(C);
+ if (ob && (ob->mode == OB_MODE_OBJECT) && (ob->type == OB_MESH)) {
+ Mesh *me= ob->data;
+ return CustomData_has_layer(&me->fdata, CD_RECAST);
+ }
+ return FALSE;
+}
+
+static int navmesh_obmode_poll(bContext *C)
+{
+ Object *ob = ED_object_active_context(C);
+ if (ob && (ob->mode == OB_MODE_OBJECT) && (ob->type == OB_MESH)) {
+ return TRUE;
+ }
+ return FALSE;
+}
+
+static int navmesh_reset_exec(bContext *C, wmOperator *UNUSED(op))
+{
+ Object *ob = ED_object_active_context(C);
+ Mesh *me= ob->data;
+
+ CustomData_free_layers(&me->fdata, CD_RECAST, me->totface);
+
+ BKE_mesh_ensure_navmesh(me);
+
+ DAG_id_tag_update(&me->id, OB_RECALC_DATA);
+ WM_event_add_notifier(C, NC_GEOM|ND_DATA, &me->id);
+
+ return OPERATOR_FINISHED;
+}
+
+void MESH_OT_navmesh_reset(struct wmOperatorType *ot)
+{
+ /* identifiers */
+ ot->name= "NavMesh Reset Index Values";
+ ot->description= "Assign a new index to every face";
+ ot->idname= "MESH_OT_navmesh_reset";
+
+ /* api callbacks */
+ ot->poll= navmesh_obmode_poll;
+ ot->exec= navmesh_reset_exec;
+
+ /* flags */
+ ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+}
+
+static int navmesh_clear_exec(bContext *C, wmOperator *UNUSED(op))
+{
+ Object *ob = ED_object_active_context(C);
+ Mesh *me= ob->data;
+
+ CustomData_free_layers(&me->fdata, CD_RECAST, me->totface);
+
+ DAG_id_tag_update(&me->id, OB_RECALC_DATA);
+ WM_event_add_notifier(C, NC_GEOM|ND_DATA, &me->id);
+
+ return OPERATOR_FINISHED;
+}
+
+void MESH_OT_navmesh_clear(struct wmOperatorType *ot)
+{
+ /* identifiers */
+ ot->name= "NavMesh Clear Data";
+ ot->description= "Remove navmesh data from this mesh";
+ ot->idname= "MESH_OT_navmesh_clear";
+
+ /* api callbacks */
+ ot->poll= navmesh_obmode_data_poll;
+ ot->exec= navmesh_clear_exec;
/* flags */
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
diff --git a/source/blender/editors/mesh/mesh_ops.c b/source/blender/editors/mesh/mesh_ops.c
index db52df611b0..617e011e4c9 100644
--- a/source/blender/editors/mesh/mesh_ops.c
+++ b/source/blender/editors/mesh/mesh_ops.c
@@ -164,9 +164,11 @@ void ED_operatortypes_mesh(void)
WM_operatortype_append(MESH_OT_bridge_edge_loops);
#ifdef WITH_GAMEENGINE
- WM_operatortype_append(MESH_OT_create_navmesh);
- WM_operatortype_append(MESH_OT_assign_navpolygon);
- WM_operatortype_append(MESH_OT_assign_new_navpolygon);
+ WM_operatortype_append(MESH_OT_navmesh_make);
+ WM_operatortype_append(MESH_OT_navmesh_face_copy);
+ WM_operatortype_append(MESH_OT_navmesh_face_add);
+ WM_operatortype_append(MESH_OT_navmesh_reset);
+ WM_operatortype_append(MESH_OT_navmesh_clear);
#endif
}
diff --git a/source/blender/editors/object/object_modifier.c b/source/blender/editors/object/object_modifier.c
index aefbf33e948..57d70dc85c0 100644
--- a/source/blender/editors/object/object_modifier.c
+++ b/source/blender/editors/object/object_modifier.c
@@ -1235,9 +1235,6 @@ static int multires_external_save_invoke(bContext *C, wmOperator *op, wmEvent *U
if(CustomData_external_test(&me->ldata, CD_MDISPS))
return OPERATOR_CANCELLED;
- if(!RNA_property_is_set(op->ptr, "relative_path"))
- RNA_boolean_set(op->ptr, "relative_path", U.flag & USER_RELPATHS);
-
if(RNA_property_is_set(op->ptr, "filepath"))
return multires_external_save_exec(C, op);
diff --git a/source/blender/editors/object/object_transform.c b/source/blender/editors/object/object_transform.c
index 235eb5db597..c86cacc960d 100644
--- a/source/blender/editors/object/object_transform.c
+++ b/source/blender/editors/object/object_transform.c
@@ -231,21 +231,9 @@ static int object_clear_transform_generic_exec(bContext *C, wmOperator *op,
if (!(ob->mode & OB_MODE_WEIGHT_PAINT)) {
/* run provided clearing function */
clear_func(ob);
-
- /* auto keyframing */
- if (autokeyframe_cfra_can_key(scene, &ob->id)) {
- ListBase dsources = {NULL, NULL};
-
- /* now insert the keyframe(s) using the Keying Set
- * 1) add datasource override for the Object
- * 2) insert keyframes
- * 3) free the extra info
- */
- ANIM_relative_keyingset_add_source(&dsources, &ob->id, NULL, NULL);
- ANIM_apply_keyingset(C, &dsources, NULL, ks, MODIFYKEY_MODE_INSERT, (float)CFRA);
- BLI_freelistN(&dsources);
- }
-
+
+ ED_autokeyframe_object(C, scene, ob, ks);
+
/* tag for updates */
DAG_id_tag_update(&ob->id, OB_RECALC_OB);
}
diff --git a/source/blender/editors/render/render_shading.c b/source/blender/editors/render/render_shading.c
index 6422aa831fe..72506e86e2e 100644
--- a/source/blender/editors/render/render_shading.c
+++ b/source/blender/editors/render/render_shading.c
@@ -712,9 +712,6 @@ static int envmap_save_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(event
{
//Scene *scene= CTX_data_scene(C);
- if(!RNA_property_is_set(op->ptr, "relative_path"))
- RNA_boolean_set(op->ptr, "relative_path", U.flag & USER_RELPATHS);
-
if(RNA_property_is_set(op->ptr, "filepath"))
return envmap_save_exec(C, op);
diff --git a/source/blender/editors/sound/sound_ops.c b/source/blender/editors/sound/sound_ops.c
index d03c2b19300..50dda49bead 100644
--- a/source/blender/editors/sound/sound_ops.c
+++ b/source/blender/editors/sound/sound_ops.c
@@ -164,9 +164,6 @@ static int open_exec(bContext *UNUSED(C), wmOperator *op)
static int open_invoke(bContext *C, wmOperator *op, wmEvent *event)
{
- if(!RNA_property_is_set(op->ptr, "relative_path"))
- RNA_boolean_set(op->ptr, "relative_path", U.flag & USER_RELPATHS);
-
if(RNA_property_is_set(op->ptr, "filepath"))
return open_exec(C, op);
@@ -264,9 +261,6 @@ static int mixdown_exec(bContext *C, wmOperator *op)
static int mixdown_invoke(bContext *C, wmOperator *op, wmEvent *event)
{
- if(!RNA_property_is_set(op->ptr, "relative_path"))
- RNA_boolean_set(op->ptr, "relative_path", U.flag & USER_RELPATHS);
-
if(RNA_property_is_set(op->ptr, "filepath"))
return mixdown_exec(C, op);
diff --git a/source/blender/editors/space_buttons/buttons_ops.c b/source/blender/editors/space_buttons/buttons_ops.c
index 99e5c6d693e..75b3eb950a5 100644
--- a/source/blender/editors/space_buttons/buttons_ops.c
+++ b/source/blender/editors/space_buttons/buttons_ops.c
@@ -201,6 +201,8 @@ static int file_browse_invoke(bContext *C, wmOperator *op, wmEvent *event)
RNA_string_set(op->ptr, path_prop, str);
MEM_freeN(str);
+ /* normally ED_fileselect_get_params would handle this but we need to because of stupid
+ * user-prefs exception - campbell */
if(RNA_struct_find_property(op->ptr, "relative_path")) {
if(!RNA_property_is_set(op->ptr, "relative_path")) {
/* annoying exception!, if were dealign with the user prefs, default relative to be off */
diff --git a/source/blender/editors/space_file/filesel.c b/source/blender/editors/space_file/filesel.c
index e3571886cf4..6cc42b2a751 100644
--- a/source/blender/editors/space_file/filesel.c
+++ b/source/blender/editors/space_file/filesel.c
@@ -125,6 +125,7 @@ short ED_fileselect_set_params(SpaceFile *sfile)
const short is_filepath= (RNA_struct_find_property(op->ptr, "filepath") != NULL);
const short is_filename= (RNA_struct_find_property(op->ptr, "filename") != NULL);
const short is_directory= (RNA_struct_find_property(op->ptr, "directory") != NULL);
+ const short is_relative_path= (RNA_struct_find_property(op->ptr, "relative_path") != NULL);
BLI_strncpy(params->title, op->type->name, sizeof(params->title));
@@ -228,6 +229,11 @@ short ED_fileselect_set_params(SpaceFile *sfile)
params->display= FILE_SHORTDISPLAY;
}
+ if (is_relative_path) {
+ if (!RNA_property_is_set(op->ptr, "relative_path")) {
+ RNA_boolean_set(op->ptr, "relative_path", U.flag & USER_RELPATHS);
+ }
+ }
}
else {
/* default values, if no operator */
diff --git a/source/blender/editors/space_image/image_ops.c b/source/blender/editors/space_image/image_ops.c
index 33c3ae45a58..725b5f5c02d 100644
--- a/source/blender/editors/space_image/image_ops.c
+++ b/source/blender/editors/space_image/image_ops.c
@@ -843,10 +843,6 @@ static int open_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(event))
if(ima)
path= ima->name;
-
-
- if(!RNA_property_is_set(op->ptr, "relative_path"))
- RNA_boolean_set(op->ptr, "relative_path", U.flag & USER_RELPATHS);
if(RNA_property_is_set(op->ptr, "filepath"))
return open_exec(C, op);
@@ -1167,9 +1163,6 @@ static int save_as_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(event))
Scene *scene= CTX_data_scene(C);
SaveImageOptions simopts;
- if(!RNA_property_is_set(op->ptr, "relative_path"))
- RNA_boolean_set(op->ptr, "relative_path", U.flag & USER_RELPATHS);
-
if(RNA_property_is_set(op->ptr, "filepath"))
return save_as_exec(C, op);
diff --git a/source/blender/editors/space_info/space_info.c b/source/blender/editors/space_info/space_info.c
index 75e13b24ede..9157df6960f 100644
--- a/source/blender/editors/space_info/space_info.c
+++ b/source/blender/editors/space_info/space_info.c
@@ -290,7 +290,7 @@ static void recent_files_menu_register(void)
mt= MEM_callocN(sizeof(MenuType), "spacetype info menu recent files");
strcpy(mt->idname, "INFO_MT_file_open_recent");
- strcpy(mt->label, "Open Recent...");
+ strcpy(mt->label, _("Open Recent..."));
mt->draw= recent_files_menu_draw;
WM_menutype_add(mt);
}
diff --git a/source/blender/editors/space_sequencer/sequencer_add.c b/source/blender/editors/space_sequencer/sequencer_add.c
index b390b7dbdb5..1c4b0130897 100644
--- a/source/blender/editors/space_sequencer/sequencer_add.c
+++ b/source/blender/editors/space_sequencer/sequencer_add.c
@@ -380,9 +380,6 @@ static int sequencer_add_movie_strip_invoke(bContext *C, wmOperator *op, wmEvent
sequencer_generic_invoke_xy__internal(C, op, event, 0);
- if(!RNA_property_is_set(op->ptr, "relative_path"))
- RNA_boolean_set(op->ptr, "relative_path", U.flag & USER_RELPATHS);
-
WM_event_add_fileselect(C, op);
return OPERATOR_RUNNING_MODAL;
@@ -434,10 +431,7 @@ static int sequencer_add_sound_strip_invoke(bContext *C, wmOperator *op, wmEvent
}
sequencer_generic_invoke_xy__internal(C, op, event, 0);
-
- if(!RNA_property_is_set(op->ptr, "relative_path"))
- RNA_boolean_set(op->ptr, "relative_path", U.flag & USER_RELPATHS);
-
+
WM_event_add_fileselect(C, op);
return OPERATOR_RUNNING_MODAL;
@@ -543,9 +537,6 @@ static int sequencer_add_image_strip_invoke(bContext *C, wmOperator *op, wmEvent
}
sequencer_generic_invoke_xy__internal(C, op, event, SEQPROP_ENDFRAME);
-
- if(!RNA_property_is_set(op->ptr, "relative_path"))
- RNA_boolean_set(op->ptr, "relative_path", U.flag & USER_RELPATHS);
WM_event_add_fileselect(C, op);
return OPERATOR_RUNNING_MODAL;
@@ -721,10 +712,6 @@ static int sequencer_add_effect_strip_invoke(bContext *C, wmOperator *op, wmEven
sequencer_generic_invoke_xy__internal(C, op, event, prop_flag);
if (is_type_set && type==SEQ_PLUGIN) {
-
- if(!RNA_property_is_set(op->ptr, "relative_path"))
- RNA_boolean_set(op->ptr, "relative_path", U.flag & USER_RELPATHS);
-
/* only plugins need the file selector */
return WM_operator_filesel(C, op, event);
}
diff --git a/source/blender/editors/space_sequencer/sequencer_draw.c b/source/blender/editors/space_sequencer/sequencer_draw.c
index 0f5398f24a7..8f1ea6fe254 100644
--- a/source/blender/editors/space_sequencer/sequencer_draw.c
+++ b/source/blender/editors/space_sequencer/sequencer_draw.c
@@ -187,6 +187,9 @@ static void drawseqwave(Scene *scene, Sequence *seq, float x1, float y1, float x
if(!seq->sound->waveform)
sound_read_waveform(seq->sound);
+ if(!seq->sound->waveform)
+ return; /* zero length sound */
+
waveform = seq->sound->waveform;
startsample = floor((seq->startofs + seq->anim_startofs)/FPS * SOUND_WAVE_SAMPLES_PER_SECOND);
@@ -508,47 +511,48 @@ static void draw_seq_text(View2D *v2d, Sequence *seq, float x1, float x2, float
char str[32 + FILE_MAXDIR+FILE_MAXFILE];
const char *name= seq->name+2;
char col[4];
-
+
+ /* note, all strings should include 'name' */
if(name[0]=='\0')
name= give_seqname(seq);
if(seq->type == SEQ_META || seq->type == SEQ_ADJUSTMENT) {
- sprintf(str, "%d | %s", seq->len, name);
+ BLI_snprintf(str, sizeof(str), "%d | %s", seq->len, name);
}
else if(seq->type == SEQ_SCENE) {
if(seq->scene) {
if(seq->scene_camera) {
- sprintf(str, "%d | %s: %s (%s)", seq->len, name, seq->scene->id.name+2, ((ID *)seq->scene_camera)->name+2);
+ BLI_snprintf(str, sizeof(str), "%d | %s: %s (%s)", seq->len, name, seq->scene->id.name+2, ((ID *)seq->scene_camera)->name+2);
} else {
- sprintf(str, "%d | %s: %s", seq->len, name, seq->scene->id.name+2);
+ BLI_snprintf(str, sizeof(str), "%d | %s: %s", seq->len, name, seq->scene->id.name+2);
}
}
else {
- sprintf(str, "%d | %s", seq->len, name);
+ BLI_snprintf(str, sizeof(str), "%d | %s", seq->len, name);
}
}
else if(seq->type == SEQ_MULTICAM) {
- sprintf(str, "Cam: %d", seq->multicam_source);
+ BLI_snprintf(str, sizeof(str), "Cam | %s: %d", name, seq->multicam_source);
}
else if(seq->type == SEQ_IMAGE) {
- sprintf(str, "%d | %s%s", seq->len, seq->strip->dir, seq->strip->stripdata->name);
+ BLI_snprintf(str, sizeof(str), "%d | %s: %s%s", seq->len, name, seq->strip->dir, seq->strip->stripdata->name);
}
else if(seq->type & SEQ_EFFECT) {
int can_float = (seq->type != SEQ_PLUGIN)
|| (seq->plugin && seq->plugin->version >= 4);
if(seq->seq3!=seq->seq2 && seq->seq1!=seq->seq3)
- sprintf(str, "%d | %s: %d>%d (use %d)%s", seq->len, name, seq->seq1->machine, seq->seq2->machine, seq->seq3->machine, can_float ? "" : " No float, upgrade plugin!");
+ BLI_snprintf(str, sizeof(str), "%d | %s: %d>%d (use %d)%s", seq->len, name, seq->seq1->machine, seq->seq2->machine, seq->seq3->machine, can_float ? "" : " No float, upgrade plugin!");
else if (seq->seq1 && seq->seq2)
- sprintf(str, "%d | %s: %d>%d%s", seq->len, name, seq->seq1->machine, seq->seq2->machine, can_float ? "" : " No float, upgrade plugin!");
+ BLI_snprintf(str, sizeof(str), "%d | %s: %d>%d%s", seq->len, name, seq->seq1->machine, seq->seq2->machine, can_float ? "" : " No float, upgrade plugin!");
else
- sprintf(str, "%d | %s", seq->len, name);
+ BLI_snprintf(str, sizeof(str), "%d | %s", seq->len, name);
}
else if (seq->type == SEQ_SOUND) {
- sprintf(str, "%d | %s", seq->len, seq->sound->name);
+ BLI_snprintf(str, sizeof(str), "%d | %s: %s", seq->len, name, seq->sound->name);
}
else if (seq->type == SEQ_MOVIE) {
- sprintf(str, "%d | %s%s", seq->len, seq->strip->dir, seq->strip->stripdata->name);
+ BLI_snprintf(str, sizeof(str), "%d | %s: %s%s", seq->len, name, seq->strip->dir, seq->strip->stripdata->name);
}
if(seq->flag & SELECT){
diff --git a/source/blender/editors/space_sequencer/sequencer_edit.c b/source/blender/editors/space_sequencer/sequencer_edit.c
index bd93a1270f6..da785430d43 100644
--- a/source/blender/editors/space_sequencer/sequencer_edit.c
+++ b/source/blender/editors/space_sequencer/sequencer_edit.c
@@ -2961,9 +2961,11 @@ void SEQUENCER_OT_change_effect_type(struct wmOperatorType *ot)
static int sequencer_change_path_exec(bContext *C, wmOperator *op)
{
+ Main *bmain= CTX_data_main(C);
Scene *scene= CTX_data_scene(C);
Editing *ed= seq_give_editing(scene, FALSE);
Sequence *seq= seq_active_get(scene);
+ const int is_relative_path= RNA_boolean_get(op->ptr, "relative_path");
if(seq->type == SEQ_IMAGE) {
char directory[FILE_MAX];
@@ -2974,6 +2976,12 @@ static int sequencer_change_path_exec(bContext *C, wmOperator *op)
return OPERATOR_CANCELLED;
RNA_string_get(op->ptr, "directory", directory);
+ if (is_relative_path) {
+ /* TODO, shouldnt this already be relative from the filesel?
+ * (as the 'filepath' is) for now just make relative here,
+ * but look into changing after 2.60 - campbell */
+ BLI_path_rel(directory, bmain->name);
+ }
BLI_strncpy(seq->strip->dir, directory, sizeof(seq->strip->dir));
if(seq->strip->stripdata) {
diff --git a/source/blender/editors/space_view3d/view3d_snap.c b/source/blender/editors/space_view3d/view3d_snap.c
index a843c67849b..4db7f2085c9 100644
--- a/source/blender/editors/space_view3d/view3d_snap.c
+++ b/source/blender/editors/space_view3d/view3d_snap.c
@@ -67,6 +67,7 @@
#include "ED_armature.h"
#include "ED_mesh.h"
+#include "ED_keyframing.h"
#include "ED_screen.h"
#include "ED_curve.h" /* for curve_editnurbs */
@@ -545,6 +546,7 @@ static int snap_sel_to_grid(bContext *C, wmOperator *UNUSED(op))
}
else {
+ struct KeyingSet *ks = ANIM_get_keyingset_for_autokeying(scene, "Location");
CTX_DATA_BEGIN(C, Object*, ob, selected_editable_objects) {
if(ob->mode & OB_MODE_POSE) {
@@ -573,6 +575,9 @@ static int snap_sel_to_grid(bContext *C, wmOperator *UNUSED(op))
pchan->loc[0]= vecN[1];
if ((pchan->protectflag & OB_LOCK_LOCZ)==0)
pchan->loc[0]= vecN[2];
+
+ /* auto-keyframing */
+ ED_autokeyframe_pchan(C, scene, ob, pchan, ks);
}
/* if the bone has a parent and is connected to the parent,
* don't do anything - will break chain unless we do auto-ik.
@@ -582,8 +587,6 @@ static int snap_sel_to_grid(bContext *C, wmOperator *UNUSED(op))
}
ob->pose->flag |= (POSE_LOCKED|POSE_DO_UNLOCK);
- /* auto-keyframing */
-// XXX autokeyframe_pose_cb_func(ob, TFM_TRANSLATION, 0);
DAG_id_tag_update(&ob->id, OB_RECALC_DATA);
}
else {
@@ -607,7 +610,7 @@ static int snap_sel_to_grid(bContext *C, wmOperator *UNUSED(op))
ob->loc[2]+= vec[2];
/* auto-keyframing */
-// XXX autokeyframe_ob_cb_func(ob, TFM_TRANSLATION);
+ ED_autokeyframe_object(C, scene, ob, ks);
}
}
CTX_DATA_END;
@@ -673,6 +676,8 @@ static int snap_sel_to_curs(bContext *C, wmOperator *UNUSED(op))
}
else {
+ struct KeyingSet *ks = ANIM_get_keyingset_for_autokeying(scene, "Location");
+
CTX_DATA_BEGIN(C, Object*, ob, selected_editable_objects) {
if(ob->mode & OB_MODE_POSE) {
bPoseChannel *pchan;
@@ -699,6 +704,9 @@ static int snap_sel_to_curs(bContext *C, wmOperator *UNUSED(op))
pchan->loc[1]= curspn[1];
if ((pchan->protectflag & OB_LOCK_LOCZ)==0)
pchan->loc[2]= curspn[2];
+
+ /* auto-keyframing */
+ ED_autokeyframe_pchan(C, scene, ob, pchan, ks);
}
/* if the bone has a parent and is connected to the parent,
* don't do anything - will break chain unless we do auto-ik.
@@ -708,8 +716,6 @@ static int snap_sel_to_curs(bContext *C, wmOperator *UNUSED(op))
}
ob->pose->flag |= (POSE_LOCKED|POSE_DO_UNLOCK);
- /* auto-keyframing */
-// XXX autokeyframe_pose_cb_func(ob, TFM_TRANSLATION, 0);
DAG_id_tag_update(&ob->id, OB_RECALC_DATA);
}
else {
@@ -731,9 +737,9 @@ static int snap_sel_to_curs(bContext *C, wmOperator *UNUSED(op))
ob->loc[1]+= vec[1];
if ((ob->protectflag & OB_LOCK_LOCZ)==0)
ob->loc[2]+= vec[2];
-
+
/* auto-keyframing */
-// XXX autokeyframe_ob_cb_func(ob, TFM_TRANSLATION);
+ ED_autokeyframe_object(C, scene, ob, ks);
}
}
CTX_DATA_END;
diff --git a/source/blender/makesdna/DNA_modifier_types.h b/source/blender/makesdna/DNA_modifier_types.h
index 7bc81e7fe05..56bfc29fcc0 100644
--- a/source/blender/makesdna/DNA_modifier_types.h
+++ b/source/blender/makesdna/DNA_modifier_types.h
@@ -74,6 +74,7 @@ typedef enum ModifierType {
eModifierType_WeightVGEdit,
eModifierType_WeightVGMix,
eModifierType_WeightVGProximity,
+ eModifierType_EmptySlot, /* keep so DynamicPaint keep loading, can re-use later */
eModifierType_DynamicPaint, /* reserve slot */
/* BMESH ONLY - keeps getting bumped by new modifiers in trunk */
diff --git a/source/blender/makesrna/intern/rna_ID.c b/source/blender/makesrna/intern/rna_ID.c
index ddd0fcc1007..b366a23c19a 100644
--- a/source/blender/makesrna/intern/rna_ID.c
+++ b/source/blender/makesrna/intern/rna_ID.c
@@ -317,9 +317,15 @@ static int rna_IDPArray_length(PointerRNA *ptr)
int rna_IDMaterials_assign_int(PointerRNA *ptr, int key, const PointerRNA *assign_ptr)
{
ID *id= ptr->id.data;
+ short *totcol= give_totcolp_id(id);
Material *mat_id= assign_ptr->id.data;
- assign_material_id(id, mat_id, key + 1);
- return 1;
+ if(totcol && (key >= 0 && key < *totcol)) {
+ assign_material_id(id, mat_id, key + 1);
+ return 1;
+ }
+ else {
+ return 0;
+ }
}
#else
diff --git a/source/blender/makesrna/intern/rna_object.c b/source/blender/makesrna/intern/rna_object.c
index 58272fa7c5e..511dba7af44 100644
--- a/source/blender/makesrna/intern/rna_object.c
+++ b/source/blender/makesrna/intern/rna_object.c
@@ -947,6 +947,7 @@ static void rna_GameObjectSettings_physics_type_set(PointerRNA *ptr, int value)
if (was_navmesh != (ob->gameflag & OB_NAVMESH)) {
if (ob->type == OB_MESH) {
+ /* this is needed to refresh the derived meshes draw func */
DAG_id_tag_update(ptr->id.data, OB_RECALC_DATA);
WM_main_add_notifier(NC_OBJECT|ND_DRAW, ptr->id.data);
}
@@ -1425,8 +1426,7 @@ static void rna_def_object_game_settings(BlenderRNA *brna)
prop= RNA_def_property(srna, "physics_type", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "body_type");
RNA_def_property_enum_items(prop, body_type_items);
- RNA_def_property_enum_funcs(prop, "rna_GameObjectSettings_physics_type_get",
- "rna_GameObjectSettings_physics_type_set", NULL);
+ RNA_def_property_enum_funcs(prop, "rna_GameObjectSettings_physics_type_get", "rna_GameObjectSettings_physics_type_set", NULL);
RNA_def_property_ui_text(prop, "Physics Type", "Selects the type of physical representation");
RNA_def_property_update(prop, NC_LOGIC, NULL);
diff --git a/source/blender/makesrna/intern/rna_scene.c b/source/blender/makesrna/intern/rna_scene.c
index dbcfb8c333c..2cbe51d30e8 100644
--- a/source/blender/makesrna/intern/rna_scene.c
+++ b/source/blender/makesrna/intern/rna_scene.c
@@ -1741,13 +1741,13 @@ static void rna_def_scene_game_recast_data(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Agent Radius", "Radius of the agent");
RNA_def_property_update(prop, NC_SCENE, NULL);
- prop= RNA_def_property(srna, "max_climb", PROP_FLOAT, PROP_NONE);
+ prop= RNA_def_property(srna, "climb_max", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "agentmaxclimb");
RNA_def_property_ui_range(prop, 0.1, 5, 1, 2);
RNA_def_property_ui_text(prop, "Max Climb", "Maximum height between grid cells the agent can climb");
RNA_def_property_update(prop, NC_SCENE, NULL);
- prop= RNA_def_property(srna, "max_slope", PROP_FLOAT, PROP_ANGLE);
+ prop= RNA_def_property(srna, "slope_max", PROP_FLOAT, PROP_ANGLE);
RNA_def_property_float_sdna(prop, NULL, "agentmaxslope");
RNA_def_property_range(prop, 0, M_PI/2);
RNA_def_property_ui_text(prop, "Max Slope", "Maximum walkable slope angle in degrees");
diff --git a/source/blender/makesrna/intern/rna_sculpt_paint.c b/source/blender/makesrna/intern/rna_sculpt_paint.c
index b350956047c..28b96f3b08b 100644
--- a/source/blender/makesrna/intern/rna_sculpt_paint.c
+++ b/source/blender/makesrna/intern/rna_sculpt_paint.c
@@ -131,13 +131,23 @@ static EnumPropertyItem *rna_ParticleEdit_tool_itemf(bContext *C, PointerRNA *UN
{
Scene *scene= CTX_data_scene(C);
Object *ob= (scene->basact)? scene->basact->object: NULL;
+#if 0
PTCacheEdit *edit = PE_get_current(scene, ob);
-
- if(edit && edit->psys) {
- if(edit->psys->flag & PSYS_GLOBAL_HAIR)
+ ParticleSystem *psys= edit ? edit->psys : NULL;
+#else
+ /* use this rather than PE_get_current() - because the editing cache is
+ * dependant on the cache being updated which can happen after this UI
+ * draws causing a glitch [#28883] */
+ ParticleSystem *psys= psys_get_current(ob);
+#endif
+
+ if(psys) {
+ if(psys->flag & PSYS_GLOBAL_HAIR) {
return particle_edit_disconnected_hair_brush_items;
- else
+ }
+ else {
return particle_edit_hair_brush_items;
+ }
}
return particle_edit_cache_brush_items;
diff --git a/source/blender/makesrna/intern/rna_userdef.c b/source/blender/makesrna/intern/rna_userdef.c
index 5d2f24e8324..11157e67741 100644
--- a/source/blender/makesrna/intern/rna_userdef.c
+++ b/source/blender/makesrna/intern/rna_userdef.c
@@ -2532,11 +2532,14 @@ static void rna_def_userdef_system(BlenderRNA *brna)
{18, "UKRAINIAN", 0, N_("Ukrainian (Український)"), "uk_UA"},
{19, "POLISH", 0, N_("Polish (Polski)"), "pl_PL"},
{20, "ROMANIAN", 0, N_("Romanian (Român)"), "ro_RO"},
- {21, "ARABIC", 0, N_("Arabic (العربية)"), "ar_EG"},
+ /* using the utf8 flipped form of Arabic (العربية) */
+ {21, "ARABIC", 0, N_("Arabic (ﺔﻴﺑﺮﻌﻟﺍ)"), "ar_EG"},
{22, "BULGARIAN", 0, N_("Bulgarian (Български)"), "bg_BG"},
{23, "GREEK", 0, N_("Greek (Ελληνικά)"), "el_GR"},
{24, "KOREAN", 0, N_("Korean (한국 언어)"), "ko_KR"},
- /*{25, "Nepali", 0, N_("Nepali (नेपाली)"), "ne_NP"},*/
+ /*{25, "NEPALI", 0, N_("Nepali (नेपाली)"), "ne_NP"},*/
+ /* using the utf8 flipped form of Persian (فارسی) */
+ {26, "PERSIAN", 0, N_("Persian (ﺱﺭﺎﻓ)"), "fa_PE"},
{0, NULL, 0, NULL, NULL}};
srna= RNA_def_struct(brna, "UserPreferencesSystem", NULL);
@@ -2661,8 +2664,8 @@ static void rna_def_userdef_system(BlenderRNA *brna)
prop= RNA_def_property(srna, "use_vertex_buffer_objects", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_negative_sdna(prop, NULL, "gameflags", USER_DISABLE_VBO);
- RNA_def_property_ui_text(prop, "VBOs",
- "Use Vertex Buffer Objects (or Vertex Arrays, if unsupported) for viewport rendering");
+ RNA_def_property_ui_text(prop, "VBOs", "Use Vertex Buffer Objects (or Vertex Arrays, if unsupported) for viewport rendering");
+ RNA_def_property_update(prop, NC_WINDOW, NULL); /* this isnt essential but nice to check if VBO draws any differently */
prop= RNA_def_property(srna, "use_antialiasing", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_negative_sdna(prop, NULL, "gameflags", USER_DISABLE_AA);
diff --git a/source/blender/python/intern/bpy_rna.c b/source/blender/python/intern/bpy_rna.c
index cb68f9cf2dc..ba7e2d41e69 100644
--- a/source/blender/python/intern/bpy_rna.c
+++ b/source/blender/python/intern/bpy_rna.c
@@ -375,7 +375,7 @@ static int mathutils_rna_generic_check(BaseMathObject *bmo)
{
BPy_PropertyRNA *self= (BPy_PropertyRNA *)bmo->cb_user;
- PYRNA_PROP_CHECK_INT(self)
+ PYRNA_PROP_CHECK_INT(self);
return self->prop ? 0 : -1;
}
@@ -384,7 +384,7 @@ static int mathutils_rna_vector_get(BaseMathObject *bmo, int subtype)
{
BPy_PropertyRNA *self= (BPy_PropertyRNA *)bmo->cb_user;
- PYRNA_PROP_CHECK_INT(self)
+ PYRNA_PROP_CHECK_INT(self);
if(self->prop==NULL)
return -1;
@@ -406,7 +406,7 @@ static int mathutils_rna_vector_set(BaseMathObject *bmo, int subtype)
BPy_PropertyRNA *self= (BPy_PropertyRNA *)bmo->cb_user;
float min, max;
- PYRNA_PROP_CHECK_INT(self)
+ PYRNA_PROP_CHECK_INT(self);
if(self->prop==NULL)
return -1;
@@ -457,7 +457,7 @@ static int mathutils_rna_vector_get_index(BaseMathObject *bmo, int UNUSED(subtyp
{
BPy_PropertyRNA *self= (BPy_PropertyRNA *)bmo->cb_user;
- PYRNA_PROP_CHECK_INT(self)
+ PYRNA_PROP_CHECK_INT(self);
if(self->prop==NULL)
return -1;
@@ -470,7 +470,7 @@ static int mathutils_rna_vector_set_index(BaseMathObject *bmo, int UNUSED(subtyp
{
BPy_PropertyRNA *self= (BPy_PropertyRNA *)bmo->cb_user;
- PYRNA_PROP_CHECK_INT(self)
+ PYRNA_PROP_CHECK_INT(self);
if(self->prop==NULL)
return -1;
@@ -514,7 +514,7 @@ static int mathutils_rna_matrix_get(BaseMathObject *bmo, int UNUSED(subtype))
{
BPy_PropertyRNA *self= (BPy_PropertyRNA *)bmo->cb_user;
- PYRNA_PROP_CHECK_INT(self)
+ PYRNA_PROP_CHECK_INT(self);
if(self->prop==NULL)
return -1;
@@ -527,7 +527,7 @@ static int mathutils_rna_matrix_set(BaseMathObject *bmo, int UNUSED(subtype))
{
BPy_PropertyRNA *self= (BPy_PropertyRNA *)bmo->cb_user;
- PYRNA_PROP_CHECK_INT(self)
+ PYRNA_PROP_CHECK_INT(self);
if(self->prop==NULL)
return -1;
@@ -868,7 +868,7 @@ static PyObject *pyrna_prop_str(BPy_PropertyRNA *self)
char type_fmt[64]= "";
int type;
- PYRNA_PROP_CHECK_OBJ(self)
+ PYRNA_PROP_CHECK_OBJ(self);
type= RNA_property_type(self->prop);
@@ -931,7 +931,7 @@ static PyObject *pyrna_prop_repr(BPy_PropertyRNA *self)
PyObject *ret;
const char *path;
- PYRNA_PROP_CHECK_OBJ(self)
+ PYRNA_PROP_CHECK_OBJ(self);
if(id == NULL)
return pyrna_prop_str(self); /* fallback */
@@ -1810,7 +1810,7 @@ static int pyrna_py_to_prop(PointerRNA *ptr, PropertyRNA *prop, void *data, PyOb
static PyObject *pyrna_prop_array_to_py_index(BPy_PropertyArrayRNA *self, int index)
{
- PYRNA_PROP_CHECK_OBJ((BPy_PropertyRNA *)self)
+ PYRNA_PROP_CHECK_OBJ((BPy_PropertyRNA *)self);
return pyrna_py_from_array_index(self, &self->ptr, self->prop, index);
}
@@ -1889,7 +1889,7 @@ static int pyrna_py_to_prop_array_index(BPy_PropertyArrayRNA *self, int index, P
//---------------sequence-------------------------------------------
static Py_ssize_t pyrna_prop_array_length(BPy_PropertyArrayRNA *self)
{
- PYRNA_PROP_CHECK_INT((BPy_PropertyRNA *)self)
+ PYRNA_PROP_CHECK_INT((BPy_PropertyRNA *)self);
if (RNA_property_array_dimension(&self->ptr, self->prop, NULL) > 1)
return RNA_property_multi_array_length(&self->ptr, self->prop, self->arraydim);
@@ -1899,7 +1899,7 @@ static Py_ssize_t pyrna_prop_array_length(BPy_PropertyArrayRNA *self)
static Py_ssize_t pyrna_prop_collection_length(BPy_PropertyRNA *self)
{
- PYRNA_PROP_CHECK_INT(self)
+ PYRNA_PROP_CHECK_INT(self);
return RNA_property_collection_length(&self->ptr, self->prop);
}
@@ -1908,7 +1908,7 @@ static Py_ssize_t pyrna_prop_collection_length(BPy_PropertyRNA *self)
* of 1000's of items in a linked list for eg. */
static int pyrna_prop_array_bool(BPy_PropertyRNA *self)
{
- PYRNA_PROP_CHECK_INT(self)
+ PYRNA_PROP_CHECK_INT(self);
return RNA_property_array_length(&self->ptr, self->prop) ? 1 : 0;
}
@@ -1919,7 +1919,7 @@ static int pyrna_prop_collection_bool(BPy_PropertyRNA *self)
CollectionPropertyIterator iter;
int test;
- PYRNA_PROP_CHECK_INT(self)
+ PYRNA_PROP_CHECK_INT(self);
RNA_property_collection_begin(&self->ptr, self->prop, &iter);
test= iter.valid;
@@ -1928,10 +1928,10 @@ static int pyrna_prop_collection_bool(BPy_PropertyRNA *self)
}
+/* notice getting the length of the collection is avoided unless negative
+ * index is used or to detect internal error with a valid index.
+ * This is done for faster lookups. */
#define PYRNA_PROP_COLLECTION_ABS_INDEX(ret_err) \
- /* notice getting the length of the collection is avoided unless negative \
- * index is used or to detect internal error with a valid index. \
- * This is done for faster lookups. */ \
if(keynum < 0) { \
keynum_abs += RNA_property_collection_length(&self->ptr, self->prop); \
if(keynum_abs < 0) { \
@@ -1948,7 +1948,7 @@ static PyObject *pyrna_prop_collection_subscript_int(BPy_PropertyRNA *self, Py_s
PointerRNA newptr;
Py_ssize_t keynum_abs= keynum;
- PYRNA_PROP_CHECK_OBJ(self)
+ PYRNA_PROP_CHECK_OBJ(self);
PYRNA_PROP_COLLECTION_ABS_INDEX(NULL);
@@ -1979,16 +1979,23 @@ static int pyrna_prop_collection_ass_subscript_int(BPy_PropertyRNA *self, Py_ssi
Py_ssize_t keynum_abs= keynum;
const PointerRNA *ptr= (value == Py_None) ? (&PointerRNA_NULL) : &((BPy_StructRNA *)value)->ptr;
- PYRNA_PROP_CHECK_INT(self)
+ PYRNA_PROP_CHECK_INT(self);
PYRNA_PROP_COLLECTION_ABS_INDEX(-1);
if(RNA_property_collection_assign_int(&self->ptr, self->prop, keynum_abs, ptr) == 0) {
+ const int len= RNA_property_collection_length(&self->ptr, self->prop);
+ if(keynum_abs >= len) {
+ PyErr_Format(PyExc_IndexError,
+ "bpy_prop_collection[index] = value: "
+ "index %d out of range, size %d", keynum, len);
+ }
+ else {
- PyErr_Format(PyExc_IndexError,
- "bpy_prop_collection[index] = value: "
- "failed assignment (unknown reason)", keynum);
-
+ PyErr_Format(PyExc_IndexError,
+ "bpy_prop_collection[index] = value: "
+ "failed assignment (unknown reason)", keynum);
+ }
return -1;
}
@@ -1999,7 +2006,7 @@ static PyObject *pyrna_prop_array_subscript_int(BPy_PropertyArrayRNA *self, int
{
int len;
- PYRNA_PROP_CHECK_OBJ((BPy_PropertyRNA *)self)
+ PYRNA_PROP_CHECK_OBJ((BPy_PropertyRNA *)self);
len= pyrna_prop_array_length(self);
@@ -2016,7 +2023,7 @@ static PyObject *pyrna_prop_collection_subscript_str(BPy_PropertyRNA *self, cons
{
PointerRNA newptr;
- PYRNA_PROP_CHECK_OBJ(self)
+ PYRNA_PROP_CHECK_OBJ(self);
if(RNA_property_collection_lookup_string(&self->ptr, self->prop, keyname, &newptr))
return pyrna_struct_CreatePyObject(&newptr);
@@ -2034,7 +2041,7 @@ static PyObject *pyrna_prop_collection_subscript_slice(BPy_PropertyRNA *self, Py
PyObject *list;
PyObject *item;
- PYRNA_PROP_CHECK_OBJ(self)
+ PYRNA_PROP_CHECK_OBJ(self);
list= PyList_New(0);
@@ -2073,11 +2080,11 @@ static PyObject *pyrna_prop_array_subscript_slice(BPy_PropertyArrayRNA *self, Po
int count, totdim;
PyObject *tuple;
- PYRNA_PROP_CHECK_OBJ((BPy_PropertyRNA *)self)
+ PYRNA_PROP_CHECK_OBJ((BPy_PropertyRNA *)self);
tuple= PyTuple_New(stop - start);
- /* PYRNA_PROP_CHECK_OBJ(self) isn't needed, internal use only */
+ /* PYRNA_PROP_CHECK_OBJ(self); isn't needed, internal use only */
totdim= RNA_property_array_dimension(ptr, prop, NULL);
@@ -2148,7 +2155,7 @@ static PyObject *pyrna_prop_array_subscript_slice(BPy_PropertyArrayRNA *self, Po
static PyObject *pyrna_prop_collection_subscript(BPy_PropertyRNA *self, PyObject *key)
{
- PYRNA_PROP_CHECK_OBJ(self)
+ PYRNA_PROP_CHECK_OBJ(self);
if (PyUnicode_Check(key)) {
return pyrna_prop_collection_subscript_str(self, _PyUnicode_AsString(key));
@@ -2329,7 +2336,7 @@ static int pyrna_prop_collection_ass_subscript(BPy_PropertyRNA *self, PyObject *
static PyObject *pyrna_prop_array_subscript(BPy_PropertyArrayRNA *self, PyObject *key)
{
- PYRNA_PROP_CHECK_OBJ((BPy_PropertyRNA *)self)
+ PYRNA_PROP_CHECK_OBJ((BPy_PropertyRNA *)self);
/*if (PyUnicode_Check(key)) {
return pyrna_prop_array_subscript_str(self, _PyUnicode_AsString(key));
@@ -2485,7 +2492,7 @@ static int prop_subscript_ass_array_int(BPy_PropertyArrayRNA *self, Py_ssize_t k
{
int len;
- PYRNA_PROP_CHECK_INT((BPy_PropertyRNA *)self)
+ PYRNA_PROP_CHECK_INT((BPy_PropertyRNA *)self);
len= pyrna_prop_array_length(self);
@@ -2620,7 +2627,7 @@ static int pyrna_struct_contains(BPy_StructRNA *self, PyObject *value)
IDProperty *group;
const char *name= _PyUnicode_AsString(value);
- PYRNA_STRUCT_CHECK_INT(self)
+ PYRNA_STRUCT_CHECK_INT(self);
if (!name) {
PyErr_SetString(PyExc_TypeError, "bpy_struct.__contains__: expected a string");
@@ -2685,7 +2692,7 @@ static PyObject *pyrna_struct_subscript(BPy_StructRNA *self, PyObject *key)
IDProperty *group, *idprop;
const char *name= _PyUnicode_AsString(key);
- PYRNA_STRUCT_CHECK_OBJ(self)
+ PYRNA_STRUCT_CHECK_OBJ(self);
if(RNA_struct_idprops_check(self->ptr.type)==0) {
PyErr_SetString(PyExc_TypeError, "this type doesn't support IDProperties");
@@ -2718,7 +2725,7 @@ static int pyrna_struct_ass_subscript(BPy_StructRNA *self, PyObject *key, PyObje
{
IDProperty *group;
- PYRNA_STRUCT_CHECK_INT(self)
+ PYRNA_STRUCT_CHECK_INT(self);
group= RNA_struct_idprops(&self->ptr, 1);
@@ -2841,7 +2848,7 @@ static PyObject *pyrna_struct_is_property_set(BPy_StructRNA *self, PyObject *arg
const char *name;
int ret;
- PYRNA_STRUCT_CHECK_OBJ(self)
+ PYRNA_STRUCT_CHECK_OBJ(self);
if (!PyArg_ParseTuple(args, "s:is_property_set", &name))
return NULL;
@@ -2884,7 +2891,7 @@ static PyObject *pyrna_struct_is_property_hidden(BPy_StructRNA *self, PyObject *
PropertyRNA *prop;
const char *name;
- PYRNA_STRUCT_CHECK_OBJ(self)
+ PYRNA_STRUCT_CHECK_OBJ(self);
if (!PyArg_ParseTuple(args, "s:is_property_hidden", &name))
return NULL;
@@ -2918,7 +2925,7 @@ static PyObject *pyrna_struct_path_resolve(BPy_StructRNA *self, PyObject *args)
PropertyRNA *r_prop;
int index= -1;
- PYRNA_STRUCT_CHECK_OBJ(self)
+ PYRNA_STRUCT_CHECK_OBJ(self);
if (!PyArg_ParseTuple(args, "s|O!:path_resolve", &path, &PyBool_Type, &coerce))
return NULL;
@@ -2976,7 +2983,7 @@ static PyObject *pyrna_struct_path_from_id(BPy_StructRNA *self, PyObject *args)
PropertyRNA *prop;
PyObject *ret;
- PYRNA_STRUCT_CHECK_OBJ(self)
+ PYRNA_STRUCT_CHECK_OBJ(self);
if (!PyArg_ParseTuple(args, "|s:path_from_id", &name))
return NULL;
@@ -3058,7 +3065,7 @@ static PyObject *pyrna_struct_type_recast(BPy_StructRNA *self)
{
PointerRNA r_ptr;
- PYRNA_STRUCT_CHECK_OBJ(self)
+ PYRNA_STRUCT_CHECK_OBJ(self);
RNA_pointer_recast(&self->ptr, &r_ptr);
return pyrna_struct_CreatePyObject(&r_ptr);
@@ -3139,7 +3146,7 @@ static PyObject *pyrna_struct_dir(BPy_StructRNA *self)
PyObject *ret;
PyObject *pystring;
- PYRNA_STRUCT_CHECK_OBJ(self)
+ PYRNA_STRUCT_CHECK_OBJ(self);
/* Include this incase this instance is a subtype of a python class
* In these instances we may want to return a function or variable provided by the subtype
@@ -3186,7 +3193,7 @@ static PyObject *pyrna_struct_getattro(BPy_StructRNA *self, PyObject *pyname)
PropertyRNA *prop;
FunctionRNA *func;
- PYRNA_STRUCT_CHECK_OBJ(self)
+ PYRNA_STRUCT_CHECK_OBJ(self);
if(name == NULL) {
PyErr_SetString(PyExc_AttributeError, "bpy_struct: __getattr__ must be a string");
@@ -3407,7 +3414,7 @@ static int pyrna_struct_setattro(BPy_StructRNA *self, PyObject *pyname, PyObject
const char *name= _PyUnicode_AsString(pyname);
PropertyRNA *prop= NULL;
- PYRNA_STRUCT_CHECK_INT(self)
+ PYRNA_STRUCT_CHECK_INT(self);
#ifdef USE_PEDANTIC_WRITE
if(rna_disallow_writes && rna_id_write_error(&self->ptr, pyname)) {
@@ -3794,7 +3801,7 @@ static PyObject *pyrna_struct_get(BPy_StructRNA *self, PyObject *args)
const char *key;
PyObject* def= Py_None;
- PYRNA_STRUCT_CHECK_OBJ(self)
+ PYRNA_STRUCT_CHECK_OBJ(self);
if (!PyArg_ParseTuple(args, "s|O:get", &key, &def))
return NULL;
@@ -3851,7 +3858,7 @@ static PyObject *pyrna_prop_collection_get(BPy_PropertyRNA *self, PyObject *args
const char *key;
PyObject* def= Py_None;
- PYRNA_PROP_CHECK_OBJ(self)
+ PYRNA_PROP_CHECK_OBJ(self);
if (!PyArg_ParseTuple(args, "s|O:get", &key, &def))
return NULL;
@@ -4124,7 +4131,7 @@ PyDoc_STRVAR(pyrna_prop_collection_foreach_get_doc,
);
static PyObject *pyrna_prop_collection_foreach_get(BPy_PropertyRNA *self, PyObject *args)
{
- PYRNA_PROP_CHECK_OBJ(self)
+ PYRNA_PROP_CHECK_OBJ(self);
return foreach_getset(self, args, 0);
}
@@ -4144,7 +4151,7 @@ PyDoc_STRVAR(pyrna_prop_collection_foreach_set_doc,
);
static PyObject *pyrna_prop_collection_foreach_set(BPy_PropertyRNA *self, PyObject *args)
{
- PYRNA_PROP_CHECK_OBJ(self)
+ PYRNA_PROP_CHECK_OBJ(self);
return foreach_getset(self, args, 1);
}
@@ -4158,7 +4165,7 @@ static PyObject *pyrna_prop_array_iter(BPy_PropertyArrayRNA *self)
PyObject *iter= NULL;
int len;
- PYRNA_PROP_CHECK_OBJ((BPy_PropertyRNA *)self)
+ PYRNA_PROP_CHECK_OBJ((BPy_PropertyRNA *)self);
len= pyrna_prop_array_length(self);
ret= pyrna_prop_array_subscript_slice(self, &self->ptr, self->prop, 0, len, len);
diff --git a/source/blender/python/intern/bpy_rna_anim.c b/source/blender/python/intern/bpy_rna_anim.c
index d766acc098e..c87a141f5bd 100644
--- a/source/blender/python/intern/bpy_rna_anim.c
+++ b/source/blender/python/intern/bpy_rna_anim.c
@@ -189,7 +189,7 @@ PyObject *pyrna_struct_keyframe_insert(BPy_StructRNA *self, PyObject *args, PyOb
float cfra= FLT_MAX;
const char *group_name= NULL;
- PYRNA_STRUCT_CHECK_OBJ(self)
+ PYRNA_STRUCT_CHECK_OBJ(self);
if(pyrna_struct_keyframe_parse(&self->ptr, args, kw,
"s|ifs:bpy_struct.keyframe_insert()", "bpy_struct.keyframe_insert()",
@@ -237,7 +237,7 @@ PyObject *pyrna_struct_keyframe_delete(BPy_StructRNA *self, PyObject *args, PyOb
float cfra= FLT_MAX;
const char *group_name= NULL;
- PYRNA_STRUCT_CHECK_OBJ(self)
+ PYRNA_STRUCT_CHECK_OBJ(self);
if(pyrna_struct_keyframe_parse(&self->ptr, args, kw,
"s|ifs:bpy_struct.keyframe_delete()",
@@ -280,7 +280,7 @@ PyObject *pyrna_struct_driver_add(BPy_StructRNA *self, PyObject *args)
const char *path, *path_full;
int index= -1;
- PYRNA_STRUCT_CHECK_OBJ(self)
+ PYRNA_STRUCT_CHECK_OBJ(self);
if (!PyArg_ParseTuple(args, "s|i:driver_add", &path, &index))
return NULL;
@@ -356,7 +356,7 @@ PyObject *pyrna_struct_driver_remove(BPy_StructRNA *self, PyObject *args)
const char *path, *path_full;
int index= -1;
- PYRNA_STRUCT_CHECK_OBJ(self)
+ PYRNA_STRUCT_CHECK_OBJ(self);
if (!PyArg_ParseTuple(args, "s|i:driver_remove", &path, &index))
return NULL;
diff --git a/source/blender/python/mathutils/mathutils_Quaternion.c b/source/blender/python/mathutils/mathutils_Quaternion.c
index 7dc47f394f4..983077bbe00 100644
--- a/source/blender/python/mathutils/mathutils_Quaternion.c
+++ b/source/blender/python/mathutils/mathutils_Quaternion.c
@@ -193,7 +193,7 @@ static PyObject *Quaternion_dot(QuaternionObject *self, PyObject *value)
}
PyDoc_STRVAR(Quaternion_rotation_difference_doc,
-".. function:: difference(other)\n"
+".. function:: rotation_difference(other)\n"
"\n"
" Returns a quaternion representing the rotational difference.\n"
"\n"
diff --git a/source/blender/windowmanager/intern/wm_operators.c b/source/blender/windowmanager/intern/wm_operators.c
index 16cba7d6758..07bab06e52f 100644
--- a/source/blender/windowmanager/intern/wm_operators.c
+++ b/source/blender/windowmanager/intern/wm_operators.c
@@ -860,7 +860,7 @@ void WM_operator_properties_filesel(wmOperatorType *ot, int filter, short type,
RNA_def_property_flag(prop, PROP_HIDDEN);
if(flag & WM_FILESEL_RELPATH)
- RNA_def_boolean(ot->srna, "relative_path", (U.flag & USER_RELPATHS) ? 1:0, "Relative Path", "Select the file relative to the blend file");
+ RNA_def_boolean(ot->srna, "relative_path", TRUE, "Relative Path", "Select the file relative to the blend file");
}
void WM_operator_properties_select_all(wmOperatorType *ot)
@@ -1618,15 +1618,20 @@ static void WM_OT_open_mainfile(wmOperatorType *ot)
static int wm_link_append_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(event))
{
- if(!RNA_property_is_set(op->ptr, "relative_path"))
- RNA_boolean_set(op->ptr, "relative_path", U.flag & USER_RELPATHS);
-
if(RNA_property_is_set(op->ptr, "filepath")) {
return WM_operator_call(C, op);
}
else {
/* XXX TODO solve where to get last linked library from */
- RNA_string_set(op->ptr, "filepath", G.lib);
+ if(G.lib[0] != '\0') {
+ RNA_string_set(op->ptr, "filepath", G.lib);
+ }
+ else if(G.relbase_valid) {
+ char path[FILE_MAX];
+ BLI_strncpy(path, G.main->name, sizeof(G.main->name));
+ BLI_parent_dir(path);
+ RNA_string_set(op->ptr, "filepath", path);
+ }
WM_event_add_fileselect(C, op);
return OPERATOR_RUNNING_MODAL;
}
diff --git a/source/gameengine/Converter/KX_IpoConvert.cpp b/source/gameengine/Converter/KX_IpoConvert.cpp
index b13dbe324f5..4ea77e4349d 100644
--- a/source/gameengine/Converter/KX_IpoConvert.cpp
+++ b/source/gameengine/Converter/KX_IpoConvert.cpp
@@ -102,7 +102,7 @@ SG_Controller *BL_CreateIPO(struct bAction *action, KX_GameObject* gameobj, KX_B
rotmode = "rotation_axis_angle";
drotmode = "delta_rotation_axis_angle";
break;
- case ROT_MODE_QUAT:
+ case ROT_MODE_QUAT: /* XXX, this isnt working, currently only eulers are supported [#28853] */
rotmode = "rotation_quaternion";
drotmode = "delta_rotation_quaternion";
break;