Commit Graph

82 Commits

Author SHA1 Message Date
Jorge Bernal
1bf87fa26c BGE: TrackTo actuator: increasing up & track axis options
This is related to Task T34861 to increase up & track axis options for TrackTo actuator. I've just added it to differential to facilitate an easier review.

With the patch applied you can select X, Y and Z axis for the Up axis, and X, Y, Z, -X, -Y and -Z for the track axis.

Related to the implementation I have used the algorithm from Trackto constrain placed in constrain.c but adapted to be used with MOTO library.

The wiki docs are here (http://wiki.blender.org/index.php/User:Lordloki/Doc:2.6/Manual/Game_Engine/Logic/Actuators/Edit_Object#Trackto_Actuator).

Test file is here: {F97623}

I have also uploaded 2 screenshots showing the UI modifications to the TrackTo actuator:

{F91992} {F91990}

Reviewers: moguri, dfelinto

Reviewed By: moguri

CC: Genome36

Differential Revision: https://developer.blender.org/D565
2014-07-14 18:30:27 -07:00
Bastien Montagne
ab2c273b12 Added GPL header to sconscripts!
Also changed shebang to '#!/usr/bin/env python', this is more portable across unixes...
2012-12-17 08:01:43 +00:00
Campbell Barton
4a04f72069 remove $Id: tags after discussion on the mailign list: http://markmail.org/message/fp7ozcywxum3ar7n 2011-10-23 17:52:20 +00:00
Campbell Barton
09da9d4393 cmake maintenance
blender_add_lib now takes a separate include argument to suppress warnings in system includes (mostly ffmpeg & python).
also only build wm_apple.c on apple+carbon configuration.
2011-05-31 01:15:44 +00:00
Nathan Letwory
b07988274e doxygen: intern/moto tagged. 2011-02-25 11:49:19 +00:00
Campbell Barton
89c617a116 remove nan-makefiles 2011-01-30 15:29:22 +00:00
Campbell Barton
5e382eb8e5 rename blenderlib to blender_add_lib 2010-12-22 23:09:30 +00:00
Campbell Barton
afacd18498 use lowercase for cmake builtin names and macros, remove contents in else() and endif() which is no longer needed. 2010-12-08 08:43:06 +00:00
Campbell Barton
e8397e6193 include headers in cmake source, added a script to check for consistency, reporting missing headers & C files.
this is important so IDE's using CMake integration always get blender headers. - QtCreator & MSVC for eg, probably others too.
2010-11-29 04:35:56 +00:00
Campbell Barton
f383e2e0e6 Remove msvc build files which are not needed anymore. 2010-10-23 15:14:54 +00:00
Campbell Barton
c6976e7351 use explicit file paths for CMake rather then globing, This is recommended by cmake devs.
globbing vs explicit is discussed here.
http://www.cmake.org/pipermail/cmake/2008-December/025694.html

Practical implications are:
- developers need to keep CMakeLists.txt files up to date.
- Users wont get strange linking errors if they build after a file is added, since CMake detects CMakeLists.txt is modified and automatically reconfigure.
2010-10-23 04:05:55 +00:00
Nathan Letwory
a293f76cdf Use DEBUG instead of NDEBUG 2010-10-18 06:52:10 +00:00
Campbell Barton
dea59cc5eb warning fixes and minor cmake changes. 2010-09-18 03:55:56 +00:00
Campbell Barton
4b40d73bfb rename most scons build targets to match cmake 2010-08-25 04:30:47 +00:00
Campbell Barton
6464718083 rename some cmake build targets 2010-08-24 04:29:23 +00:00
Campbell Barton
8f1500da00 remove config.h references, was added for automake build system rev around 124-126 but isnt used by any build systems now. 2010-04-18 10:28:37 +00:00
Campbell Barton
081c1205a3 correct fsf address 2010-02-12 13:34:04 +00:00
Nathan Letwory
46487ad59e == COLLADA ==
* fix win64 build and add proper library usage for COLLADA 64bit. Update also lib/win64 (r24263).
2009-11-02 23:55:04 +00:00
Benoit Bolsee
1483fafd13 Merge of itasc branch. Project files, scons and cmake should be working. Makefile updated but not tested. Comes with Eigen2 2.0.6 C++ matrix library. 2009-09-24 21:22:24 +00:00
Nathan Letwory
9216efcba2 == SCons ==
* bring back 'player' libtype, after investigation with ideasman.
  scons/mingw works nicely, for some reason msvc fails to link still, will look further into it.
2009-09-05 01:58:02 +00:00
Campbell Barton
eb22a7b210 PyRNA API support for matrix types as Mathutils matrix (with callbacks) rather then a generic rna sequence of floats.
Any 3x3 or 4x4 rna matrix will automatically be returned as a Mathutils matrix.
This makes useful stuff like multiplying a vector location by an object matrix possible.
 ob = bpy.data.scenes[0].objects[0]
 print (ob.data.verts[0].co * ob.matrix)

Also added mathutils matrix types to the BGE GameObject.localOrientation, worldOrientation

* MT_Matrix3x3 added getValue3x3 and setValue3x3, assumed a 4x3 float array.
* KX_GameObject.cpp convenience functions NodeSetGlobalOrientation, NodeGetLocalOrientation, NodeGetLocalScaling, NodeGetLocalPosition.
* 2.5 python api now initializes modules BGL, Mathutils and Geometry
* modules py3 PyModuleDef's use PyModuleDef_HEAD_INIT, rather then {}, was making msvc fail to build.
* added macros for Vector_ReadCallback, Vector_WriteCallback etc. to check if the callback pointer is set before calling the function.
2009-06-23 13:34:45 +00:00
Brecht Van Lommel
874c29cea8 2.50: svn merge https://svn.blender.org/svnroot/bf-blender/trunk/blender -r19323:HEAD
Notes:
* blenderbuttons and ICON_SNAP_PEEL_OBJECT were not merged.
2009-04-20 15:06:46 +00:00
Chris Want
77e0199dc3 Makefile updates for Blender 2.5 (from GSR) 2009-03-19 01:50:45 +00:00
Nathan Letwory
eb186d18dc 2.5 / SCons
Blender builds and links on Linux. For now without BGE and its player, 
but that will come. Priorities are still a mess, so expect more commits 
soon.
2008-12-23 20:13:31 +00:00
Nathan Letwory
93d9e7749d 2.5 / SCons
I did a very drastic cleanup for the different libgroups, there's now only a few left. It compiled with scons/msvc, will be testing in a bit on linux, too.
If you get any problems, please reply to this commit message on the taskforce ML.
2008-12-23 16:07:24 +00:00
Brecht Van Lommel
bdfe7d89e2 Merge of trunk into blender 2.5:
svn merge https://svn.blender.org/svnroot/bf-blender/trunk/blender -r12987:17416

Issues:
* GHOST/X11 had conflicting changes. Some code was added in 2.5, which was
  later added in trunk also, but reverted partially, specifically revision
  16683. I have left out this reversion in the 2.5 branch since I think it is
  needed there.
  http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=16683
* Scons had various conflicting changes, I decided to go with trunk version
  for everything except priorities and some library renaming.
* In creator.c, there were various fixes and fixes for fixes related to the -w
  -W and -p options. In 2.5 -w and -W is not coded yet, and -p is done
  differently. Since this is changed so much, and I don't think those fixes
  would be needed in 2.5, I've left them out.
* Also in creator.c: there was code for a python bugfix where the screen was not
  initialized when running with -P. The code that initializes the screen there
  I had to disable, that can't work in 2.5 anymore but left it commented as a
  reminder.

Further I had to disable some new function calls. using src/ and python/, as
was done already in this branch, disabled function calls:
* bpath.c: error reporting
* BME_conversions.c: editmesh conversion functions.
* SHD_dynamic: disabled almost completely, there is no python/.
* KX_PythonInit.cpp and Ketsji/ build files: Mathutils is not there, disabled.
* text.c: clipboard copy call.
* object.c: OB_SUPPORT_MATERIAL.
* DerivedMesh.c and subsurf_ccg, stipple_quarttone.

Still to be done:
* Go over files and functions that were moved to a different location but could
  still use changes that were done in trunk.
2008-11-12 21:16:53 +00:00
Benoit Bolsee
61a83d2fba Add MSVC90 project files - part 3. Extern and Intern projects are merged in projectfiles_vc9\blender\blender.sln solution, you just need to open that solution to compile everything with VS2008. 2008-11-10 21:22:22 +00:00
Benoit Bolsee
8eec6cecc0 Add MSVC90 project files - part 1. 2008-11-10 15:36:58 +00:00
Brecht Van Lommel
cb89decfdc Merge of first part of changes from the apricot branch, especially
the features that are needed to run the game. Compile tested with
scons, make, but not cmake, that seems to have an issue not related
to these changes. The changes include:

* GLSL support in the viewport and game engine, enable in the game
  menu in textured draw mode.
* Synced and merged part of the duplicated blender and gameengine/
  gameplayer drawing code.
* Further refactoring of game engine drawing code, especially mesh
  storage changed a lot.
* Optimizations in game engine armatures to avoid recomputations.
* A python function to get the framerate estimate in game.

* An option take object color into account in materials.
* An option to restrict shadow casters to a lamp's layers.
* Increase from 10 to 18 texture slots for materials, lamps, word.
  An extra texture slot shows up once the last slot is used.

* Memory limit for undo, not enabled by default yet because it
  needs the .B.blend to be changed.
* Multiple undo for image painting.

* An offset for dupligroups, so not all objects in a group have to
  be at the origin.
2008-09-04 20:51:28 +00:00
Brecht Van Lommel
99fdf27af9 Sync with Apricot Game Engine
=============================

* Clean up and optimizations in skinned/deformed mesh code.
* Compatibility fixes and clean up in the rasterizer.
* Changes related to GLSL shadow buffers which should have no
  effect, to keep the code in sync with apricot.
2008-07-10 12:47:20 +00:00
Brecht Van Lommel
d5f4b3620f Fix for bug #8680: GameLogic.getRandomFloat() returns very small
values on 64 bit, instead of range 0..1. Also a warning fix.
2008-06-29 20:53:17 +00:00
Chris Want
5d0a207ecb Patch from GSR that a) fixes a whole bunch of GPL/BL license
blocks that were previously missed; and b) greatly increase my
ohloh stats!
2008-04-16 22:40:48 +00:00
Benoit Bolsee
3444d6612a Delta Loc/Rot/Scale Ipo curve are now supporting in the BGE with the following limitations:
1. All Ipo channels are now independent. 
In Blender 2.45, all 3 Loc Ipo channels were automatically set
together. For example, having just a LocX Ipo channel was sufficient
to fix the X, Y and Z coordinates, with the Y and Z value taken
from the object original Y and Z location in Blender. The same
was true for the 3 Rot and the 3 Scale Ipo channels: the missing
channels were assumed to have constant value taken from the object
original orientation/scale in Blender.
With this patch, all Ipo channels are now independent. 
THIS WILL CREATE BACKWARD COMPATIBILITY PROBLEM if you omit to
define the 3 channels of a same type together in your Blend file:
the undefined Loc, Rot, Scale coordinates of the object will
be influenced by the parent/spawner Loc/Rot/Scale in case the
object is a child or dynamically created.

