Commit Graph

13039 Commits

Author SHA1 Message Date
Campbell Barton
d39154bb50 bugfix, BGE, use vec.safe_normalized() rather then vec.normalized() because in some cases the ray_cast sensor could crash blender. 2008-06-18 09:06:51 +00:00
Benoit Bolsee
48c7c9d957 Forgot to set Id property on new shape action files 2008-06-18 07:03:47 +00:00
Benoit Bolsee
2bece8dcb5 BGE Patch: Add Shape Action support and update MSCV_7 project file for glew.
Shape Action are now supported in the BGE. A new type of actuator "Shape Action" is available on mesh objects. It can be combined with Action actuator on parent armature. Only relative keys are supported. All the usual action options are available: type, blending, priority, Python API. Only actions with shape channels should be specified of course, otherwise the actuator has no effect. Shape action will still work after a mesh replacement provided that the new mesh has compatible shape keys.
2008-06-18 06:46:49 +00:00
Martin Poirier
b4c123c275 [#14400] Crash on grab/move on axis when nothing selected (patch included)
I used a different fix than the included patch, but that was a pretty nasty crasher (only crash on menu/toolbox, not hotkeys).
2008-06-17 21:17:11 +00:00
Brecht Van Lommel
272a91f754 Merge of apricot branch game engine changes into trunk, excluding GLSL.
GLEW
====

Added the GLEW opengl extension library into extern/, always compiled
into Blender now. This is much nicer than doing this kind of extension
management manually, and will be used in the game engine, for GLSL, and
other opengl extensions.

* According to the GLEW website it works on Windows, Linux, Mac OS X,
  FreeBSD, Irix, and Solaris. There might still be platform specific
  issues due to this commit, so let me know and I'll look into it.
* This means also that all extensions will now always be compiled in,
  regardless of the glext.h on the platform where compilation happens.

Game Engine
===========

Refactoring of the use of opengl extensions and other drawing code
in the game engine, and cleaning up some hacks related to GLSL
integration. These changes will be merged into trunk too after this.

The game engine graphics demos & apricot level survived my tests,
but this could use some good testing of course.

For users: please test with the options "Generate Display Lists" and
"Vertex Arrays" enabled, these should be the fastest and are supposed
to be "unreliable", but if that's the case that's probably due to bugs
that can be fixed.

* The game engine now also uses GLEW for extensions, replacing the
  custom opengl extensions code that was there. Removes a lot of
  #ifdef's, but the runtime checks stay of course.
* Removed the WITHOUT_GLEXT environment variable. This was added to
  work around a specific bug and only disabled multitexturing anyway.
  It might also have caused a slowdown since it was retrieving the
  environment variable for every vertex in immediate mode (bug #13680).

* Refactored the code to allow drawing skinned meshes with vertex
  arrays too, removing some specific immediate mode drawing functions
  for this that only did extra normal calculation. Now it always splits
  vertices of flat faces instead.
* Refactored normal recalculation with some minor optimizations,
  required for the above change.
* Removed some outdated code behind the __NLA_OLDDEFORM #ifdef.
* Fixed various bugs in setting of multitexture coordinates and vertex
  attributes for vertex arrays. These were not being enabled/disabled
  correct according to the opengl spec, leading to crashes. Also tangent
  attributes used an immediate mode call for vertex arrays, which can't
  work.
* Fixed use of uninitialized variable in RAS_TexVert.
* Exporting skinned meshes was doing O(n^2) lookups for vertices and
  deform weights, now uses same trick as regular meshes.
2008-06-17 10:27:34 +00:00
Campbell Barton
c9d1924ea5 Use the scenes framerate for ipo and action framerate in the game engine, was hard coded to 25. 2008-06-17 10:06:38 +00:00
Matt Ebb
4c391a0c30 * Simple addition to math node (comp and shading): Greater Than and Less Than modes. 2008-06-17 04:18:34 +00:00
Campbell Barton
6be46f9ee3 [#11456] New datablock type(s) added to Oops Schematic
patch from Shawn Zilbert (enigmatic)

This patch adds the camera data block type to the oops schematic view of the outliner. It also includes a little bit of code cleanup in the oops files.
2008-06-16 19:54:43 +00:00
Martin Poirier
bb539ce1b5 Snapping
Snap to cage only in edit mode (respect the edit cage flag of modifiers).

Especially important for subsurf, otherwise, Andy's automerge + snap video doesn't work in current SVN.
2008-06-16 16:48:09 +00:00
Campbell Barton
1e3bdcf198 bugfix from Markus Ilmola (glome)
patch was in [#8540] Import scripts for MilkShape3D file formats

Some animations were incorrectly imported and this adds support for weights.
2008-06-16 14:08:24 +00:00
Campbell Barton
9b69c56917 Material color was always overriding OBCOL for blender text. 2008-06-16 09:16:04 +00:00
Diego Borghetti
f445dfbfb6 Patch [#13777]
This commit fix the following problem in the DPX code:

1) The code always assume a depth of 10 bits
2) The code don't check the file type (Log or Linear)
2008-06-16 07:15:09 +00:00
Martin Poirier
ad023e108a [#13691] apricot Snap didn’t work correct in svn
1. Updated selected restriction to not be so stingy. Snapping on edges and vertices work if they are part of a partially moving face

2. Change depth ordering (which didn't work all the time). Hits are sorted according to 2D distance and then depth, so for overlapping hits, it picks the one in front.
2008-06-15 17:54:42 +00:00
Martin Poirier
eb9c4de83f Patch [#13668] Tool tip correction
By Olivier Saraja
2008-06-15 14:22:12 +00:00
Joshua Leung
a54edca119 Whitespace commit in armature.c 2008-06-15 10:19:38 +00:00
Campbell Barton
f63b70635c bugfix, clip alpha wasn't working in the GE, not happy with these functions, they probably need bigger changes not to assume all alpha requires face sorting with a disabled depth buffer, 2008-06-15 09:43:24 +00:00
Campbell Barton
c76bce9e64 bugfix, simple crash in drawaction 2008-06-15 08:56:11 +00:00
Benoit Bolsee
89c1875bc9 BGE patch: support Set Scene in BGE. Linked Set Scene should have no name conflict in Object, Object data and Action of the main scene to avoid confusion in Python scripting. Nested Set Scene are supported. You will need Python scripting to create cross references between objects in the main scene and the Set (e.g TrackTo actuator) 2008-06-14 20:42:15 +00:00
Jean-Luc Peurière
13d081c62c fix for ndof inconsistencies, bug #13954
patch provided by Ettore Pasquini
2008-06-14 18:57:42 +00:00
Campbell Barton
fc7a83b458 Added access for adjusting timeOffset value at runtime, used for apricot (Franky climbing walls) 2008-06-14 17:12:49 +00:00
Campbell Barton
9c2bf9bdbc bugfix for memory corruption caused by BLI_cleanup_file on paths that went too far back.
/a/b/../../../ - problematic
/a/b/c/../../../ - ok
Also got rid of warnings in shadbuf.c with GET_INT_FROM_POINTER
2008-06-14 16:54:46 +00:00
Joshua Leung
714c6d5010 Bugfix:
Campbell's recent commit to fix game-engine pose/ipo corruption was causing segfaults with duplicating armatures.
2008-06-14 03:00:38 +00:00
Campbell Barton
8bd82d4e36 Some pose action ipo corruptions when using BGE, added some debug printf's when copying to/from the same pose since it should never happen. 2008-06-13 02:20:09 +00:00
Benoit Bolsee
21c2613622 Update MSVC project files 2008-06-12 21:17:02 +00:00
Campbell Barton
1e7f1f753f When your home directory is full, saving defaults would fail without raising an error.
checked all others instances of BLO_write_file give errors too.
When autosave fails it reports an error in the console so its not too annoying.
2008-06-12 16:29:00 +00:00
Ben Batt
7ffd70f39a Patch #8613 - Vertex groups in the mirror modifier.
This patch re-assigns the mirrored data to use vertex groups with "mirrored"
names (e.g. L_arm -> R_arm, Leg.R -> Leg.L etc.). Vertex groups with the
"mirrored" names must already exist in the base mesh.

This means that it is no longer necessary to apply the mirror modifier in order
to rig the mirrored data independently.

Thanks to Michael Fox for the patch!
2008-06-12 15:43:55 +00:00
Campbell Barton
1091db8f9b didnt name the smooth curve menu item. 2008-06-12 15:00:07 +00:00
Campbell Barton
82a108b413 Curve Smoorth for venomgfx adjusting animation paths over terrain. 2008-06-12 14:46:32 +00:00
Brecht Van Lommel
39a47826e3 Fix for commit revision 15197, missing braces caused some shortcut
keys not to work anymore.
2008-06-11 20:15:47 +00:00
Campbell Barton
21a46a0155 bugfix
- duplicated script spaces would keep a pointer to the PyObject button list. (causing python errors with negative reference counts when freeing spaces)
- Exiting blender would crash when a UI was open because the ScriptSpaces button PyList was being free'd after python Py_Finalize was called.
2008-06-11 14:31:51 +00:00
Campbell Barton
d0fc57e5df [#13723] Select -> Grouped -> Objects in Same Group doesn't work directly after appending
Menu was shown even when it couldn't do anything. behavior now matches the object copy menu.
2008-06-11 10:45:41 +00:00
Campbell Barton
ef0ea178b1 bugfix, off by 1 error when filling in uninitialized values for new ID values when the requested name length was greater to or equal to 21.
Also replaced incorrect use of strcpy with memmove since the strings overlap
2008-06-11 09:04:41 +00:00
Campbell Barton
bdb3ef08cf Increased new nla, sound, action, ipo, timeline spaces max zoomlevel to use MAXFRAMEF, so you can view an entire animation ans so all time spaces have the same maximum which is important when the views lock to each others zoomlevel.
Not ideal since it only affects newly created spaces, but probably not worth going through doversions since it wont effect many blender users.
2008-06-11 05:25:52 +00:00
Geoffrey Bantle
d086126616 -> Stack corruption in viewline in viw.c
viewline() would write past the end of an array
allocated on the stack causing crashes. Fixed this.

Martin, could you take a look at this?
2008-06-10 16:18:45 +00:00
Campbell Barton
70453c9e80 bugfix, missing calls to free editmesh index arrays 2008-06-10 10:26:13 +00:00
Peter Schlaile
f72d450ae9 == redcode ==
This makes it work for Mac OS X. Thanks to Jean-Luc Peuriere for the patch.
2008-06-10 05:12:51 +00:00
Campbell Barton
192037960d error in variable name, not sure how this even compiled 2008-06-09 22:54:56 +00:00
Martin Poirier
fd1faa5542 Merge from Apricot Revisions 14897, 14913, 14914, 14915, 14929, 15009, 15046
---------------------------------------------------
Snappy stuff

* Align rotation with snapping target: rotate the object, aligning it with the target (object mode only - temporarily) (New icon in the header when snap is turned on)

* Snap to different mesh elements (face, edge, vertice): snapping target slide on faces and edge or use exact position of vertice. When using Align rotation with edge snapping, the normal is interpolated as you slide along.

Snaps correctly to derived mesh (sculpt, modifiers, ...) and duplis. In object and edit mode.

NOTE: The snapping code is now based on faces, so even if you're snapping to vertices or edges, it will not work on meshes without faces. This might change if needed.
2008-06-09 18:41:16 +00:00
Martin Poirier
8c68895741 Revision 14869 merged from apricot
----------------------------------
Centralize handling of individual center for rotations
2008-06-09 18:07:12 +00:00
Martin Poirier
d5c80a3a1b Revision 14929 partial merged from apricot
(partial because I'll merge all snap code in one fell swoop after the libs are done)
----------------------------------
object: ray - boundbox intersection test
2008-06-09 17:50:21 +00:00
Martin Poirier
ccc78eebde Revision 15045 merged from apricot
----------------------------------
Small fix to derivedmesh for snapping: don't create origindex for
editmesh derivedmesh since it's not being filled correct anyway.
2008-06-09 17:22:38 +00:00
Martin Poirier
ac0a91920a Revision 14894 merged from apricot
----------------------------------
Arith:
	- axis angle to quat conversion function
	- short to float / float to short normals conversion function (eventually, we could go over the go and replace copy/pasted code everywhere)
	- ray triangle intersection (to complement the line triangle intersection function)
	
View:
	- viewray / viewline (get near plane point under mouse and ray normal/far point)


Particles:
	- extract viewline from brush_add function
2008-06-09 17:16:20 +00:00
Martin Poirier
83af2c1757 PATCH: [#13656] Bad rotation computing for manual rotation higher than 180 degrees
By Fabrice Tiercelin

This enables rotation angles of more than 180 degrees to result in the same rotation applied to the object (the result used to be clamps between -180 - 180 of the initial rotation).

The patch had to be modified to deal with IPO keys properly
2008-06-09 16:54:54 +00:00
Brecht Van Lommel
4e2bb896b0 Added back a feature from the old particle system: negative start frame.
At the moment this does mean it will compute all the frames before the
point caching start frame on the first frame, which might be slow.
2008-06-09 16:49:33 +00:00
Campbell Barton
f39758cddc adding clip alpha (binary alpha) to the 3D view and game engine. 2008-06-09 15:45:46 +00:00
Campbell Barton
610b877f60 ctrl+LMB drag would add an ipo vert AND zoom in ipo view.
checked revisions 7915 and 10663, it seems this functionality was accidental.
2008-06-09 12:13:51 +00:00
Brecht Van Lommel
57d83522a2 Fix for bug #13627: bFTGL sconscript missing opengl includes, didn't
compile with non-standard paths.
2008-06-09 10:03:30 +00:00
Joshua Leung
71573cbd55 Bugfix #13666:
Missing #include <stdio.h> in source/gameengine/Ketsji/KX_RayCast.cpp
2008-06-08 10:48:37 +00:00
Joshua Leung
cee9c7a8fa Bugfix #13667: Outliner doesn't update when changing Parent in Transform Properties
There was a missing refresh call for the Outliner.
2008-06-08 10:46:30 +00:00
Joshua Leung
08f9bcf8ec Bugfix #13649: Segmentation fault when deleting object
When the IPO editor was pinned, and the active object was changed, deleting the active object would cause a crash.
2008-06-08 09:35:05 +00:00