Commit Graph

13049 Commits

Author SHA1 Message Date
Campbell Barton
a1e78a0cca * Documented that get/setOrientation use an inverted rotation matrix
* OB prefix is needed when specifying the object for the Message Actuator, this is very bad since other object fields in the BGE dont need this prefix - a real fix would need do_versions to keep old files running.
* RotationMatrix was all nans if the rotation vector axis was 0,0,0, Changed so in this case just return a matrix that doesn't rotate anything,

spent some angry hours to find these issues, maybe this will save others the hassle ;)
2008-06-20 20:54:29 +00:00
Benoit Bolsee
de7619991c BGE bug fix for new shape action: mesh with multiple materials did not deform properly 2008-06-19 14:40:46 +00:00
Daniel Genrich
d6c8d2f701 Just make gcc compiler happy (stupid harmless warning) 2008-06-19 13:41:06 +00:00
Benoit Bolsee
df8a3882c6 BGE patch #13625: getLinearVelocity() rewrite to use only vector and matrix operations 2008-06-18 21:22:17 +00:00
Chris Want
fd8e873e01 == VRML97 exporter ==
Faulty indentation of a line sometimes caused a bunch of empty lines to
be printed into the TextureCoordinate and texCoodIndex fields
(benign error, just ugly).
2008-06-18 21:16:29 +00:00
Chris Want
4ed60f4575 == VRML97 export ==
Don't export vertex colors if a mesh doesn't have any (even if a
texface has 'shared cols' set).
2008-06-18 19:58:05 +00:00
Chris Want
1c1f81914c == VRML97 export ==
Patch #10569 from Michalis Kamburelis (sorry for the delay).

This patch adds a popup menu that lets the user choose whether
they want to export selected, whether thay wanted to export
compressed, and whether they want to export the file from
blender's "Z up" coordinates to VRML's "Y up".

I'm not too crazy about the caching to disk of these options
via GetRegistry/SetRegistry, but since this seems to occur
in many of the other export scripts I'll leave it as is.
2008-06-18 17:13:33 +00:00
Ben Batt
55433f51d8 Patch #8882 - Falloff in the wave modifier
This patch adds the ability to specify a falloff radius in the Wave modifier.
Currently only linear falloff is supported.

Thanks to Michael Fox for the patch!
2008-06-18 15:22:42 +00:00
Brecht Van Lommel
3f488f4d70 * Fix for a crash in game engine vertex array drawing with texfaces.
* For 2D filters, don't require opengl 2.0 but just the extensions,
  so it works on computers without full 2.0 support too.
* In debug mode, don't print memory statistics for preview render.
2008-06-18 10:30:14 +00:00
Jiri Hnidek
5cd4b6ac90 Small fix to be able to compile Blender. 2008-06-18 09:52:31 +00:00
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