2. Delta Loc, Rot, Scale are now supported with the following
limitations:
- The delta Loc/Rot Ipo modify the object global (NOT local)
location/orientation
- The delta Scale change the object local scale
- The delta Ipo curves are relative to the object starting
Loc/Rot/Scale when the Ipo was first activated; after that, the
delta Ipo becomes global. This means that the object will return
to this initial Loc/Rot/Scale when you later restart the Ipo
curve, even if you had changed the object Loc/Rot/Scale in the
meantime. Of course this applies only to the specific Loc/Rot/Scale
coordinate that are defined in the Ipo channels as the channels
are now independent.

3. When the objects are converted from Blender to the BGE, the
delta Loc/Rot/Scale that might result from initial non-zero values
in delta Ipo Curves will be ignored. However, as soon as the
delta Ipo curve is activated, the non-zero values will be taken
into account and the object will jump to the same Loc/Rot/Scale
situation as in Blender. Note that delta Ipo curves with initial
non-zero values is bad practice; logically, a delta Ipo curver
should always start from 0.

4. If you define both a global and delta channel of the same
type (LocX and DLocX), the result will be a global channel equivalent
to the sum of the two channels (LocX+DLocX).
2008-03-12 21:33:24 +00:00
Nathan Letwory
15da2232f7 * tweak linking priorities - should help for GCC users
* some lib renaming
2008-01-08 09:47:44 +00:00
Chris Want
5e3cffc64a Patch to change license to GPL only, from GSR. 2008-01-07 19:13:47 +00:00
Stephen Swaney
59fe967476 more gcc 4.1.x warning cleanup:
applied MT_QueryAssert_patch.diff part of
patch [#6994] Fixing warnings: conversion from string constant to char *

Submitted by Renato Perini (mjordan).
Thanks, Renato!
2007-09-12 01:56:50 +00:00
Kent Mein
4ddec269c2 This does nothing to fix the irix stuff but gets rid of a couple of simple
warnings that showup on irix.

Kent
2007-09-11 04:05:44 +00:00
Kent Mein
4e2143f639 This commit fixes up a bunch of svn properties to hopefully make things a little nicer for everyone.
Patch provied by gsrb3d

bug tracker #7061

Kent
2007-08-28 10:07:08 +00:00
Jacques Beuarain
24f4440d05 CMake lists initial submission. Documentationand further verification for different platforms will follow soon. This was just tested against current CVS on MSVC 2005 with Verse, QuickTime, OpenEXR, Player all on. 2006-11-17 02:27:12 +00:00
Joseph Gilbert
f54a113cde Update to the VC7 projectfiles.
This should bring the projectfiles upto date for msvc7.

Moving these to version 7.1 so that the version 8 people don't have such a hard time importing into 2005.

Build intern.sln, extern.sln and then blender.sln. Enjoy. :p
2006-04-17 20:05:39 +00:00
Nathan Letwory
ef1b7a5735 ==SCons==
+ 'scons blenderplayer' builds blender AND blenderplayer now (tested on Linux
  only, but was only linking issue, so should work on other platforms too).

  NOTE: I noticed some compileflags for GE specific libs that were left out -
  I re-enabled them in the SConscripts, but I'm going to do a test build my-
  self now, so if there are problems with them on win32, I probably already
  know about them :)
