Commit Graph

11306 Commits

Author SHA1 Message Date
Jean-Luc Peurière
bdcffe35b9 NDOF bugfixes 14402 & 14403 by ettore Pasquini 2008-06-29 12:53:42 +00:00
Jean-Luc Peurière
7056d63f41 adding explicit cast to get things compiling 2008-06-29 12:25:15 +00:00
Joshua Leung
13e4ae1542 Action Editor - Group drawing tweaks:
* When all the action-channels for a group are hidden (i.e. their related bones are not visible), the group in question is also not drawn. This helps reduce clutter. (slikdigit funboard request)

* When a group has no channels belonging to it, the expand icon/button isn't drawn for that group.
2008-06-29 05:52:11 +00:00
Joshua Leung
e27d635e18 Added autokey call for Flip Quats tool (Alt-F in PoseMode) 2008-06-29 03:58:46 +00:00
Hamed Zaghaghi
b98e53b8ac BGE , fix an compile error 2008-06-28 14:19:25 +00:00
Hamed Zaghaghi
1231a2171a BGE 2d-filter, custom shaders now can have depth texture and luminance texture 2008-06-28 03:18:11 +00:00
Campbell Barton
f9ae102afd bugfix, txt_to_buf would crash on an empty text file.
Also checked all other uses of text->lines.first to make sure the assumption isn't made elsewhere.
Added 2 more checks for text->lines.first when converting text buffer to objects.
2008-06-27 23:01:33 +00:00
Campbell Barton
f0a3cbcdac patch [#15865] BGE API call to delete objects
from Dalai Felinto (dfelinto) 
renamed deleteObject to endObject() to match the user interface.
2008-06-27 11:35:55 +00:00
Juho Vepsalainen
a8f00246ba Fix for bug [#13651] Convertor->Math->Divide broken
Changed the if statement to catch zero case properly.
2008-06-26 17:08:07 +00:00
Kent Mein
cef2867fef Make it so it accepts blah.tiff as a filename not just blah.tif
This is for bug [#15132] When saving a render .tif is appended to the saved 
	file even if the name contains .tiff

Kent
2008-06-26 16:42:20 +00:00
Campbell Barton
11cdc2a002 Python API/Game engine fixes, dosn't affect 2.47
* Action FrameProp was checking if the string was true, not that it contained any text.
* Added GameObject.getVisible() since there is already a getVisible
* Added GameObject.getPropertyNames() Needed in apricot so Franky can collect and throw items in the level without having the names defined elsewhere or modifying his game logic which is stored in a separate blend file.
2008-06-26 12:39:06 +00:00
Campbell Barton
ac25593479 int toggle button function was being used on a short, remove warnings in buttons_logic.c too 2008-06-25 16:15:57 +00:00
Campbell Barton
84c4e89eba Commented out face transp changing when switching images, this is more annoying then helpful.
Edited Game engine docs to note that the matrix will need to be transposed if used with Mathutils.Matrix()
Edited "Collision" button since ray-sensor also uses collision.
2008-06-25 16:09:29 +00:00
Benoit Bolsee
c353af4d3a BGE patch 15044 approved: Edit Object Dynamics Actuator.
Add enable/disable dynamics actuator under the "Edit Object" category.
The Enable/disable rigid body option is also availale but not implemented.
2008-06-25 14:09:15 +00:00
Campbell Barton
7ba2389932 added r/w access to nurb curves orderU for migius 2008-06-25 13:21:38 +00:00
Benoit Bolsee
820c2df12c BGE patch: Add automatic support for armature driven shape keys.
To take advantage of this feature, you must have a mesh with 
relative shape keys and shape Ipo curves with drivers referring
to bones of the mesh's parent armature. 
The BGE will automatically detect the dependency between the 
shape keys and the armature and execute the Ipo drivers during
the rendering of the armature actions.
This technique is used to make the armature action more natural: 
the shape keys compensate in places where the armature deformation 
is uggly and the drivers make sure that the shape correction
is synchronized with the bone position.

Note: This is not compatible with shape actions; BLender does 
not allow to have Shape Ipo Curves and Shape actions at the same
time.
2008-06-24 22:19:00 +00:00
Benoit Bolsee
4d478cbe86 BGE patch: remove Shape key driver code from previous commit 2008-06-24 21:39:45 +00:00
Benoit Bolsee
15c105c157 BGE patch: Add damping and clamping option to motion actuator.
This patch introduces two options for the motion actuator:

damping: number of frames to reach the target velocity. It takes
into account the startup velocityin the target velocity direction
and add 1/damping fraction of target velocity until the full 
velocity is reached. Works only with linear and angular velocity.
It will be extended to delta and force motion method in a future
release.

clamping: apply the force and torque as long as the target velocity
is not reached. If this option is set, the velocity specified 
in linV or angV are not applied to the object but used as target
velocity. You should also specify a force in force or torque field: 
the force will be applied as long as the velocity along the axis of
the vector set in linV or angV is not reached. Works best in low
friction environment.
2008-06-24 19:37:43 +00:00
Campbell Barton
533539901b Artists complaining about these popups
* Nothing indicated - is not helpful, and very annoying with occluded geometry with high poly meshes, sometimes the selection doesn't work 100% of the time and the menu pops up over what you want to select.
* No (correct) camera error doesn't seem to be needed, has been there since rev 2.
2008-06-24 09:49:29 +00:00
Benoit Bolsee
02132de7aa BGE patch: Add NAND, NOR, XOR, XNOR controllers.
NAND controller is an inverted AND controller: the output is 
     1 if any of the input is 0.
NOR  controller is an inverted OR controller: the output is 0
     if any of the input is 1.
XOR  controller is an exclusive OR: the output is 1 if and only
     if one input is 1 and all the other inputs are 0.
XNOR controller is an inverted XOR: the output is 0 if and only
     if one input is 0 and all the other inputs are 0.
The NAND, NORT and XNOR controllers are very usefull to create
complementary outputs to start and stop actuators synchronously.
MSCV project files updated.
2008-06-23 20:41:18 +00:00
Benoit Bolsee
10c57fd86e BGE bug fix: action constraints were not correctly copied from Blender to BGE local copy, only the first one was copied 2008-06-23 20:29:32 +00:00
Benoit Bolsee
67c0b32375 BGE patch: Add level option on sensor and fix sensor reset.
Level option is now available on all sensors but is only implemented on 
mouse and keyboard sensors. The purpose of that option is to make
the sensor react on level rather than edge by default. It's only
applicable to state engine system when there is a state transition:
the sensor will generate a pulse if the condition is met from the
start of the state. Normally, the keyboard sensor generate a pulse
only when the key is pressed and not when the key is already pressed.
This patch allows to select this behavior.
The second part of the patch corrects the reset method for sensors
with inverted output.
2008-06-23 20:26:48 +00:00
Campbell Barton
8b9503e0ec bugfix [#14796] -t <threads> command line switch doesn't work unless FIXED_THREADS has previously been turned on
Command line threads now override blendfile setting in background mode.
Command line Threads greater then 8 are now clamped.
2008-06-23 16:47:15 +00:00
Benoit Bolsee
75e22a1917 BGE patch #14386: Action Actuator Current Frame Prop. This patch is very usefull for action feedback logic: a sensor on the property can be used to detect a certain moment in the action and trigger more stuff. The property must be on float type for best results 2008-06-23 15:32:44 +00:00
Joseph Eagar
cb6fd8927c An initializer line was missing from the beginning of a loop, causing crashes. 2008-06-23 07:59:26 +00:00
Martin Poirier
7a55f52b1b Transform Snapping
Snap to edges and vertice without have to go through faces.

This means you can import floor plans and use the edges as snapping guides and other sort of fun things.

The bounding box test still needs padding though.
2008-06-22 23:21:29 +00:00
Martin Poirier
b22d3e615d Moving Line to Line intersection into arithb 2008-06-22 23:07:42 +00:00
Peter Schlaile
d229db61e9 == Sequencer ==
Renamed Filter-Y to De-Interlace and moved F-Key to D-Key.
(Also added file reload on D-Key)
2008-06-22 20:59:29 +00:00
Martin Poirier
dac3434b03 [#14398] In Object- and EditMode, global rotate manual input is different than mouse
The sign of the rotation angle was sometimes different between num input and mouse input.
2008-06-22 20:40:13 +00:00
Peter Schlaile
abda1a9ec1 == FFMPEG ==
Added serious interlacing to movies opened using ffmpeg.
(Other video decoders to be done)

Rational: deinterlacing, if done seriously _has_ to be done
in YUV-space. Since internal interface first converts data
to RGB we are pretty much lost (and fall back to IMB_filtery
in that case).
2008-06-22 20:39:41 +00:00
Campbell Barton
381f15189d bugfix, Shift+H would hide unselected objects on unseen layers. 2008-06-22 19:34:18 +00:00
Benoit Bolsee
5372def2b0 BGE patch: add state engine support in the logic bricks.
This patch introduces a simple state engine system with the logic bricks. This system features full
backward compatibility, multiple active states, multiple state transitions, automatic disabling of 
sensor and actuators, full GUI support and selective display of sensors and actuators. 
Note: Python API is available but not documented yet. It will be added asap.

State internals
===============
The state system is object based. The current state mask is stored in the object as a 32 bit value; 
each bit set in the mask is an active state. The controllers have a state mask too but only one bit
can be set: a controller belongs to a single state. The game engine will only execute controllers 
that belong to active states. Sensors and actuators don't have a state mask but are effectively 
attached to states via their links to the controllers. Sensors and actuators can be connected to more
than one state. When a controller becomes inactive because of a state change, its links to sensors 
and actuators are temporarily broken (until the state becomes active again). If an actuator gets isolated, 
i.e all the links to controllers are broken, it is automatically disabled. If a sensor gets isolated, 
the game engine will stop calling it to save CPU. It will also reset the sensor internal state so that
it can react as if the game just started when it gets reconnected to an active controller. For example,
an Always sensor in no pulse mode that is connected to a single state (i.e connected to one or more 
controllers of a single state) will generate a pulse each time the state becomes active. This feature is 
not available on all sensors, see the notes below.

GUI
===
This system system is fully configurable through the GUI: the object state mask is visible under the
object bar in the controller's colum as an array of buttons just like the 3D view layer mask.
Click on a state bit to only display the controllers of that state. You can select more than one state
with SHIFT-click. The All button sets all the bits so that you can see all the controllers of the object. 
The Ini button sets the state mask back to the object default state. You can change the default state 
of object by first selecting the desired state mask and storing using the menu under the State button. 
If you define a default state mask, it will be loaded into the object state make when you load the blend
file or when you run the game under the blenderplayer. However, when you run the game under Blender, 
the current selected state mask will be used as the startup state for the object. This allows you to test
specific state during the game design.

The controller display the state they belong to with a new button in the controller header. When you add
a new controller, it is added by default in the lowest enabled state. You can change the controller state 
by clicking on the button and selecting another state. If more than one state is enabled in the object
state mask, controllers are grouped by state for more readibility. 

The new Sta button in the sensor and actuator column header allows you to display only the sensors and 
actuators that are linked to visible controllers.

A new state actuator is available to modify the state during the game. It defines a bit mask and 
the operation to apply on the current object state mask:

Cpy: the bit mask is copied to the object state mask.
Add: the bits that set in the bit mask will be turned on in the object state mask.
Sub: the bits that set in the bit mask will be turned off in the object state mask.
Inv: the bits that set in the bit mask will be inverted in the objecyy state mask.

Notes
=====
- Although states have no name, a simply convention consists in using the name of the first controller 
  of the state as the state name. The GUI will support that convention by displaying as a hint the name
  of the first controller of the state when you move the mouse over a state bit of the object state mask
  or of the state actuator bit mask.
- Each object has a state mask and each object can have a state engine but if several objects are 
  part of a logical group, it is recommended to put the state engine only in the main object and to
  link the controllers of that object to the sensors and actuators of the different objects.
- When loading an old blend file, the state mask of all objects and controllers are initialized to 1 
  so that all the controllers belong to this single state. This ensures backward compatibility with 
  existing game.
- When the state actuator is activated at the same time as other actuators, these actuators are 
  guaranteed to execute before being eventually disabled due to the state change. This is useful for
  example to send a message or update a property at the time of changing the state.
- Sensors that depend on underlying resource won't reset fully when they are isolated. By the time they
  are acticated again, they will behave as follow:
  * keyboard sensor: keys already pressed won't be detected. The keyboard sensor is only sensitive 
    to new key press.
  * collision sensor: objects already colliding won't be detected. Only new collisions are 
    detected.
  * near and radar sensor: same as collision sensor.
2008-06-22 14:23:57 +00:00
Joshua Leung
1ee7a20b93 Compiler warning fixes (part 1 or 2) 2008-06-22 01:56:11 +00:00
Joshua Leung
86d227367b Bugfix:
Update-automatically option in IPO-Editor now updates objects using the active IPO-block as their ObAction when transforming keyframes.
2008-06-22 01:31:29 +00:00
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
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
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
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
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
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
Joshua Leung
7e095fa695 Another minor typo fix in button naming 2008-06-08 03:39:24 +00:00
Joshua Leung
96808303c0 Fix for incorrect tooltip (provided by JMS va bf-committers) 2008-06-08 02:59:14 +00:00
Campbell Barton
a2192ffa09 made the quad split-direction options force splitting since planer quads with UV distortion would get very different results depending on the split direction. 2008-06-07 22:44:18 +00:00
Campbell Barton
12461cde17 error in customdata editmesh function,
was using the active index when it should use the first index, not a big deal since CustomData_em_get_n isnt used in trunk yet.
2008-06-07 18:16:23 +00:00
Ton Roosendaal
cdd461f488 March 22 commit from Campbell to allow Lasso select in Compositor
with CTRL+LMB disabled the recently before added option to make 
a Viewer connected to a node using same hotkey.

Now both work!
2008-06-07 15:06:00 +00:00
Campbell Barton
b62955cf3e bugfix, memory leaks when getting particles and particle system loc/size/rot/life (Just remember PyList_Append adds a reference! :) ) 2008-06-06 11:00:32 +00:00
Campbell Barton
14393c9ffb bugfix - Blender.GetPaths() was returning relative paths from libraries, but with no way to access the library path the the file is relative too. Check for these cases and make them absolute.
bpath also assigned one var it didnt need to.
2008-06-06 08:58:08 +00:00
Hamed Zaghaghi
6ffadbfb10 fix 2dfilter problem on AMD64, Patches item #13626 2008-06-06 01:28:51 +00:00
Campbell Barton
49abcc980c Added shadow baking 2008-06-05 22:07:59 +00:00
Campbell Barton
f2407fec55 Apricot feature, thats fit for trunk.
Baking would split non-planer quads in an unpredictable way, which is fine for rending but game engines often use a fixed order (0,1,2), (0,2,3) or (1,2,3) (1,3,0).
Added an option to use a fixed order when baking.
2008-06-05 18:26:34 +00:00
Martin Poirier
172fe6ed2f Bugfix: [#13619] Transform Rotate and Scale Strange
view: noclip version of int and float projection. Also project from behind the view's position and return coherent values for near clipping

transform: use the above functions for 2d center and helpline drawing

NOTE: the result for centers behind the camera (in perspective) isn't 100% perfect in the case of rotations because they always use the centered view vector as rotation axis and not the one aligned with the 2d center. Changing this would not be desirable anyway. At least it's predictible now.
2008-06-05 14:49:12 +00:00
Campbell Barton
6757b759ea added checks for zero length strings when checking for the last character 2008-06-05 13:12:17 +00:00
Daniel Genrich
f35289574a BLI_kdopbvh: crashed when traversing with little faces 2008-06-05 13:02:17 +00:00
Campbell Barton
4f601b478c * python sys.cleanpath() used strstr incorrectly, resulting in paths containing a slash, always returning a path that ends with a slash.
* python Blender.GetPaths() - absolute=0 wasnt working
* BLI_cleanup_file and BLI_cleanup_file were treating the // prefix as a duplicate path, now ignores //
* BLI_convertstringcode was removing the trailing slash from a path
(tested these path functions didnt mess up with some of the peach files and with pointcache)
2008-06-05 13:02:00 +00:00
Daniel Genrich
fcdbd76625 Collisions: enabling self collision quality setting again (request by Nudel) 2008-06-05 11:08:51 +00:00
Daniel Genrich
3d51c59034 Bugfix for exploding cloth collisions 2008-06-05 10:52:52 +00:00
Campbell Barton
ded6a1c2e7 bugfix introduced in own commit 15055 - [#13621] Cloth cache files are in same directory as .blend 2008-06-05 10:43:53 +00:00
Campbell Barton
c8e19a6b25 numbutton python expression evaluation used driver dictionary, when EnableScriptlinks was disabled number
button input didnt 
work. narrow down this test to the part of the pydriver module init that uses a blender textblock as a module. This should 
should reload the pydriver dict whenever the "EnableScriptlinks" state changes. but for now working numbuttons is priority.
2008-06-04 22:32:15 +00:00
Kent Mein
fbb56ee997 Issue jms was having with # else on msvc. Seems odd but easy to fix.
Kent
2008-06-04 18:11:48 +00:00
Campbell Barton
61193cf230 svn merge -r15118:15119 https://svn.blender.org/svnroot/bf-blender/branches/soc-2008-quorn 2008-06-04 16:38:55 +00:00
Campbell Barton
e26323bcdd Python API object.parentVertexIndex - access vertex parent indicies 2008-06-04 16:19:15 +00:00
Hamed Zaghaghi
d565e8a02f bugfix #13618 - 2d filters + GLSL python scripts 2008-06-04 02:54:42 +00:00
Benoit Bolsee
772d241582 Fix BGE bug #13605: GameEngine corrupts Pose data 2008-06-03 22:54:24 +00:00
Daniel Genrich
0c0c43f620 Collision commit code cleanup for nicer compile 2008-06-03 19:06:54 +00:00
Daniel Genrich
c84c0201e1 Collisions: Commit of collision cleanup, put kdop-bvh structure into BLI_kdopbvh (just like kdtree interface now), huge speedup for selfcollisions, also better normal collisions (merge from cloth branch) 2008-06-03 18:48:54 +00:00
Joshua Leung
62ca0e07da A few compiler warning fixes. Those in BME_customdata.c were more serious. 2008-06-03 10:04:42 +00:00
Joshua Leung
29f839b4a5 Bugfix #13603:
Action Editor Copy/Paste didn't trigger a depsgraph update for the active object (if the action was applied to it).
2008-06-03 10:00:09 +00:00
Peter Schlaile
6eeef64370 == REDCODE ==
got #endif position wrong, breaking compile without redcode, sorry.
(Thanks to jms for pointing that out)
2008-06-03 06:42:13 +00:00
Campbell Barton
510d4b22ec increase the level you can zoom out (andy's timelapse videos were a pain to edit) 2008-06-03 01:01:47 +00:00
Peter Schlaile
cfd67321d2 == REDCODE ==
Forgot to free redcontext in IMB_free_anim...
2008-06-02 22:02:26 +00:00
Peter Schlaile
ca8aa8c901 == RED one (redcode) ==
This adds redcode (the file format of RED one, R3D) support to blender.
Seems to work fine with the footage I found on the web, but keep in
mind, that because of the unoptimized nature of libopenjpeg, frame
decoding isn't that fast.

It is also a rather challenging task, to make 4k-float-footage realtime :)
2008-06-02 21:35:57 +00:00
Geoffrey Bantle
8a5f362192 -> More Bmesh Custom Data stuff
Some more Bmesh custom data functions and
structures. This still does not do anything
yet because the various conversion functions
don't bother making use of the new custom data
functions. Hooking them up should be fairly
simple though.

Also note that the custom data code is mostly
copy/pasted from the existing custom data
functions for editmode with a few modifications.
Duplicating code like this isn't nice, but I
felt it was better to keep things for Bmesh
'standalone' for the moment and take only what is
immediatly needed instead of creating
a tangle of interdependant code.
2008-06-02 20:52:40 +00:00
Benoit Bolsee
1cc61f633f Patch #11000 approved: [new function] KX_GameObject::alignAxisToVect() Align an object's axis to a given vector 2008-06-02 17:31:05 +00:00
Joshua Leung
8a2a91ddfe Added missing newline for error print in Py-button expressions 2008-06-02 02:54:33 +00:00
Joshua Leung
86a0afb829 Compiler warning fixes (unused vars).
Notes:
- edgehash.c still has some weirdo code causing warnings on lines 80 and 117
i.e.  if (v1<v0) v0 ^= v1 ^= v0 ^= v1;
- material.c (in pyapi) apparently doesn't seem to be making use of some functions for glossy stuff
2008-06-02 01:02:08 +00:00
Geoffrey Bantle
85e77e53ef -> Fix for last few commits
New memory allocator broke compilation on
GCC/Linux. Fixed
2008-06-01 18:43:22 +00:00
Geoffrey Bantle
33321d13d3 -> Beginning of Custom Data support for BMesh
Now that new allocator is in place, Custom Data
can be effeciently added to BMesh. The plan is to
make all data not directly related to topology
Custom Data and allow callers to decide precisely
what information a mesh should have in order to
make the best tradeoff between memory usage/speed.

Right now not much to look at, just some structure
definitions and commented out code. More to come
soon...
2008-06-01 18:02:29 +00:00
Geoffrey Bantle
07b1608fbe -> New memory allocator for Bmesh
Added a new pooling allocator for Bmesh based upon
the pool allocator availible in the Boost C++ library
as described here:

http://www.boost.org/doc/libs/1_34_0/libs/pool/doc/concepts.html

Each pool allocates elements of a fixed size, so every
element type in a mesh gets its own pool. For instance
verts occupy a different pool than edges. Each pool
is comprised of multiple arrays of a fixed size and allocating
/freeing elements is simple as removing or adding a head 
to a linked list. Since the list of free elements is interleaved
throughout the unused space in the arrays, the overhead
for storing the free list is only 1 pointer total per pool.
	
This makes building/destroying bmesh structures much faster
and saves quite a bit of memory as well.
2008-06-01 17:15:03 +00:00
Campbell Barton
652ee1e31b functionality fix
Originally the only way to run scripts automatically was with scriptlinks, which could be disabled for loading untrusted blend files.
Since then PyDrivers and PyConstraints would run even when G.f&G_DOSCRIPTLINKS was disabled.
Gensher, Theeth and Ianwill agree its acceptable to reuse the flag for other areas python runs automatically.

PyNodes still have no way to be disabled, (todo before 2.46a)
2008-06-01 16:13:04 +00:00
Peter Schlaile
8937989a91 == FFMPEG ==
Shouldn't crash any more in the case that
a) invalid video options were selected
and
b) audio multiplexing was active

[#13311] video_stream NULL when writing ffmpeg

(did'nt crash for me though, but added extra protection :) )
2008-06-01 14:37:09 +00:00
Campbell Barton
c0199e192d bugfix (typo) [#13587] Python API Material.sssFront broken 2008-06-01 13:18:26 +00:00
Geoffrey Bantle
26cb5fa0db -Fix for bug #13067
Bevel tool was hanging on certain geometry where the edge
to be beveled was shared by two faces that had more than
one edge in common and caller was not checking return
status of Bmesh eulers. Fixed.
2008-06-01 01:56:35 +00:00
Campbell Barton
edd2b6ca73 bugfix for own error
[#13588] Python API Material.sssRadiusBlue broken
2008-06-01 01:49:11 +00:00
Daniel Genrich
74903b77f4 Merging revisions 15020-15073 of https://svn.blender.org/svnroot/bf-blender/trunk/blender 2008-05-31 21:23:57 +00:00
Campbell Barton
526d9cc5fc bugfix for own error
glitch when typing in / would ask the user to make a new directory. the last shash was being removed, then the "" path didnt exist and 
asked to create it.
2008-05-31 19:08:12 +00:00
Campbell Barton
c6528b3cd4 bufgfix for [#13584] SIGSEV in fluid bake with large amount of small fluid objects
the maximum number of objects (255) wasnt being checked, added a check before baking.
also changed bakeing to use G.scene->base rather then G.main->objects since these can be in other scenes, from linked 
groups, or used only by python so they should not be used for baking. it also meant having a domain in 2 scenes would fail with an error.

Nils, could be good to have a dynamic number of bakeable objects.
2008-05-31 19:01:14 +00:00
Campbell Barton
32de0da6df bugfix
* [#13394] Sequencer: if internal strips have handles selected, dragging the metastrip changes the meta length
* Extend did not work correctly on metastrips when the nested seq's are out of the meta's frame range, added an argument to seq_tx_get_final_left/right 
that returns the frame clipped by metastrip(s) if any.
2008-05-31 16:22:07 +00:00
Campbell Barton
57270125d8 bugfix for own error, introduced when running scripts were saved with the blend file.
a script error with a script that has an interface would not stop the interface from running again immediately, causing an annoying 
error message loop.
2008-05-31 12:12:03 +00:00
Willian Padovani Germano
5c1acc5ced == PyNodes ==
Bug #13277, reported by Juho (bebraw) Vepsalainen (thanks!) - a typo made pynodes w/o input socket definitions fail with an out of range error when accessing the output sockets in the script.
2008-05-30 20:04:52 +00:00
Kent Mein
791510f690 This is patch [#9057] Updated doc string to match current defines
also submitted by gsr

It just updates a comment to correct values.

Kent
2008-05-30 19:52:42 +00:00
Kent Mein
0caf1573d5 This is patch [#9053] More concrete makesdna reporting
Submitted by gsr

It just makes the printf's all different so you can tell where the problem
is.

Kent
2008-05-30 19:46:48 +00:00
Martin Poirier
2eb897e6db Fix crash with hidden bezier handles
See Cambo, that's why we have module owners.
2008-05-30 09:05:09 +00:00
Campbell Barton
da2d4904af bugfix
* scene.object.context and scene.object.selected had broken get_item 
funcs so scene.object.context[i]  returned the wrong object.
* aligning the view to an object (numpad*key), did not disable the 
ortho view grid.
* long standing problem where opening a relative image would fail with 
no message. BLI_convertstringcode was returning a path with /../../'s 
that need to be cleaned before the path could be read, the path was also 
invalid from unix shell so its not a blender path reading problem.
2008-05-30 01:59:15 +00:00
Martin Poirier
8e46d777f3 Transform Orientations
Edit Bone and Pose Bone can now be used as transform orientations

Also fix a bug with CTO comming from non-uniformally scaled meshes.
2008-05-29 19:10:09 +00:00
Daniel Genrich
f1d54f892b -= Collisions =-
Getting some weird results on moving fast edges. This is a backup commit, will try another thing
2008-05-29 14:23:08 +00:00
Joshua Leung
fe7b591280 Another bugfix for Fill Bone Between Joints. Changed the order that bones are created between 'head'/'tail' points 2008-05-29 06:14:53 +00:00
Joshua Leung
e015796b36 Fill Bone Between Joints:
This tool now parents the newly created bone to whichever bone acted as it's 'head' point. It also sets the connected-to-parent flag.
2008-05-29 01:04:12 +00:00
Janne Karhu
a17f322dd0 Bug fix: [#13268] Crash when creating a new particle system
-Ugh.. sorry about that.. damn default cube with it's default material!
2008-05-28 23:38:40 +00:00
Campbell Barton
1a5181c9c7 bugfix for own bug. mousewheel while playing in the sequencer crashes blender. 2008-05-28 21:15:40 +00:00
Brecht Van Lommel
04067c1833 Fix for bug #13224: vertex parenting didn't work correct with
multiple unconnected curves.
2008-05-28 18:11:45 +00:00
Brecht Van Lommel
9a19c5c8fe Fix for bug #13230: particle mirror could fail on some faces. 2008-05-28 17:55:06 +00:00
Brecht Van Lommel
d49d0e174e Small fix for last AO sphere sampling bugfix, didn't update
random sampling code as well.
2008-05-28 17:42:03 +00:00
Janne Karhu
9a3b25d8a0 Fix for bug: [#11680] "Col" option for particle systems does not work correctly with Mat IPOs
-the feature simply was not coded
2008-05-28 17:16:43 +00:00
Campbell Barton
c6668755ff bugfix for baking AO with greater then 16 samples, since it was being clamped in sphere_sampler but not in ray_ao_spheresamp that calls it. giving uneven art deco
results.
2008-05-28 17:13:15 +00:00
Campbell Barton
b36a358c1b bugfix
* python api render() would clamp the endframe to a short.
* python api's render() and renderAnim() would not render compositing because the name they gave to RE_NewRender was NOT G.scene->id.name, added comments to 
G.scene->id.name
2008-05-28 00:44:41 +00:00
Daniel Genrich
6a802f63b6 Merging revisions 14946-15020 of https://svn.blender.org/svnroot/bf-blender/trunk/blender 2008-05-27 23:15:08 +00:00
Daniel Genrich
ed42c9a676 -= Collisions -=
1. Test for fast moving edges
2008-05-27 22:46:57 +00:00
Daniel Genrich
da36e8abca -= KDOP / Collisions =-
1. Fix for face with index=0 not handled
2008-05-27 22:42:38 +00:00
Martin Poirier
c1874b3cee [#10223] a new object function to add vertex group from an armature
Patch from Jean-Michel Soler (with slight modifs)

Small BPy feature to help script writers deal with armatures and vertex groups (calls the bone heat method to create and assign groups)
2008-05-27 20:02:38 +00:00
Brecht Van Lommel
83a7fbf499 Another fix for bug #11140: explode modifier was still using more
memory than needed.
2008-05-27 15:36:36 +00:00
Brecht Van Lommel
c25b845abe Fix for bug #12463: hair didn't draw z-buffered in wireframe mode.
Instead of making it an exception compared to other objects which
don't draw z-buffered either, it now draws without lighting in the
wire color like it did before.
2008-05-27 13:26:52 +00:00
Brecht Van Lommel
4fd54681fc Fix for #12526: still didn't get dupli transform in envmaps correct. 2008-05-27 11:05:33 +00:00
Brecht Van Lommel
027b9a7e96 Fix for bug #12533: color picker didn't always redraw rgb/hsv/hex values. 2008-05-27 11:01:31 +00:00
Brecht Van Lommel
eb26992c25 Fix for bug #12806: compositor nodes with use nodes disabled
didn't properly redraw the node window on changes.
2008-05-27 09:41:43 +00:00
Campbell Barton
54572ccc22 bugfix for view naming, pressing numpad5 would clear the V3D_OPP_DIRECTION_NAME flag even though it wont switch the view direction. 2008-05-27 08:51:47 +00:00
Campbell Barton
c0a40125bb bugfix, copy posebone constraints didnt update properly, canceling transform would not reset the bone back to its original state. need to set teh flag "ob->pose->flag |=
POSE_RECALC", which is alredy done on adding a constraint.
back 
to
2008-05-26 20:43:35 +00:00
Stephen Swaney
a2298cb980 bugfix for crasher from Cedric Paille via bf-committers. 2008-05-26 15:12:20 +00:00
Martin Poirier
ae2a0bb273 Bug fix
Force proportional editing flag off in object mode.

While it didn't have any effect on objects themselves, it could display the falloff mode (Smooth) in the header. The bug was purely cosmetic.
2008-05-26 12:52:28 +00:00
Campbell Barton
3b4873250e when cyclic is enabled the knots would always be generated with uniform nurbs but after, cyclic nurbs would be incorrect if the bezier or endpoint u/v was set.
also replaced some numbers with constants.
2008-05-26 12:50:00 +00:00
Daniel Genrich
391c7615d1 -= Collisions =-
1. fix for collisions (were working better with selfcolls enabled, now generally better)
2008-05-26 10:36:14 +00:00
Campbell Barton
0a90a52442 * The displist would be uninitialized when nurbs bezieru/v was set and the order wasnt 3 or 4. add a function that checks nurbs can produce a valid line. check_valid_nurb_u/v
* when check_valid_nurb_u/v fails, no curve is allocated or drawn.
* knotsu/v could be NULL but some functions didn't check for this, make sure this is checked for everywhere.
* The interface didnt change check the order when the bezier u/v flag was set, added functions clamp_nurb_order_u/v that takes into accound the number of points and the bezier u/v flag.
2008-05-26 09:50:46 +00:00
Daniel Genrich
cb378cbceb -= Cloth =-
1. Fix selfcollisions (reported by nudelZ)
2008-05-26 09:39:32 +00:00
Campbell Barton
b7c6da39ae the last selected nurbs curve lastnu could become an invalid pointer in places, access this via functions now and store an index
rather then a pointer so if it becomes invalid it will just return a NULL pointer.
2008-05-25 23:05:13 +00:00
Diego Borghetti
5263021aa8 Commit patch #9059 by gsrb3d
Unnecesary include path in Makefile.
2008-05-25 21:11:34 +00:00
Martin Poirier
7f6fc12d8c Bug fix in X-Mirror for armatures
When a bone in a mirrored chain wasn't named properly, it would leave the head or tail in an invalid state.

Now it applies the mirror to connected joints that are mirrored.
2008-05-25 21:05:13 +00:00
Campbell Barton
b306aaccb9 patch [#11491] Fix for bug 11362: Blender.Draw.Image() method does not clip properly
fixing [#11362] Blender.Draw.Image() method does not clip properly
also return silently on zero zoomlevel rather then raising an error, only raise an error on negative values.
2008-05-25 16:39:57 +00:00
Peter Schlaile
20b4bf4aba == Sequencer ==
Fixes
[#12106] Memory leak in sequencer (>10MB/frame)

in parts: inner contents of meta strips are freed up after calculation
making more room for the cache.

Actually have to think of a mechanism, that remembers, which output
frames are asked for and caches only those.
2008-05-25 16:07:32 +00:00
Martin Poirier
03ccc38ddf [#11124] Hide Threshold button when Constant QMC sampling enabled
Patch by Olivier Saraja
2008-05-25 14:39:55 +00:00
Benoit Bolsee
da1f38f99d Apply BGE patch 11137: Render objects with negative scaling correctly (as in Blender) 2008-05-25 14:37:39 +00:00
Daniel Genrich
2666ff7075 -== kdop ==-
1. fix crash on collision
2008-05-25 14:34:03 +00:00
Martin Poirier
f680b56ebf [#11119] Tool tips correction
Patch by Olivier Saraja
2008-05-25 14:32:59 +00:00
Daniel Genrich
fcea4573dd -== Cloth / kdop ==-
1. Bugfix for crash on enabling cloth on object
2. Correcting kdop nth element sorting function (fix provided by André Pinto)
2008-05-25 13:15:54 +00:00
Benoit Bolsee
e2a9590a15 BGE patch: rename rayCastToEx() to rayCast() - better name 2008-05-24 22:50:31 +00:00
Benoit Bolsee
cc6dac8c42 BGE patch: add rayCastToEx(), an extended version of rayCastTo() for use in game script 2008-05-24 18:06:58 +00:00
Benoit Bolsee
7f10f5f66f fix BGE bug #8646: unusable anaglyph settings
The best rules for stereo rendering are now applied to Blender. Here is the new situation:
1) The focal distance is now settable through the GUI: select the camera (each camera can have a different setting) and go to the camera data (F9): the "Dof Dist" and "Dof Ob" can be used to set the focal distance for that camera. The "Dof Ob" is interesting because it sets the focal distance so that the center this object will appear at the surface of the screen when running the game.
2) The eye separation is automatically set to focal_distance/30, which is considered to be a reasonable value. If you need a different value, you can always use Python scripting. 

Notes: 
- If you switch camera during the game, the focal distance will also change unless you have set the focal distance by scripting, in which case it overwrites the focal distance setting of all cameras.
- If you don't set the focal distance in the camera data or by scripting, the default value will be used. The default value corresponds more of less to the near clipping plane which means that all the objects will be very far with little 3D effect.
- If you don't set the eye separation by scripting, it is automatically computed as focal_distance/30, regardless on how the focal distance was set.
2008-05-24 08:34:04 +00:00
Daniel Genrich
10dde9b7d7 Merging revisions 14838-14945 of https://svn.blender.org/svnroot/bf-blender/trunk/blender 2008-05-23 20:36:05 +00:00
Daniel Genrich
4bf01e8162 Commit of selfcollisions using new kdop design. Should result in nice speedup. 2008-05-23 20:20:14 +00:00
Willian Padovani Germano
5f70682f6a == PyNodes ==
Fixing bug #11737 reported by Daniel Salazar (Zanqdo, thanks!): assigning as pynode a text that failed to parse as a pynode script, then deleting that text would crash Blender.

http://projects.blender.org/tracker/?func=detail&atid=125&aid=11737&group_id=9
2008-05-23 16:31:02 +00:00
Joshua Leung
18abce25e5 Typos and whitespace tweaks 2008-05-23 11:12:03 +00:00
Brecht Van Lommel
02c4866d04 Fix for bug #12526: object instancing didn't restore matrices
correct for envmap, could give objects rendering in the wrong
position.
2008-05-23 10:06:06 +00:00
Campbell Barton
b46bdbcd0f fix for "[#11004] Adding ram sound and alt-U causes ram to look like HD sound and can lead to crash"
Missing call sound_initialize_sounds, cant be added BKE_reset_undo since its in blenderkernel.
2008-05-23 09:58:33 +00:00
Brecht Van Lommel
b6ab784c12 Fix for bug #12473: crash converting old particle system from
a linked file.
2008-05-23 09:23:57 +00:00
Campbell Barton
f9e81a6f3a fix for [#12218] Impossible to exit meta strips with hotkey
Only enter mesta's that are active and selected, inconsistent with editmode in the 3D view, but editmode dosnt deal with 
nested data.
2008-05-23 08:58:44 +00:00
Joshua Leung
b4573a0c4b Bugfix #12508:
Action Editor Border Select Channels no longer selects bones
2008-05-23 04:54:16 +00:00
Brecht Van Lommel
b7aeda4ff8 Fix for bug #11895: databrowse for image painting clone image didn't work. 2008-05-22 17:32:15 +00:00
Brecht Van Lommel
7bae2af95c Fix for bug #11698: mesh deform modifier not working on extruded curves.
The modifier work on the tesselated result rather than the curve itself.
2008-05-22 17:06:46 +00:00
Brecht Van Lommel
1b00877051 Fix for bug #12077: tangent shading (which only affects specular) made
bump mapping not work for diffuse.
2008-05-22 15:30:35 +00:00
Brecht Van Lommel
5463828bd2 Fix for part of bug #12075: gamma node generated nan's on negative input. 2008-05-22 14:56:32 +00:00
Martin Poirier
99a2e7e92e Comments!!1 2008-05-22 14:12:09 +00:00
Brecht Van Lommel
abb247ac35 Fix for bug #11743: incorrect transformation for particle group
visualization DupliGroup option.
2008-05-22 14:08:13 +00:00
Brecht Van Lommel
be1cb6e5e2 Fix for bug #11758: crash cancelling hair softbody bake.
Fix for bug #11966: crash in hair softbody with hair amount 0.
2008-05-22 13:58:16 +00:00
Brecht Van Lommel
5cf41da316 Fix for bug #12334: the Disable Tex option didn't disable
textures for the Texface material option.
2008-05-22 13:46:05 +00:00
Martin Poirier
a4688b24dc Transform Orientations
Normal orientation for editbones (was previously missing)
2008-05-22 09:22:00 +00:00
Campbell Barton
02f34de2b9 add missing flags for NLA strips 2008-05-21 19:24:35 +00:00
Campbell Barton
e1b298cad8 scene frames scene.render.cFrame,sFrame and eFrame were being treated as shorts. (which clamped them to 37856) 2008-05-21 12:14:52 +00:00
Campbell Barton
adbbc314ba testbreak was not working after the first use 2008-05-21 11:06:49 +00:00
Martin Poirier
fc56e8d432 Bone Extrusion Bug
Extruding from root would incorrectly set the Connected flag when it wasn't needed.
2008-05-21 10:14:02 +00:00
Martin Poirier
780c971b53 [#12103] Force field moves when strength changes
Wind effects would modify the center vector, so the limit sphere was drawn from the position of the last "wind ring"
2008-05-21 10:11:10 +00:00
Martin Poirier
d432eccd14 [#11892] track-to + "around selection" bug
Transform conversion was resetting constraints when used to calculate orbit center.

This is a tentative fix, it fixes this particular case but maybe not all.
2008-05-21 10:07:38 +00:00
Martin Poirier
68708346de [#11748] Bevel tool not snapping when holding down ctrl and adjusting value
Added proper gear support and fixed some misc errors in the setup of this transformation (negative values hav no effect, so use absolute value and other small things like that)
2008-05-21 10:02:07 +00:00
Peter Schlaile
38ffd41bf0 == Sequencer ==
This fixes:
[#11745] Blender crashes when changing Scenes on Sequencer`s Strips

containing:

- last_seq was set to null by scene-render
- button handling wasn't very robust (didn't check for null)
- REDRAWBUTSSCENE was missing
2008-05-20 21:30:16 +00:00
Campbell Barton
92c9ae280c replacing epydoc generation script with one copied from bpy docs 2008-05-20 05:55:12 +00:00
Campbell Barton
195abc755b more updates to docs 2008-05-19 13:34:43 +00:00
Campbell Barton
f32d99c322 some updates to epy docs 2008-05-19 09:54:38 +00:00
Peter Schlaile
591a478670 == Sequencer ==
This fixes:
[11750] "Translate" stops working when offset > image size
2008-05-19 06:14:57 +00:00
Campbell Barton
c526b1b2df memory corruption error fix when changing orderU/Vs with curves, this could crash blender or make odd display lists.
the problem was that the buttons would use the first nurb if there was no 'lastnu', but the makeknots function only checked for lastnu. this meant the knots would not get re-allocated on 
values would be written outside the array.
2008-05-18 18:44:02 +00:00
Ton Roosendaal
055dc10c14 Last part of the svn release commit. It's now in freeze... unless? 2008-05-18 18:05:55 +00:00
Jean-Luc Peurière
24c8d15446 temptative fix for the ndof bug
if vd.dist is null at a wrong time,
retore to last known good value
2008-05-18 16:00:13 +00:00
Ton Roosendaal
3effe8060d Fix in mball last May 15th causes a hang (eternal loop) in mball.c,
a division by zero was not handled

(weird though, only shows in OSX PPC. no optimize, debug build.)
2008-05-18 13:57:47 +00:00
Joshua Leung
54be27b40e Bugfix #11738:
PoseLib Preview crashed when there was no active pose as there were no poses at all (i.e. on a newly created Pose Library) .
2008-05-18 10:41:42 +00:00
Ton Roosendaal
aba4f31086 Bugfix 11736
CTRL+Click on "load" for image node crashed.
NULL pointer test missing...
2008-05-18 07:30:51 +00:00
Campbell Barton
d3f7fba472 fix for [#11691] No checks in curve code for "Number of points <= Order U"
added checks for a nurbes orderu being larger then pntsu.
This has the same effect as the curve having only 1 point. (its display list is not generated 
but it is still added but a dummy displist with zero points is made)
memcpy was also being used where the memory overlaped (probably worked in most cases but this is incorrect and valgrind complained), use memmove 
instead.
2008-05-17 22:37:34 +00:00
Brecht Van Lommel
81dee8e1dd Fix for mistake in recent interface bugfix commit. 2008-05-17 13:41:34 +00:00
Joshua Leung
bb6c67cc73 Bugfix #11717:
Rendering (Internal/OGL) would crash when StampInfo was on and adding info about the active camera, if there was no camera in the scene.
2008-05-17 00:35:30 +00:00
Campbell Barton
4100695f38 root level python tree menu's didnt work with seperators, would display SEPR text instead 2008-05-16 21:34:22 +00:00
Peter Schlaile
9b2dcab02d == Sequencer ==
This fixes: [#11642] VSE: crash with Speed Control and play head

Special sequence update (holding down left mouse button on a strip)
could lead to a crash when using the speed control effect, since
we didn't check properly for valid cfras (and therefore if
TStripElem is null... )
2008-05-16 21:04:06 +00:00
Willian Padovani Germano
bbe32118ef == Nodes ==
- "Memoryblock free: attempt to free NULL pointer" messages related to the Material node (Add->Input->Material). Deleting it and quitting Blender would bring 2 or 3 of these warnings. Trivial fix (check if NULL) in blenkernel/intern/node.c, though Nodes devs may be interested. Found while testing to fix the following bug:

== PyNodes ==

- Bug #11715 reported by Alexanter Feterman:

http://projects.blender.org/tracker/?func=detail&atid=125&aid=11715&group_id=9

Adding a Dynamic node and setting it to a pynode script would crash Blender if no Material Node (MatNode) was present.

Thanks Alexander for reporting and Brecht for assigning it to me.
2008-05-16 20:57:06 +00:00
Brecht Van Lommel
9ed039efe0 Fix for two UI glitches:
Bug #11711: particle start frame could get NaN value.
Bug #11714: x-axis mirror button didn't work.
2008-05-16 17:36:06 +00:00
Martin Poirier
952a0042ea [#5743] Rotate dosnt work at high zoom
More precision added to previous fix through linear approximation of the angle at really small angle values.
2008-05-16 13:13:20 +00:00
Martin Poirier
ff84d868a1 [#11706] Camera IPO Lag
Broken in revision 14473

Camera IPO needs a special exception to be done earlier than others, that was removed in that revision.

I added a better comment to make sure nobody removes it again, unless they really understand what's happening.
2008-05-16 10:20:30 +00:00
Brecht Van Lommel
1e1ece8025 Fix for bug #11682: active render vertex color not respected correctly. 2008-05-16 09:55:09 +00:00
Ken Hughes
584d84eafd Remove PLATFORM_LINKFLAGS for makesdna, was breaking debug builds with MSVC8. 2008-05-15 23:33:30 +00:00
Campbell Barton
ec253c3918 own error, off by 1 with string allocation 2008-05-15 23:16:42 +00:00
Brecht Van Lommel
9df0d227cb Fix for bug #11676: the Spread value for particles does nothing, as
far as I can see it would only do something if child particles could
be emitted from volume, so removed the button for now.
2008-05-15 20:45:02 +00:00
Brecht Van Lommel
7df859fb95 Fix for bug #11389: edgesplit modifier crash after subsurf when
no edges were being split.
2008-05-15 20:07:07 +00:00
Campbell Barton
98c54a91b7 fix for [#11597] 2.46R5 and probably problem of all 2.46Rx - UNPREDICTED DRAW sculpt brush
front and back face test was reversed. This problem still shows up when sculpting from the inside of a mesh, but this 
cant be worked around unless its know which faces are visible or not. (tried some different workarounds but this 
seems acceptable)
2008-05-15 19:49:34 +00:00
Brecht Van Lommel
a6e18574b8 Fix for bug #11650: removing uv layers in editmode did not work correct.
Fix for bug #11661: bake to viewport uv layer instead of render uv layer.
2008-05-15 19:40:09 +00:00
Jiri Hnidek
ba6c6854ed Last bug fix of #10999. This should finaly work (tested by jesterking). 2008-05-15 19:30:30 +00:00
Campbell Barton
6e7744451b Sculpt buttons had their events set to zero, this mean clicking on buttons would pass through to 3D view and sculpt, use B_NOP instead.
Opening many panels would print an error in the console, show an error message now so users dont get confused.
2008-05-15 14:44:39 +00:00
Campbell Barton
20ff5bdc34 changing between libraries with the append/link library selector didnt re-read a new blend file when it alredy had one loaded.
it looks like this only ever worked for the first library selected.
2008-05-15 13:18:56 +00:00
Joshua Leung
2f1cca9528 Bugfix #11293: IPO-Driver Links Lost on Renaming Bones
IPO's were not being checked for drivers that linked to bones that were renamed when fixing dependencies after renaming bones. Note: PyDrivers will not benefit from this.
2008-05-15 08:05:56 +00:00
Peter Schlaile
34a1d92579 == FFMPEG ==
Added additional entry, so that ffmpeg encoding options can
be added using their name instead of "the menu(tm)".
2008-05-15 06:47:54 +00:00
Benoit Bolsee
a6a4b78417 Fix BGE bug #7532: TrackTo Actuator does not work correctly if it has a Vertex Parent. This is only a partial fix: the user must put the parent vertex at the center of the parent object and disable the physics on the tracking object (use empty or collision free object). 2008-05-14 20:22:57 +00:00
Campbell Barton
d1b04a3a9d forgot to use the thread setting function for rendering. (was only used for baking) 2008-05-14 16:49:33 +00:00
Campbell Barton
540c0e0795 uvcalc_lightmap would raise an error on meshes with no faces.
auto-threads wasnt working for baking.
2008-05-14 16:40:25 +00:00
Daniel Genrich
b64eeda588 svn merge -r 14810:14838 https://svn.blender.org/svnroot/bf-blender/trunk/blender 2008-05-14 16:14:40 +00:00
Daniel Genrich
4d8b5587b8 Pre merge commit (includes commented moving stuff) 2008-05-14 16:09:56 +00:00
Martin Poirier
b65d4f95fc Missing hotkey in menu for Align to Transform Orientation 2008-05-14 14:53:12 +00:00
Brecht Van Lommel
7806a44134 Minor particle system fixes:
- Changed some tooltips.
- Refresh with reactors and shared particle settings.
- Copying of child particles.
2008-05-14 13:30:36 +00:00
Martin Poirier
d1e1332e07 Final fix fo revision 14827
Fixing UV Quad Constraint when cancelling transform. Also, transdata conversion is a bit faster for all UV transforms.

Patch by Cambo, reviewed and revised.
2008-05-14 12:24:38 +00:00
Martin Poirier
c56f484da8 == Transform orientation bugfix ==
Fallback to global if the selected orientation doesn't exists.

This only happens when switching between scenes or screens(orientations are per view3d)
2008-05-14 09:30:27 +00:00
Joshua Leung
9fdb4965a3 NLA and IPO now have the "AfterTrans Keyframe" option that prevents the creation of duplicate keyframes after transform. 2008-05-14 09:00:22 +00:00
Daniel Genrich
83c2acccfb stupid me - i left the wrong line in. 2008-05-13 22:30:59 +00:00