Commit Graph

2435 Commits

Author SHA1 Message Date
Campbell Barton
19d0f93099 svn merge ^/trunk/blender -r43934:43976 2012-02-08 05:45:16 +00:00
Joerg Mueller
77ab18ebc3 Fix for [#29910] Crash on reading KX_SoundActuator.sound
aud is now imported automatically on BGE start.
2012-02-07 11:22:50 +00:00
Campbell Barton
3937ec7d11 svn merge ^/trunk/blender -r43887:43918 2012-02-05 22:13:10 +00:00
Benoit Bolsee
223216a36f BGE bug #21947: Softbodies not using object size. Fixed by scaling the shape before creating the soft body. 2012-02-05 09:32:35 +00:00
Campbell Barton
d0412a1981 svn merge ^/trunk/blender -r43864:43887 2012-02-05 02:30:30 +00:00
Benoit Bolsee
4c7e769aa1 BGE bug #29133: Render to Texture not working. Fixed by using same viewport to render and capture. 2012-02-04 17:20:38 +00:00
Alex Fraser
a05fdb837b Fix for aliased fonts in the game engine.
- Mipmaps are generated in BLF when drawing text in-game. In that case, padding around each glyph is increased to prevent bleeding.
 - Texture filtering is turned on for in-game text.
 - All glyphs are now "twisted": the leading edge is brought a small distance forward, to prevent z-fighting in overlapping (kerned) glyphs. This happens both in the game engine and the rest of the UI, but should have no effect in the UI due to Z-compression in the clipping matrix.
Reviewed and approved by bdiego; see patch [#29882] in the tracker. Tested by dfelinto.
2012-02-04 01:51:59 +00:00
Campbell Barton
075fee4d58 svn merge ^/trunk/blender -r43830:43864 2012-02-03 01:30:21 +00:00
Sergey Sharybin
6a30321434 Fix #29381: Navmeshs frees not guarded allocated memory and leaked
There were two issues discovered:
- Triangles mapping didn't free in buildNavMeshData if there's no recast data for an object
- KX_NavMeshObject used not-guarded allocation for polygons storage, but used guarded
  freeing stuff to free used memory, producing error messages in the console and leading to
  memory leak.

Wasn't actually harmful for users -- there was no memory corruptions and error happens only
when object was set up in a way when navmesh can't work in theory.
2012-02-02 08:48:43 +00:00
Campbell Barton
4aa82806ef svn merge ^/trunk/blender -r43751:43819, need to look into changes made to editmesh_loop.c from this range still 2012-02-01 09:31:13 +00:00
Dalai Felinto
359917fb2b pydoc cleanup + remove unused bge.logic constants
+ adding PINGPONG as action actuator constant in rst
2012-01-30 06:47:01 +00:00
Campbell Barton
5cc898ada2 svn merge ^/trunk/blender -r43616:43639 2012-01-23 16:46:35 +00:00
Mitchell Stokes
62963525ce Fix for "[#29911] Crash on reading BL_ActionActuator.channelNames"
The crash occurred when an action actuator was attached to a non-armature object because objects that aren't armatures do not have pose data. A NotImplementedError is now raised if someone tries to access any of the following with an action actuator attached to a non-armature object:

BL_ActionActuator.channelNames
BL_ActionActuator.getChannel()
BL_ActionActuator.setChannel()
2012-01-22 23:15:35 +00:00
Mitchell Stokes
686ce92fe8 Committing patch "[#27676] Change window size/resolution in realtime" by me.
Description:
This patch allows the user to change the size of the window (or the resolution in fullscreen mode) using the new bge.render.setWindowSize() method. This only works in the Blenderplayer since it doesn't make a whole lot of sense for the embedded player.
2012-01-22 20:25:25 +00:00
Campbell Barton
4966982a5a svn merge ^/trunk/blender -r43564:43609 2012-01-22 18:04:35 +00:00
Mitchell Stokes
57d48d4493 Committing patch "[#29763] Adding an active_events property to SCA_PythonKeyboard and SCA_PythonMouse"
Here is the description:
As the summary says, this patch adds a new event to both SCA_PythonKeyboard and SCA_PythonMouse. This property is similar to the events property that both have, but it only returns events which are not KX_NO_INPUTSTATUS. This moves the "no input" check from Python to C, which gave my input handling code a 2x speed up. Python sucks (performance-wise) with iterating lists and SCA_PythonKeyboard has close to 200 events (I think something like 177, but I don't know for sure).
2012-01-22 05:45:56 +00:00
Dalai Felinto
6964b5a6c4 cucumber merge: world scaling + video texture constants
revisions: 38166,38167,38177,38179,38180,38187,38242

To be implemented after merge:
1) add pydocs(rst) for the video texture new defines
2) see if a NodeSetLocalMatrix would fit well

#43439 by kupoman
Changing the worldTransform and localTransform python attributes to use BLI_math to simplify the code

#38242 by kupoman
Adding the constants SOURCE_ERROR, SOURCE_EMPTY, SOURCE_READY, SOURCE_PLAYING, SOURCE_STOPPED to the video texture module. Updates to the documentation will follow after a merge with trunk

#38187 by kupoman
Updates to the documentation to reflect that worldScale is now writable, and added localTransform and worldTransform to KX_GameObject.

#38180 by kupoman
The Transform attribute of KX_GameObject was based on world space data. I converted that one to worldTransform, and added a localTransform for local space transform information.

#38179 by kupoman
Fixed the transform attribute of KX_GameObject's set method to properly deal with negative scaling.

#38177 by kupoman
Updated the transform property on KX_GameObject so that it is now read/write, and added the corresponding set method. Also simplified the get method by calling GetOpenGLMatrix instead of making the matrix myself.

#38167 by kupoman
Adding a read only transform attribute to KX_GameObject that returns a 4x4 matrix representing the object's transformations.

#38166 by kupoman
Adding a worldScale attribute to KX_GameObject. This attribute scales the object independently of its parent's scale.
2012-01-22 03:21:28 +00:00
Campbell Barton
ae771e742b change filepath limit from 240 to 1024 2012-01-21 14:54:53 +00:00
Campbell Barton
944dfa23c4 svn merge ^/trunk/blender -r43392:43420 2012-01-16 11:50:17 +00:00
Campbell Barton
ae9b4b81cb opengl render save ignored alpha settings. also some FILE_MAX defines missed last commit. 2012-01-16 06:43:58 +00:00
Campbell Barton
fb4ad50cee use defines for property name lenghths in the BGE, were using 31,32,64,100. 2012-01-16 05:27:11 +00:00
Campbell Barton
705f23064e svn merge ^/trunk/blender -r43294:43338 2012-01-13 01:39:57 +00:00
Kent Mein
9dc992a3fd Some small fixes to get things compiling on solaris with cmake.
There are also some changes that need to be done to libmv but I'm 
leaving those out so I can get it patched upstream first.

(Only works with gcc/g++ if we want to use sun's compiler we would need
to get rid of all of our annonymous structs which I don't think
we want to do at this point, example:

typedef struct wmNDOFMotionData {
        union {
                float tvec[3]; // translation
                struct { float tx, ty, tz; };   // this would need to be fixed
		// something like this or something similar:
                struct { float x, y, z; } t;
                };
...
)

Kent
2012-01-12 16:31:27 +00:00
Campbell Barton
a3d1e35d5e de-duplicate object conversion code in BGE 2012-01-12 09:02:29 +00:00
Dalai Felinto
de86d89a9f Cucumber - AA for blenderplayer and fullscreen
..............................................
svn merge ^/branches/soc-2011-cucumber -r 38968,38970,38973,39045,40845

Notes:
======
*  we replaced fullscreen by playerflag in DNA_scene.types.h. So no doversion here, I think this is a small reversion can't see any potential problem in forcuing users to re-check fullscreen. If the file is really old (<250) it will doversion though;

* (for after commit) it would be nice to gray out the width/height when desktop=True

* for a rainy day: it would be nice to have other ghost modes (e.g. screensaver) to support desktop + MSAA as well. It's not a huge deal given that I don't even know if anything else work (apart from windowed, fullscreen and embed) but it doesn't hurt to have it updated as well.

* there is something strange with outliner. I think space_outliner merge-info is not in sync with the ^/ folder. It's probably a wrong merge early in cucumber.

Commit Logs:
===========
# 40845 by dfelinto
remove desktop and fullscreen properties. They are both part of playerflag now
also I removed the fullscreen from the DNA completely. I don't think we need doversion that..

#39045 by kupoman
The Desktop option is now greyed out when fullscreen is not checked rather than disappearing from the UI completely.

#38973 by kupoman
Adding a checkbox to the UI to allow the full screen Blender Player to use the current desktop resolution instead of the resolution setting.

#38970 by kupoman
Multisampling now works in a fullscreen Blender Player.

#38968 by moguri
Committing a patch from Mitchell Stokes (Moguri) to include a setting in the UI for the Blenderplayer multisampling.
2012-01-11 20:53:22 +00:00
Campbell Barton
a7b0a11811 svn merge ^/trunk/blender -r43278:43294 2012-01-11 15:04:54 +00:00
Campbell Barton
b308e61312 svn merge ^/trunk/blender -r43220:43278 --accept postpone 2012-01-11 14:14:04 +00:00
Dalai Felinto
782f0b6382 bge camera actuator: -X and -Y axis
The camera actuator only allows to look the object from its front face.

Given that Blender takes -Y as the default forward orientation, the current
functionality doesn't let a camera to track an actor from behind.

This patch allows for -X and -Y axis tracking. This way a camera over the
shoulders of a character is possible (without resorting to rotate the
mesh/armature original orientation.

- patch reviewed by Campbell Barton, thanks
2012-01-11 07:27:39 +00:00
Campbell Barton
cda5d1769d minor changes to BLF api use
- replace calls to BLF_width & BLF_height --> BLF_width_and_height
- no need to call strlen() on length value passed to BLF_draw(). this already checks for \0 char.
2012-01-11 05:45:39 +00:00
Campbell Barton
348f116fe5 svn merge ^/trunk/blender -r43124:43160 2012-01-05 11:23:24 +00:00
Campbell Barton
890c97ca40 more edits to r43145,
- remove redundant check in new prop operator which is covered by operators poll func.
- use get_ob_property to get the object prop in BL_ConvertTextProperty() rather then looping for it.
2012-01-05 06:34:14 +00:00
Dalai Felinto
8d55b7bf0e BGE Font Object: fix for relative path not working AND packed fonts not working
[I don't think anyone has ever reported those, what makes me slightly sad but carry on ;)]

Those fixes introduce a more generic function to load a font before calling BLF_load.
I think it should move to be part of Blender util routines or BLF itself.

For the time being here will make it. Once we get <builtin> font working we go for this.
Thanks Diego Borghetti for the usual assistance with blf.
2012-01-05 06:02:42 +00:00
Dalai Felinto
be025ea319 This patch creates an interface for ["Text"] properties in Font objects.
Interface:
http://www.pasteall.org/pic/show.php?id=23785

Simple test file:
http://www.pasteall.org/blend/10616
(I'll commit this to the text suite later)

Code Explanation:
---------------
(1) it adds a toggle to add/remove a "Text" gameproperty.
 - internally this property is just another game property (so we can find it within the game.properties lookup).
 - the property itself has no 'value', the interface shows the content of ob.data.body instead (why? because gameproperties are per object, while the text is per data).

(2) at BGE converter time it sets the current value of the object.data.body to the ["Text"] property.

(3) if you change object.text (bge text property) it automatically convert ["Text"] to a CStringValue.

*** that means if the original property was a CIntegerValue, it will be converted to CStringValue forever ***

* the only to do I can think of is to add a warning at doversion time if user has ["Text"] property for a Font object *
* when that happens we print a warning in console/popup.*
2012-01-04 21:40:00 +00:00
Campbell Barton
c0eec8f379 svn merge ^/trunk/blender -r43062:43085 2012-01-03 02:16:52 +00:00
Alex Fraser
15dc3d4609 Fixes two crashers for games, with GHOST under SDL:
- Fixes SDL fullscreen mode for game engine (blenderplayer). Mode switching (resolution changes) not supported yet though.
- Fixes embedded game engine exit.
See patch tracker [#29748].
2012-01-02 12:35:06 +00:00
Campbell Barton
78a4e24614 svn merge ^/trunk/blender -r43009:43033 2011-12-31 12:03:36 +00:00
Daniel Stokes
359a95bdc9 Changing KX_FontObject to look for a "Text" game property instead of a "text" property to match with bitmap font usage. 2011-12-31 09:37:19 +00:00
Campbell Barton
81f5c9ed9b svn merge ^/trunk/blender -r42991:43009 2011-12-31 03:07:14 +00:00
Campbell Barton
424e09a2ce use PyUnicode_From_STR_String in the game engine in more places. 2011-12-30 12:44:16 +00:00
Dalai Felinto
c52f780021 cucumber merge, multiline font object:
revisions: 38384,38387,38403,38404,38407,42997,42998

#42998 by dfelinto
BGE Font Object - fix for offset
(scaling also has to be taken into account here)

#42997 by dfelinto
Font Object Multiline fix.
The offset was totally wrong when object had scale[1] != 1

#38407 by kupoman
Changing the "text" property of a KX_FontObject now changes the text. This allows for control of a FontObject through logic bricks.

#38404 by kupoman
KX_FontObject now supports the x and y offset options.

#38403 by kupoman
KX_FontObject now makes use of the font's line spacing option, and correctly accounts for rotation and font size when applying the spacing.

#38387 by kupoman
The KX_FontObject text attribute is working again.

#38384 by kupoman
Primitive support for the new line character added to KX_FontObjects. The line spacing is fixed, and does not work when the FontObject is rotated. Also, the text attribute has been temporarily disabled, as it needs some updating to support the multiline changes.
2011-12-30 12:28:51 +00:00
Campbell Barton
2c43f99c0a formatting edits, missed these last commit. 2011-12-30 11:49:58 +00:00
Campbell Barton
50ca81154e svn merge ^/trunk/blender -r42973:42991 2011-12-30 09:23:06 +00:00
Campbell Barton
6d965f4493 style edits for function declarations 2011-12-30 07:55:15 +00:00
Campbell Barton
4ced91da47 svn merge ^/trunk/blender -r42778:42839 2011-12-23 08:41:53 +00:00
Mitchell Stokes
ac498a6b64 Cleaning up the GPU_extensions_init/exit() code a bit to keep the Blenderplayer from crashing on exit and restart. 2011-12-23 07:10:01 +00:00
Campbell Barton
3cce96320e recent matrix row/col swap broke matrix assignment in the BGE, fix provided by Andrew Hale 2011-12-23 00:51:54 +00:00
Campbell Barton
51016c4dea split >120 length lines (mostly if statements) 2011-12-22 00:03:20 +00:00
Guillermo S. Romero
2f90cfd423 SVN maintenance. 2011-12-21 20:32:29 +00:00
Campbell Barton
84b58df85a svn merge ^/trunk/blender -r42742:42757 2011-12-20 08:09:46 +00:00
Dalai Felinto
32b23b9f74 Cucumber, first batch of merge - UI changes and custom exit key
---------------------------------------------------------------
This was a test drive to see how painful the merge will be.
Next batches are:
- use desktop option for fullscreen
- multisampling option
- bullet collision mask
- python
- storage (vbo, dl, ...)
- lighting

[lighting still needs review]
[python could use review, although it should be straightforward]
[storage should be tested more I think]


Merged /branches/soc-2011-cucumber:r
36991,37059,37157,37416,37497-37499,37501,37522,39036,40593

36991:
==UI==
* Made some options available in Blender Game that were only available in Blender Render (camera resolution, animation fps)
* Created a panel for the embedded player
* Renamed the FPS option for the standalone player to Refresh Rate
* Moved framing options to display
* Made a button to launch the blender player from within blender (only tested on windows for now)

37059:
==UI==
* Added the option to change the exit key for the BGE. The UI currently just sets a number, and this feature most likely does not work for blenderplayer yet. More work on this to come.
* Removed the physics settings from the scene panel for the BGE.
* Added an Add menu in the logic brick header.

37157:
Making the bake options available in Blender Game

37416:
Making the exit key UI element accept key presses instead of numbers. It still does not work for the Blenderplayer, and it does not limit the input to key presses (other events don't work for exiting)

37497:
Some more work on getting the exit key to work in the Blenderplayer.
Input is now restricted to keyboard events only for the exit key UI.
37498:
Some clean up from the last commit.
The exit key setting affects the Blenderplayer now.
37499:
Cleaning up some duplicate code. Now the reverseTranslateTable for converting blender key codes to ketsji key codes is only defined in BL_BlenderDataConverter.
37501:
Centralizing the exit key methods to the keyboard devices. This should make it easier to get exit key control to the python API.

[37517: committed previously]

37522:
Moved control of the exit key away from the keyboard devices, and moved it to ketsjiengine.
Added setExitKey and getExitKey to the python API

39036:
A couple of the doversions were in the wrong spot. This should fix some issues with the exit key not being set.
[not committed entirely, see below]]

40552: space_logic.py (* fixed an error in space_logic.py *)

40593:
launch blenderplayer from ui not working in OSX fix - by Daniel Stokes and me



########################################################
code left behind (to be included in next commit):
########################################################
		{
			/* Initialize default values for collision masks */
			Object *ob;
			for(ob=main->object.first; ob; ob=ob->id.next)
				ob->col_group = ob->col_mask = 1;
		}
2011-12-20 03:11:56 +00:00
Campbell Barton
2457d4f5ab svn merge ^/trunk/blender -r42680:42722 2011-12-19 10:40:48 +00:00
Dalai Felinto
bfdaa3b187 bugfix: [#29486] 2D filters make scene disappear when wire material used - patch by Juha Mäki-Kanto
when last drawn material is wire it will not set back to face drawing.
2011-12-17 21:23:02 +00:00
Campbell Barton
5c6ee6b523 svn merge ^/trunk/blender -r42670:42680 2011-12-17 02:41:53 +00:00
Campbell Barton
ad96dacbc5 style edit only - move parenthesis onto second line of function definition (in keeping with most of blenders code)
also split some long lines in own code.
2011-12-17 00:52:36 +00:00
Campbell Barton
db6cb30941 svn merge ^/trunk/blender -r42669:42670 2011-12-16 23:50:55 +00:00
Campbell Barton
e5b1f9c28d svn merge ^/trunk/blender -r42660:42669 2011-12-16 23:26:29 +00:00
Brecht Van Lommel
3311164b24 Math lib: matrix multiplication order fix for two functions that were
inconsistent with similar functions & math notation:

mul_m4_m4m4(R, B, A) => mult_m4_m4m4(R, A, B)
mul_m3_m3m4(R, B, A) => mult_m3_m3m4(R, A, B)

For branch maintainers, it should be relatively simple to fix things manually,
it's also possible run this script after merging to do automatic replacement:
http://www.pasteall.org/27459/python
2011-12-16 19:53:12 +00:00
Campbell Barton
2253b63c97 static functions for getting power of 2 values were being copied about too much, add to the BLI_math api.
- is_power_of_2_i
- power_of_2_min_i
- power_of_2_max_i
2011-12-16 09:25:07 +00:00
Campbell Barton
862dc635ed svn merge ^/trunk/blender -r42617:42655 2011-12-15 23:59:02 +00:00
Campbell Barton
40a2c1a292 more vertex weight edits,
* replace inline loops with api calls.
* change constraints so verts with 0.0 weight are ignored like they are everywhere else.
2011-12-14 22:54:38 +00:00
Campbell Barton
65f3b93f14 svn merge ^/trunk/blender -r42521:42550 2011-12-10 05:38:00 +00:00
Morten Mikkelsen
82b9e4d16f verify existence of dm 2011-12-10 01:00:12 +00:00
Morten Mikkelsen
965c287630 fixes scale on derivative maps 2011-12-09 23:26:06 +00:00
Campbell Barton
f025b7b511 went over all uses of MDeformWeight.def_nr and made sure the value is clamped when used as an array index. 2011-12-09 08:20:27 +00:00
Campbell Barton
15ad39e684 svn merge ^/trunk/blender -r42303:42329 2011-12-02 01:01:07 +00:00
Sergey Sharybin
f6f7e270e3 Slight refactor of VBO code to deal with multiple textures.
Added compareDrawSettings callback to driver mesh's callbacks which are
drawing textured faces (mapped and not mapped). This new callback checks
if two faces are drawing with the same settings (testures, shading etc)
and if they not, flush of faces happens into ogl using glDrawArrays and
next face would be drawn with it's own settings.

Currently implemented compareDrawSettings is used to resolve issue from
bug report only, probably there are extra places where this callback is
needed, but haven't seen configuration where current logic will fail,
so it should be ok.

Also reordered arguments passing to drawMappedFaces DM's callbacks,
so now all drawing callback are accepting list of callbacks and then
userData, instead of using mixed order of callbacks and userData which
was a bit confusing to work with.

This commit fixes:
- #26410: VBO & multitexture doesnt work
- #29464: VBO enabled causes UV coruption
2011-12-01 12:12:39 +00:00
Campbell Barton
9e5b28cd42 svn merge ^/trunk/blender -r42261:42290 2011-11-30 09:31:11 +00:00
Brecht Van Lommel
f426a74c65 Fix #27696: record animation in game engine not working with pre made fcurves. 2011-11-29 18:37:10 +00:00
Campbell Barton
faa022563d svn merge ^/trunk/blender -r42245:42261 2011-11-29 18:18:56 +00:00
Campbell Barton
f62ad8f69b remove header text:
"The Blender Foundation also sells licenses for use in proprietary software under the Blender Licens"

also remove NaN references from files that have been added since blender went opensource.
2011-11-29 10:54:47 +00:00
Campbell Barton
3b5bcab09c svn merge ^/trunk/blender -r42139:42172 2011-11-26 16:29:14 +00:00
Antony Riakiotakis
57731da05b Add missing GLEW_STATIC definition, causing link errors. 2011-11-26 15:08:01 +00:00
Campbell Barton
6736576f6d replace FILE_MAXDIR + FILE_MAXFILE with FILE_MAX 2011-11-26 04:07:38 +00:00
Mitchell Stokes
64008199b9 Merging Blenderplayer modifier fix (U.gameflags |= USER_DISABLE_VBO) from Cucumber. 2011-11-24 21:16:27 +00:00
Campbell Barton
4b3976cc5a svn merge ^/trunk/blender -r42116:42139 2011-11-24 20:01:45 +00:00
Dalai Felinto
ddfc518cae BGE patch: [#29285] Video Texture: Avoid slow rescale (non power of 2 support check) by Goran Milovanovic (goran)
"Just a simple check for non power of two support (GLEW_ARB_texture_non_power_of_two), to avoid what seems to be a very slow, and very unnecessary gluScaleImage call."

This is the only part of the VideoTexture that does the POT calculation, so the check seems good.
It would be interesting if some opengl guru would like to benchmark the use of this in other areas of Blender (e.g. 2D Filters, and all GLSL materials).

Note that mipmap should also be supported automatically by this extension, so it's not something to worry about.
2011-11-24 19:27:15 +00:00
Campbell Barton
f28fd56f8f svn merge ^/trunk/blender -r42095:42116 2011-11-24 05:33:22 +00:00
Campbell Barton
3b9b6051d9 rename mathutils constructors to match other parts of the bpy/api (no functional changes) 2011-11-24 04:45:36 +00:00
Mitchell Stokes
f94614d791 BGE Animations: Getting the Action Actuator to behave better with pulse mode (on the sensor) and continuous enabled. 2011-11-23 23:29:36 +00:00
Dalai Felinto
59077feff1 BGE patch:[#29372] Matrix size for bge.types.BL_ArmatureBone.bone_mat by Damien Touraine (touraine) 2011-11-23 23:02:38 +00:00
Campbell Barton
f9e00b5c99 svn merge ^/trunk/blender -r42009:42053 2011-11-22 11:51:42 +00:00
Campbell Barton
743d2f8c0f rename image type defines to be less ambiguous, also set BMP as not supporting alpha (it reads but cant write) 2011-11-22 00:35:26 +00:00
Campbell Barton
30fd1ab523 replace ImBuf.depth with ImBuf.planes to match ImageFormatData.planes & to avoid confusion with ImageFormatData.depth 2011-11-21 20:47:19 +00:00
Campbell Barton
0e2c8cdcdd move image settings into their own structure so the interface can be shared where image saving settings are needed.
currently file out node and render output share this struct & UI.
2011-11-21 20:19:58 +00:00
Campbell Barton
3c8d86e117 svn merge ^/trunk/blender -r41961:41998 2011-11-20 01:14:33 +00:00
Campbell Barton
822d6ae037 - rename MovieTrackingMarker.enabled --> mute, to match constraints/nla/fcurves/sequencer
- report an error if an invalid BGpic arg is given to v3d.background_images.remove()
2011-11-19 02:48:09 +00:00
Campbell Barton
e59ab6486f svn merge -r41751:41779 ^/trunk/blender 2011-11-15 02:05:32 +00:00
Campbell Barton
e84c0980a3 correct indentation and some whitespace edits (no functional changes) 2011-11-11 13:09:14 +00:00
Joseph Eagar
aea95c7860 bmesh: fixed merge issues with navmesh (though I've not tested if it works yet).
also fixed a small crasher in bridge.
2011-11-08 00:20:50 +00:00
Campbell Barton
7508540c53 svn merge -r41575:41602 ^/trunk/blender 2011-11-07 07:01:24 +00:00
Campbell Barton
85540d5aa7 more macro --> BLI math lib, mainly replace VECCOPY in render and blenkernel. 2011-11-06 16:38:21 +00:00
Campbell Barton
ec3b0c6a96 misc macro --> bli math lib functions 2011-11-06 15:17:43 +00:00
Campbell Barton
e936c78251 svn merge ^/trunk/blender -r41503:41575 2011-11-06 10:38:44 +00:00
Campbell Barton
4c17f8e5de PyUnicode_From_STR_String utility function which passes STR_String to PyUnicode_FromStringAndSize (saves a call to strlen).
Also made CValue::ConvertKeysToPython use faster list creation and improved some of the macro formatting.
2011-11-06 01:39:36 +00:00
Campbell Barton
62f2218554 macro formatting & remve some unused code. 2011-11-05 05:44:52 +00:00
Campbell Barton
b0adf37ef9 - view bounds (now split from collision bounds) was still being used for bge physics in one place, comparison was incorrectly treating it as a flag too.
- cleanup Object struct - remove pad and unused flags, convert some shot's to char's, saving 24 bytes.
2011-11-05 02:30:25 +00:00
Campbell Barton
057bf2a02b misc doc edits
- remove recently added sphinx reference workaround.
- tested doxygen, correct some warnings, set tab width and added pymathutils group.
- added convenience target 'make doc_doxy'
2011-11-05 01:48:10 +00:00
Sergey Sharybin
77934cfaed Fix #28865: Draw_bounds_type does not display Polyhedron or Capsule types
Separate DNA properties for bounding box used for bounding box display
in 3d viewport and bounding box used for collision detection in game engine.

Bumped subversion for proper updating old files to new system, but it
need more complex testing.
2011-11-04 15:53:34 +00:00
Sergey Sharybin
4ea816837d Configurable sensor size:
- Added support of variable size sensor width and height.
- Added presets for most common cameras, also new presets can be defined by user.
- Added option to control which dimension (vertical or horizontal) of sensor
  size defines FOV. Old behavior of automatic FOV calculation is also kept.
- Renderer, viewport, game engine and collada importer/exporter should
  deal fine with this changes. Other exporters would be updated soon.
2011-11-04 14:36:06 +00:00
Campbell Barton
2d09bf85af cleanup some BLF macros and dont over-alloc BGE's PyObjectPlus when setting strings (better change then the one I made recently). 2011-11-04 09:14:49 +00:00
Campbell Barton
87cd81b162 - added docs and examples for bpy.app.handlers
- correct error in own last commit for BKE_screen_find_big_area()
2011-11-04 04:27:46 +00:00
Campbell Barton
70b7402252 svn merge -r41480:41503 ^/trunk/blender 2011-11-03 22:58:05 +00:00
Campbell Barton
665f602f15 python string conversion
- use _PyUnicode_AsStringAndSize where possible
- use %R for PyErr_Format(...) rather then running repr on the object explicitly 
- use const char
2011-11-03 14:09:18 +00:00
Campbell Barton
d210703bca use Py_TYPE macro (no functional changes) 2011-11-03 13:10:37 +00:00
Campbell Barton
0701982933 svn merge -r41329:41335 ^/trunk/blender 2011-10-28 12:57:37 +00:00
Campbell Barton
0d63bb005f replace VECCOPY and QUATCOPY with inline funcs. 2011-10-28 12:40:15 +00:00
Campbell Barton
ff837cbe9b svn merge -r41310:41329 ^/trunk/blender 2011-10-28 05:17:09 +00:00
Jens Verwiebe
7a20ced627 Fix player prototype, fix compile for OSX/XCode4.2, use always tablet enabled (test) 2011-10-27 15:46:26 +00:00
Campbell Barton
699030ceb6 use const for readonly strings and set some functions to static 2011-10-27 14:41:26 +00:00
Brecht Van Lommel
ba0ef7a592 Fix #29030: render operator only used scene property if layers was used, now it
is possible to specify the scene without the layer too.
2011-10-26 14:05:01 +00:00
Campbell Barton
94f8e3198d svn merge -r41266:41287 ^/trunk/blender 2011-10-26 03:26:52 +00:00
Campbell Barton
ff683ca5e5 misc small edits, remove remaining Id's 2011-10-25 04:01:09 +00:00
Campbell Barton
da8a7928c9 svn merge ^/trunk/blender -r41230:41266 2011-10-24 23:06:27 +00:00
Campbell Barton
685b6e7db9 svn merge ^/trunk/blender -r41227:41230 . --accept=theirs-full 2011-10-24 22:18:32 +00:00
Campbell Barton
15e6d6cd75 svn merge ^/trunk/blender -r41226:41227 . 2011-10-24 12:43:08 +00:00
Campbell Barton
70bf00a74c svn merge ^/trunk/blender -r41200:41226 . 2011-10-24 08:45:55 +00:00
Campbell Barton
ad1d3dd30f svn merge ^/trunk/blender -r41175:41200 --- will need to apply fix after 2011-10-24 07:56:42 +00:00
Campbell Barton
77a7ec7c61 svn merge ^/trunk/blender -r41150:41175 2011-10-24 05:00:53 +00:00
Campbell Barton
0503a4f7a6 svn merge ^/trunk/blender -r41100:41150 2011-10-24 04:18:28 +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
67e744ccf0 fix some typo's 2011-10-23 15:27:36 +00:00
Campbell Barton
74017cb020 header cleanup and typo's 2011-10-22 01:53:35 +00:00
Brecht Van Lommel
00735ed9e4 Code cleanup: don't use btempdir/bprogdir/bprogname globals anymore, but wrap
in BLI_ functions.
2011-10-21 17:37:38 +00:00
Campbell Barton
ef218c75ed - add convenience functions BLI_split_dir_part / BLI_split_file_part, which just call BLI_split_dirfile().
- add a fixed value for bprogdir (the dir of bprogname), since it was being used for resource lookups.
2011-10-21 02:13:36 +00:00
Campbell Barton
6912e94d06 replace BLF's blf_utf8_next() with BLI_str_utf8_as_unicode_step(),
also fixed some spelling errors.
2011-10-21 01:33:06 +00:00
Mitchell Stokes
f1fe89acf1 Fix for bug #28979 "Action actuator breaks animation" reported by Goran Milovanovic. Apparently IPO options can be set too frequently... 2011-10-20 07:20:17 +00:00
Dalai Felinto
415f35d1dc bge bugfix: patch #28893 "Fix for #28753 and some other changes for BGE projection code" by Juha Mäki-Kanto (kanttori) 2011-10-20 06:38:45 +00:00
Campbell Barton
9bbec84e7e initial support for unicode keyboard input for ghost & blenders WM.
- currently X11 only, depends on Xinput (but should not break other os's).
- ghost stores utf8 buffer, copies to wmEvent's
- UI text input is currently the only area that uses this - not console or text editor.
- no rna access yet.
2011-10-20 05:30:26 +00:00
Campbell Barton
4512f10db9 misc edits
- rename define DISABLE_SDL --> WITH_SDL (which was already used in some places)
- blenders interation preset was using orbit rather then turntable 3d view preference (different from factory defaults).
- tagged some unused rna args.
2011-10-20 00:19:21 +00:00
Campbell Barton
5cf593a778 strcpy() --> BLI_strncpy(), where source strings are not fixed and target size is known. 2011-10-19 23:10:54 +00:00
Campbell Barton
638a93b235 svn merge ^/trunk/blender -r41075:41099 2011-10-18 01:09:00 +00:00
Campbell Barton
61389bba41 fix spelling mistakes in comments (and in some python error messages), nothing to effect translations. 2011-10-17 06:39:13 +00:00
Campbell Barton
ef1a1e1451 svn merge ^/trunk/blender -r41005:41075 2011-10-17 03:40:10 +00:00
Campbell Barton
317b649bb2 fix for buffer overrun with BLI_split_dirfile(...), was simple to do since many places don't check for filename lengyj of 79 chars which is the limit for the file selector.
Add max dir and file length args.
2011-10-15 03:56:05 +00:00
Andrew Wiggin
0c151167e5 svn merge ^/trunk/blender -r40997:41005 (to integrate the MSVC build fixes over to bmesh) 2011-10-14 16:23:41 +00:00
Campbell Barton
0c0259d931 fix [#28909] OpenCollada export / import sintel lite v2.1 crashes on import. 2011-10-14 02:31:04 +00:00
Campbell Barton
9f8608a8ec svn merge ^/trunk/blender -r40950:40997, bmesh is in sync with head again 2011-10-14 01:49:37 +00:00
Campbell Barton
4e118bb22f svn merge ^/trunk/blender -r40890:40950 2011-10-14 01:35:20 +00:00
Campbell Barton
d893ac690c rename confusing constants (no functional change)
- OB_BOUND_POLYT --> OB_BOUND_CONVEX_HULL
- OB_BOUND_POLYH --> OB_BOUND_TRIANGLE_MESH
2011-10-13 22:14:41 +00:00
Campbell Barton
f0cd9f987d - for some reason navmesh wasnt drawing when VBO was enabled.
- fix navmesh crash (may well have been from own changes)
- changing VBO's now redraws all windows - useful for checking if VBO draws differently.
2011-10-10 02:56:26 +00:00
Campbell Barton
aa6d7ebd14 svn merge ^/trunk/blender -r40720:40872 2011-10-09 07:31:15 +00:00
Campbell Barton
6778f7ae05 clear some warnings. 2011-10-09 04:11:18 +00:00
Campbell Barton
c27926896f spaces -> tabs (whitespace only changes) 2011-10-06 22:04:01 +00:00
Campbell Barton
8695bedda2 svn merge ^/trunk/blender -r40644:40720 2011-10-06 16:59:58 +00:00
Campbell Barton
1f90b42999 fix [#27071] Random crashes when altering a mesh vertex vector in BGE
thanks to Chris Holland (topher77) for supplying the fix.
2011-10-06 16:07:05 +00:00
Dalai Felinto
8e55780aa7 BGE: removing old hack from Dome code. it's no longer needed and it was making dome to fail if using game autostart (<<bug) 2011-10-03 03:32:59 +00:00
Benoit Bolsee
e6a9b68c79 Recast: upgrade library.
- Upgrade Recast library to latest portable version
- Implement recast_qsort based on FreeBSD qsort.c to have 
  portable thread safe quick sort for use in conversion routine.
- Better default value for the Build Navigation Mesh operator
2011-09-29 21:38:57 +00:00
Campbell Barton
effea8c29b svn merge ^/trunk/blender -r40511:40587 2011-09-27 03:12:31 +00:00
Campbell Barton
573ed73be8 change define INTERNATIONAL --> WITH_INTERNATIONAL
also rename backface_culling --> use_backface_culling (which is used elsewhere in rna)
2011-09-26 10:35:47 +00:00
Campbell Barton
274b9c8fb8 whitespace cleanup 2011-09-25 12:31:21 +00:00
Mitchell Stokes
58a74bc87f BGE Animations: Fixing various Action Actuator compatibility issues reported by Dalai in issue #28723. 2011-09-25 07:03:20 +00:00
Campbell Barton
dab7dba2db svn merge ^/trunk/blender -r40498:40511 2011-09-24 11:03:52 +00:00
Sergey Sharybin
a043133bab Fix for recent Campbell's commit. 2011-09-23 19:33:04 +00:00
Campbell Barton
5bd83eede0 svn merge ^/trunk/blender -r40405:40431 2011-09-23 11:30:55 +00:00
Campbell Barton
161c3861bc svn merge ^/trunk/blender -r40395:40405 2011-09-23 10:58:20 +00:00
Campbell Barton
460cde345b svn merge ^/trunk/blender -r40394:40395 2011-09-23 10:43:25 +00:00
Campbell Barton
a13f94865a svn merge ^/trunk/blender -r40371:40372 2011-09-23 05:59:37 +00:00
Campbell Barton
4b449aefea remove support for irix 2011-09-21 08:40:30 +00:00
Sergey Sharybin
0169079bd1 Get rid of c++ in blenkernel and modifiers
Also use guarded allocations for navmesh stuff.
2011-09-20 16:24:50 +00:00
Sergey Sharybin
07ed73caee - Fix for compiling without international support
- Enable international support for win64 msvc by default
2011-09-20 14:07:40 +00:00
Sergey Sharybin
7172316b94 Merging r40366 through r40392 from trunk into soc-2011-garlic 2011-09-20 12:01:16 +00:00
Sergey Sharybin
2015eefef7 i18n: some fixes for windows, scons and game engine 2011-09-20 09:32:14 +00:00
Sergey Sharybin
6d125e159d i18n: code clean-up
- Move all translation-related declarations to BLF_translation.h
- Reverted some changes to match trunk svn rev40365
2011-09-20 07:39:25 +00:00
Dalai Felinto
b263aefb0e TexFace to Material Settings big patch
Summary:
========
The idea here is to move the texface options into the material panel.
For images with the change please visit:
http://code.blender.org/index.php/2011/09/bge-material-texface-changes

1 - Some of the legacy problems 2.49 and 2.5x has with the texface system:
==========================================================================
1.1) Shadow, Bilboard and Halo are mutual exclusive (in the code), yet you can
select a face to be more than one mode.
1.2) Sort only works for blend Alpha yet it's an option regardless of the
Transparency Blend you pick.
1.3) Shared doesn't affect anything in BGE.
1.4) ObColor only works for Text objects (old bitmap texts) when using Texture
Face Materials. (not address yet, I so far ignored obcolor)

2 - Notes:
============
2.1) Now "Use Face Textures" in material Option panel will work in Multitexture
even if there is no texture channel.

2.2) In FaceTexture mode it will use TexFace all the time, even if you don't
check the "Use Texture Face" option in the UI. It's a matter of decision, since
the code for either way is there. I decided by the solution that makes the
creation of a material fast - in this mode the user doesn't need to mess with
textures or this "Use Texture Face" option at all. I'm not strong in my opinion
here. But I think if we don't have this then what is the point of the Texture
Face mode?

2.3) I kept references for tface only when we need the image, UV or the tiling
setting. It should help later when/if we split the Image and UV layers from the
tface struct  (Campbell and Brecht proposal).

3 - Changes in a Nutshell:
==========================
3.1) "Texture Face" panel (in the Mesh/Object Data panel) no longer exists. Those settings are all part of the material properties, visible when Game Render is set.

3.2) "Texture Face" Shading mode (in the Render panel) is now called “Single Texture”, it needs a material for special settings (e.g. Billboard, Alpha Sort, …).

3.3) New options in the Material Panel
* Shadeless option in the Material panel is now supported for all three Shading modes.
* Physics is now toggleable, this is the old Collision option.
* Two Side (on) is now called Back Culling (off).
* Alpha Sort is one of the Alpha options, together (and mutually exclusive) to Alpha Blend, Alpha Clip, Add and Opaque (i.e. solid).
* Shadow, Billboard and Halo are grouped in the “Face Orientation” property.
* "Face Textures" and "Face Textures Alpha" (under Options) can be used for all but GLSL shading mode (to be supported in GLSL eventually).
* The backend in the game engine is still the same as before. The only changes are in the interface and in the way you need to think your materials. The bottomline is: It’s no longer possible to share materials between faces that do not share the same game properties.

4 - Acknowledgment:
==================
Mike Pan for the design discussions, and testing along the whole development process.
Vitor Balbio for the first hands-on code with the interface changes. That helped me a lot to push me into work on that.
Benoit Bolsee and Brecht van Lommel for patch review (* no one reviewed the whole patch, or the latest iteractions, so I still hold liability for any problems).
Blender artists that gave feedback and helped testing the patch.

Patch review and original documentation can be found here:
http://wiki.blender.org/index.php/User:Dfelinto/TexFace
http://codereview.appspot.com/4289041/
2011-09-19 19:55:59 +00:00
Sergey Sharybin
706a2c80f0 i18n: code cleanup and fixing unneeded translation (when partial translation is used only) 2011-09-19 15:10:38 +00:00
Sergey Sharybin
0a12dd452f i18n: fixed building with player 2011-09-19 11:40:15 +00:00
Sergey Sharybin
1c0bdad835 svn merge -r40222:40344 ^/trunk/blender 2011-09-19 10:48:15 +00:00
Campbell Barton
17f0ff5f7f svn merge -r40279:40295 ^/trunk/blender 2011-09-17 13:15:38 +00:00
Campbell Barton
d4898f9c40 use macros RAD2DEG & DEG2RAD rather then multiplying by 180.0/M_PI or M_PI/180.0 2011-09-17 09:43:51 +00:00
Campbell Barton
1ff373ef5b svn merge -r40166:40279 ^/trunk/blender 2011-09-17 04:59:14 +00:00
Mitchell Stokes
2636be0ac0 BGE Animations: Fixing some refcount issues with KX_Scene::m_animatedlist (fixes m_animatedlist crashes) and some whitespace issues with KX_GameObject::GetActionManager(). 2011-09-16 20:08:05 +00:00
Dalai Felinto
0241e12089 BGE fix: Font Objects not showing up in the dome mode
geez, who coded the font object? or even worse, who did the dome code?
Don't coders talk? tsc tsc ...

Now seriously, KX_KetsjiEngine::RenderFonts() could be moved to inside the KX_Scene class. It probably should (so I could call it from inside KX_Dome::RenderDomeFrame()). Not critical, so not changing it for now.
2011-09-16 18:23:57 +00:00
Campbell Barton
862aababb3 - remove deprecated pose channel members
- change short -> char for flags that support it.
- add pose 'temp' pointer to use for outliner drawing (was using 'prev' and restoring which seems dodjy)
2011-09-16 02:42:50 +00:00
Sergey Sharybin
30293dc2ca svn merge -r39834:40222 https://svn.blender.org/svnroot/bf-blender/trunk/blender 2011-09-15 13:02:37 +00:00
Campbell Barton
fddc655aec svn merge -r40140:r40148 https://svn.blender.org/svnroot/bf-blender/trunk/blender 2011-09-12 04:57:20 +00:00
Campbell Barton
9a1f3c587e - fix for mesh_get_mapped_verts_nors copying short normals to floats without scaling.
- BL_SkinDeformer also did this though for that case its not a problem because the normals are later accumulated anyway.
2011-09-12 04:29:35 +00:00
Campbell Barton
ca662d0fd6 svn merge -r40124:40140 https://svn.blender.org/svnroot/bf-blender/trunk/blender 2011-09-12 00:38:57 +00:00
Benoit Bolsee
b988a2abf8 Recast: fix bad level calls, Recast compiled out if BGE not enabled. SCons updated but not tested. 2011-09-11 14:13:04 +00:00
Campbell Barton
0383fb5341 svn merge -r40104:40117 https://svn.blender.org/svnroot/bf-blender/trunk/blender 2011-09-11 08:28:16 +00:00
Dalai Felinto
5184476fe1 bugfix: [bf-blender-Game Engine][28167] Restart game actuator don't get changed material mode
http://projects.blender.org/tracker/?func=detail&aid=28167&group_id=9&atid=306
Game Actuator (restart or load a new file) will not keep some settings alive (as
we had in 2.49).

In 2.49 the solution used was to use Blender globals (G.fileflags) to get/set
those settings. That was causing the blender file to change if you change the
material mode from the game.

In 2.5 this never worked, and the implementation was buggy (it's relying in the
scene settings, which get reset ever time we restart/load a new file).

My idea for fixing this is to create a new struct (GlobalSettings) where we
store any setting to be preserver during the course of the game. This is
specially important for options that require the game to restart/load new file
(graphic ones). But it later can be expanded to support other things such as
audio settings (e.g. volume), ...
I'm also planning to expand it for stereo and dome settings, but I prefer to
first get this committed and then build a new patch on top of that.


I had some problems in finding a correct way for build/link the blenderplayer
changes, so although it's working I'm not sure this is the best code (e.g. I
couldn't make forward declaration to work in GPG_Application.h for the struct
GlobalSettings so I ended up including KX_KetsjiEngine.h)

[note: I talked with Brecht and he find this is an ok solution. He implemented
it originally so it's good to have his go. However I still think there must be a way to make forward declaration to work. I will see with other devs if there is a better solution]
[also I'm likely renaming glsl to flags later if there are more settings stored in the flags to be used. But for now we are only handling glsl flags]
2011-09-11 05:54:07 +00:00
Campbell Barton
75b3936128 svn merge -r40075:40104 https://svn.blender.org/svnroot/bf-blender/trunk/blender 2011-09-10 23:49:39 +00:00
Sergey Sharybin
bdd4aa27b0 Another set of fixes for recats: osx uses different order of arguments for sort_r
and it's callback.

Also do not use char constants like 'NAVM' which is casting to int.
And added defautl section to switch in KX_NavMeshObject::DrawNavMesh.
2011-09-10 14:12:15 +00:00
Campbell Barton
357febc168 fix for building with collada and some other warnings 2011-09-10 09:38:38 +00:00
Campbell Barton
fb4abf2e41 fixed linking with CMake 2011-09-10 03:42:45 +00:00
Campbell Barton
0128218254 recast and detour patch now builds again with GCC
- rearrange structs to work for 64bit
- define all vars before goto's
- ifdefs for qsort_r/qsort_s
- dont cast pointers to int only for NULL checks
- dont printf STR_String directly, get the char pointer from it

also minor change to gpu py module, no need to pass empty tuple to PyObject_CallObject, can just be NULL
2011-09-10 03:07:26 +00:00
Guillermo S. Romero
a7f3e347b7 SVN maintenance. 2011-09-09 22:02:12 +00:00
Benoit Bolsee
c1c4743696 svn merge -r 39975:40061 https://svn.blender.org/svnroot/bf-blender/trunk/blender 2011-09-09 12:21:41 +00:00
Benoit Bolsee
dbd6658d73 svn merge -r 37306:39975 https://svn.blender.org/svnroot/bf-blender/trunk/blender 2011-09-07 15:34:04 +00:00
Campbell Barton
a167ee1262 svn merge -r39951:39986 https://svn.blender.org/svnroot/bf-blender/trunk/blender 2011-09-07 00:46:11 +00:00
Campbell Barton
9161d3ce4b use Py_ssize_t rather than int when dealing with list sizes (original patch from Fedora but applied changes elsewhere too), also replace PyList_Size with PyList_GET_SIZE where typechecking is already done. 2011-09-06 23:46:20 +00:00
Joerg Mueller
813d09cb59 BGE fix: ignore sounds that cannot be opened instead of crashing. ;-) 2011-09-06 21:02:26 +00:00
Campbell Barton
e74e245030 svn merge -r39890:39951 https://svn.blender.org/svnroot/bf-blender/trunk/blender 2011-09-06 03:16:12 +00:00
Campbell Barton
0991bed413 fix some complier warnings and add -Wundef to CMake's default GCC warnings. 2011-09-05 23:40:52 +00:00
Brecht Van Lommel
a6d9a5a972 Code cleanup: warning fixes. 2011-09-05 19:27:21 +00:00
Xiao Xiangquan
034cda72d3 add missing files after merging 2011-09-05 14:44:11 +00:00
Mitchell Stokes
103b06d4df BGE animations: fixing initialization order issues for BL_ActionActuator and BL_ArmatureObject. Thanks to z0r for pointing them out and providing a fix. 2011-09-04 01:42:47 +00:00
Mitchell Stokes
70e3541f3a BGE animations: Fixing a potential crash when using camera IPOs. The IPOs were being created off of blendercamera->adt->action when they should have been using the supplied action. Thanks to z0r for pointing out the problem and a potential fix. 2011-09-04 01:27:16 +00:00
Mitchell Stokes
1f8291f78d BGE animations: Adding a separate list to KX_Scene for animated objects. This makes scenes with a lot of non-animated objects faster. In my test scene with 8000 static, non-animated cubes my time spent on animations went from 1.5~1.7ms to 0.001ms. 2011-09-03 20:48:47 +00:00
Mitchell Stokes
8295480bbe BGE animations: Fixing a crash that would happen if the property for a property mode action actuator was invalid. 2011-09-03 19:33:07 +00:00
Campbell Barton
58227c1016 svn merge -r39878:39890 https://svn.blender.org/svnroot/bf-blender/trunk/blender 2011-09-03 12:57:33 +00:00