2006-02-07 21:24:36 +00:00
Nathan Letwory
3bb82a27fc == SCons ==
* This commit is all of the rewrite work done on the SCons system. For
  documentation see doc/blender-scons.txt and doc/blender-scons-dev.txt.
  Also http://mediawiki.blender.org/index.php/BlenderDev/SconsRefactoring
  contains valuable information, along with what still needs to be done.

    - linux, os x and windows compile now.
    - files are compiled to BF_INSTALLDIR (see config/(platform)-config.py)
        - NOTE: Jean-Luc P will commit sometime during the weekend proper
          appit() for OS X. For now, copy the resulting binary to an
          existing .app bundle.
    - features:
        - cleaner structure for better maintenance
        - cleaner output during compile
        - better handling of build options
        - general overall speed increase
        - see the wiki for more info

  Cygwin, FreeBSD and Solaris systems still need work. For these systems:
    1) copy a config/(platform)-config.py to ie. config/cygwin-config.py
    2) set the proper defaults for your platform
    3) mail me at jesterking at letwory dot net with you configuration. if
       you need any modifications to the system, do send a patch, too.

  I'll be giving first-aid today and tomorrow, after that it'll be all
  regular development work :)

  /Nathan
2006-02-04 14:15:10 +00:00
Brecht Van Lommel
ae9dcb3dc2 Update SConscript.
Fix some warnings.
Merge with latest soc code.

