Commit Graph

34165 Commits

Author SHA1 Message Date
Campbell Barton
436295026a patch [#29662] Modifications to Mathutils Vectors for Consistency with Commit 42752
from Andrew Hale
2011-12-20 05:48:35 +00:00
Campbell Barton
a8ed803b66 rename internal matrix struct member vars to avoid confusion
Matrix.contigPtr --> matrix
Matrix.row_size --> num_col
Matrix.col_size --> num_row
2011-12-20 04:11:23 +00:00
Campbell Barton
3d8ee28750 __str__ functions for other mathutils types 2011-12-20 03:37:55 +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
553cf289a7 patch [#29651] Add a __str__ Method to Matutils Matrices so print(matrix) Shows Columns as Columns
from Andrew Hale

converted from python string formatting to using BLI_dynstr
2011-12-20 02:54:25 +00:00
Campbell Barton
a7a6049978 minor edits to previous commit & set VKey to toggle vertex select in weight paint mode. 2011-12-20 02:04:35 +00:00
Campbell Barton
4d08df734c unit test for mathutils python module from Andrew Hale, runs in CTest too 2011-12-20 01:49:24 +00:00
Michael Fox
84a58fd7e9 Patch #27085, Restore old 2.49 TAB behaviour for window splitting, by Andre Oliveira
Now this patch only applies to RMB window splitting not the click and drag as that would cause confusion and big mess
2011-12-20 00:46:55 +00:00
Campbell Barton
71ce197bbb patch [#28094] New equirectangular world texture mapping option 2011-12-19 23:52:17 +00:00
Campbell Barton
a7bae8474b calculate weight paint colors once per vertex rather then on every face corner (was doing the same deform vert lookup and color calculation multiple times per vertex),
Quick shows over 2x speedup in my tests, will give bigger speedup with more vertex groups.

If you happen to have vertices with no faces using them - vertex colors will be calculated unnecessarily, but this isnt a common use case for weight paint mode.
2011-12-19 22:55:04 +00:00
Thomas Dinges
b66c87231a * Changes for static win32 png libs. 2011-12-19 19:46:07 +00:00
Thomas Dinges
0ebb1a3f9f * Fix for moving mingw png libs. 2011-12-19 14:46:17 +00:00
Brecht Van Lommel
27df40f87f Fix #29653: fix wrong cycles depth of field distance when rendering with a
scaled camera.
2011-12-19 14:23:24 +00:00
Brecht Van Lommel
a64d92eb13 Fix #29655: keyboard shortcuts missing from text editor text menu, and removed
confirmation popup for creating new text datablock.
2011-12-19 14:23:19 +00:00
Brecht Van Lommel
a0af3f7ffe OS X: add BLENDER_SOFTWAREGL environment variable to force using software OpenGL
renderer, for debugging OpenGL issues.
2011-12-19 14:23:08 +00:00
Bastien Montagne
41c992ce85 Much cleaner and satisfying code in weightvg modifiers' "init": copy only the CD_DEFORMVERT data layer (if it's the org one), and not the whole DerivedMesh!
Quite oddly, for Proximity mod, this increases the performances of the apply func (about 20-25%, e.g. from 0.04 to 0.03 sec), but decreases the global framerate (e.g. in TEST_5 scene of testing file, I lose about 7%, from 4.6 to 4.3fps (open ATI driver)...).
2011-12-19 14:09:36 +00:00
Lukas Toenne
26b3dfa30e Automatically hide unused (=unlinked) node sockets in collapsed ("hidden") nodes. This is to make nodes with many sockets cleaner and simpler, which is the purpose of collapsing nodes in the first place.
The hiding code uses the SOCK_IN_USE flags already present. These were only temporarily set by the shader node code for determining needed texture coordinate types. Now they are used persistently and updated along with the sock->link pointers.
2011-12-19 12:04:05 +00:00
Lukas Toenne
a9f0266448 Display button for hiding unused node sockets in the side bar, as an alternative to the removed node header button. 2011-12-19 11:55:35 +00:00
Bastien Montagne
90ef435145 Fix a bug in CustomData_duplicate_referenced_layer(_named) functions: MEM_dupallocN does not work with complex layers like CD_MDEFORMVERT ones, so rather use copy func when available. 2011-12-19 08:26:53 +00:00
Campbell Barton
53f88b231a corrections to some comments 2011-12-19 05:23:52 +00:00
Campbell Barton
0bc83a2f35 - mathutils matrix creation - use memcpy rather than copying every matrix row/col individually.
- creating a new non-square matrix would use uninitialized memory.
2011-12-19 05:14:09 +00:00
Campbell Barton
c3675c0e90 remove mathutils internal variable for storing pointers to each matrix row, instead use macros to access row/column's.
also add an assert so invalid index access will raise an error in debug mode, without this it was quite easy to access invalid memory without meaning to.

no functional change.
2011-12-19 03:12:10 +00:00
Campbell Barton
d0aa012b0a change BLI_assert() so it can be included in other defines. 2011-12-19 03:06:44 +00:00
Thomas Dinges
9d3e755b4c Fix for cmake for recent mingw png lib move. 2011-12-18 23:32:24 +00:00
Thomas Dinges
8f0e9c7c09 MinGW png libs
* Moved to gcc/png in the libs dir.
2011-12-18 23:23:09 +00:00
Campbell Barton
32896bbf59 remove unneeded NULL check in ui_searchbox_create() which confuses static checkers since the values used later. 2011-12-18 22:42:43 +00:00
Campbell Barton
65f2cbdd0f remove windows only benchmark functions, use PIL_time.h's TIMEIT macros instead. 2011-12-18 22:35:52 +00:00
Bastien Montagne
64567ffb87 Minor tweaking to WeightVGProximity modifier code (not really usefull currently, but mandatory for other future changes…) 2011-12-18 21:46:26 +00:00
Lukas Toenne
24785cc16a Removed buttons in node headers for hiding unused sockets and for hiding the (non-socket) option buttons. These are rarely used buttons that only complicate the UI. Alternatively these operators can still be accessed in the Node menu of the node editor window, "Toggle Hidden Node Sockets" and "Toggle Node Options" respectively. 2011-12-18 17:59:04 +00:00
Lukas Toenne
5f6bd44c82 Generalized node groups for Cycles.
This allows group nodes inside other group nodes in cycles and makes the
code more generic for all possible cases, like direct group
input-to-output links and unused group sockets.

Previous code tried to connect external nodes and internal group sockets
by following links until a "real" node input/output. This quickly
becomes complicated in corner cases as described above and can lead to
unexpected behavior when the group socket is of a different type than
the internal/external sockets, but that conversion is skipped.

The new code uses the concept of "proxy nodes" similar to what the new
compositor does. Each group socket is replaced with a proxy node with a
single input and output, to which other nodes in the same tree and
internal nodes can link to. After all groups have been expanded in the
graph, these proxy nodes are removed again, adding converter nodes if
necessary.
2011-12-18 15:34:06 +00:00
Campbell Barton
b49463c439 cleanup of weight paint color setting code, no functional changes 2011-12-18 12:54:50 +00:00
Lukas Toenne
a885d8aee6 Fix for toggle buttons in node headers.
The buttons for "hiding" (collapsing) a node, hiding unlinked sockets, additional options, the preview and for opening a node group were all using a custom mouse test function, which was broken. They now use actual buttons instead of just displaying icons. Before executing the respective operators the button's node has to be selected and activated, so the buttons use an intermediate handle function, which selects the node and then calls the operator.
2011-12-18 12:51:50 +00:00
Campbell Barton
8ed5fdde1d - remove rna access to deprecated sequencer attributes x/y offset & zoom.
- Object.to_mesh was still using deprecated colbits variable (object material wouldnt work for any material after 16)
- dont set colbits when setting material slot anymore.
2011-12-18 09:36:47 +00:00
Campbell Barton
9c9099a805 formatting edits in py api, no functional changes 2011-12-18 08:50:06 +00:00
Campbell Barton
414370b8d4 Support for arbitrary sized vectors - (was limited by 2-4 previously)
patch http://codereview.appspot.com/5482043
from Andrew Hale

* Text from the submission *

This patch adds the ability to use arbitrary sized vectors from mathutils.
Currently vectors are only of size 2, 3 or 4 since they are generally restricted
to geometric applications. However, we can use arbitrary sized vectors for
efficient calculations and data manipulation.
2011-12-18 07:27:11 +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
Bastien Montagne
74a1123059 Quite some compiler warnings... 2011-12-17 16:22:08 +00:00
Antony Riakiotakis
b8e96e70dc better to generate the library string always because it could lead to null pointer dereferences. I don't have a non-shader system to check so skipping the conditional just to be safe 2011-12-17 13:02:31 +00:00
Antony Riakiotakis
7d2fbfeb9f move GPU_code_generate_glsl_lib to GPU_extensions_init. This makes more sense as we cleanup the library string in GPU_extensions_exit. Thanks to Mitchel Stokes for reporting and proposing this 2011-12-17 12:58:20 +00:00
Jason Wilkins
04fbfc2179 Calculation of the center and normal for sculpting would ignore whether the sculpting tool is using the current vertex positions/normals or the positions/normals from before the current edit. Most of the time this will lead to subtle and hard to predict differences from what a user might expect. There was sum testing and discussion about at the end of last summer and even some screen shots showing the difference. I'm going to go ahead and apply this since I do not think it is controversial. 2011-12-17 03:49:39 +00:00
Campbell Barton
84236c2502 use 2d copy functions with UV's in more places. 2011-12-17 03:46:38 +00:00
Brecht Van Lommel
994f4bb3f7 Code cleanup: fix a few warnings (>= 0 and == -1 tests on unsigned types). 2011-12-17 01:13:02 +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
Joerg Mueller
9276fb479e Automatically update sound animation cache when doing a mixdown. 2011-12-17 00:22:15 +00:00
Brecht Van Lommel
4d6c34462c Fix #29640: make duplicates release keep hierarchy and parent properties not
working for multiple objects.

ID.newid only worked for one object, now it uses a hash instead.
2011-12-16 23:56:18 +00:00
Brecht Van Lommel
6f24642a2d Fix #27847: sequencer scene strip rendering crash, due to use of freed
RenderResult.rect. Sergey did all the work to track this down, I'm just
committing a slighty different fix.
2011-12-16 22:45:29 +00:00
Brecht Van Lommel
c82fdb8e41 Fix use of deprecated im_type member in quicktime export. 2011-12-16 22:33:22 +00:00
Brecht Van Lommel
5fa014ff02 Fix #29569: region expander widget drawing poorly antialiased. 2011-12-16 22:00:53 +00:00
Dalai Felinto
2a6fdbcccd Cycles Gamma Node
Node specially useful for Texture correction.

This is also a nice example of a simple node made from scratch in case someone wants to create their custom nodes.
Review by Brecht.
2011-12-16 20:35:06 +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