What changed in IK lib:

Fully restructured, with components now as follows:
  - IK_Solver: C <=> C++ interface
  - IK_QSegment: base class for bone/segment with 0
    to 3 DOF
  - IK_QTask: base class for a task (currently there's
    a position and a rotation task)
  - IK_QJacobian: the Jacobian matrix, with SVD
    decomposition, damping, etc
  - IK_QJacobianSolver: the iterative solver

The exponential map parametrization is no longer used,
instead we have now:
  - 3DOF and 2DOF XZ segments: directly update matrix
    with Rodrigues' formula
  - Other: Euler angles (no worries about singularities
    here)

Computation of the Jacobian inverse has also changed:
  - The SVD algorithm is now based on LAPACK code,
    instead of NR, to avoid some problems with rounding
    errors.
  - When the problem is underconstrained (as is the case
    most of the time), the SVD is computed for the transpose
    of the Jacobian (faster).
  - A new damping algorithm called the Selectively Damped
    Least Squares is used, result in faster and more
    stable convergence.
  - Stiffness is implemented as if a weighted psuedo-inverse
    was used.

Tree structure support.

Rotation limits:
  - 3DOF and 2DOF XZ segments limits are based on a swing
    (direct axis-angle over XZ) and twist/roll (rotation
    over Y) decomposition. The swing region is an ellipse
    on a sphere.
  - Rotation limits are implemented using an inner clamping
    loop: as long as there is a violation, a violating DOF
    is clamped and removed from the Jacobian, and the solution
    is recomputed.

Convergence checking is based now on the max norm of angle
change, or the maximum number of iterations.
2005-08-27 13:45:19 +00:00
Ton Roosendaal
a7f2ebf06c Second commit for Brecht's IK work.
(Moto needs 'make install' before you can do IK lib btw)
2005-08-27 12:45:29 +00:00
Joseph Gilbert
292c03ab8e _.NET projectfiles update_
* converted files to .NET 2002
* removed unneeded projectfiles from bullet
* PHY_Bullet outputs to correct directories
* Bullet linked to activex and blenderplayer
* misc updates
2005-08-02 13:44:49 +00:00
Erwin Coumans
49499c49be updated vc7 projectfiles so they work with bullet 2005-07-31 14:40:51 +00:00
Erwin Coumans
411123b250 - added debug line drawing in gameengine (handy for debugging physics problems)
- added #ifdef for a visual studio 8 crashing problems
- added scaling and tolerances to triangle meshes
2005-07-27 09:30:53 +00:00
Ton Roosendaal
e5304a967c Disabled assert foolery in Decimator. :)
Code provided by Matthew Plough. Verified to run OK in OSX, Windows.

Solves bug #2598, which crashed blender on using non-manifold meshes with
decimator.
2005-05-24 10:44:14 +00:00
Kent Mein
55af35d795 I'll break this commit into two sections in the moto files
I got rid of a few warnings about blah shadows a previous declaration.

In the gameengine files I fix the following:
	removed some unused vars
	removed dos style line breaks
	added newlines to last line in a couple of files to remove warnings.

Kent
2005-03-25 16:31:05 +00:00
Kent Mein
57f72f4081 Small fix for the following warning:
../include/MT_Quaternion.h:62: warning: declaration of 'angle' shadows a member
of 'this'

Kent
2005-03-25 14:48:29 +00:00