Commit Graph

49924 Commits

Author SHA1 Message Date
Bastien Montagne
e1b67c9bc0 Fix T46002: mathutils.geometry.intersect_line_line_2d doesn't operate on lines, but on line segments.
Ugly issue really, but at least doc now matches behavior of the function. :|
2015-10-13 09:59:42 +02:00
Campbell Barton
8f92cbd4a7 missed last commit (use utility function) 2015-10-13 16:31:43 +11:00
Campbell Barton
0528c16b3a Cleanup: simplify view3d trackball logic 2015-10-13 16:28:18 +11:00
Campbell Barton
5e75acf81d Fix T46450: Seams from islands, wont show 'Sharp' 2015-10-13 09:00:03 +11:00
Campbell Barton
e32430df34 Fix T46458: BGE Crash on load
regression from 96dd213e7
2015-10-13 08:43:41 +11:00
Bastien Montagne
cee8a3148c Usual UI message fixes... 2015-10-12 21:34:14 +02:00
Bastien Montagne
cdd727b7ce Add functions to compute normals (verts, polys and loops ones) for a given shapekey.
Title says pretty much everything, we now have BKE and RNA funcs to get vertex, poly and
loop normals of a given shapekey.

This will be used e.g. in FBX exporter (shapekeys need normal data too).

Reviewed By: campbellbarton

Differential Revision: https://developer.blender.org/D1510
2015-10-12 20:12:55 +02:00
Brecht Van Lommel
ee688e24a7 Fix T46451: edge slide even and flipped not available in redo popup. 2015-10-12 17:40:34 +02:00
Bastien Montagne
591f4549c9 WM linking code rework.
New code loops much less, does re-open & close .blend files for each data type,
and is much much more flexible - it is also ready for id-remap & co work being done in branches.

Main idea is to store libraries & datablocks to link in a dedicated struct, in a way
that avoids too much looping, and also allows to search for a single datablock in several libraries.

Here again, no change is expected in current behavior of link/append tool, please report
if anything goes different!
2015-10-12 15:20:51 +02:00
Bastien Montagne
2e8fcac15d Cleanup & rework of BLO_linking code.
This commits does mostly two things:
* Get rid of bContext parameter: I can see no real good reason to pass such a high-level data
  to such low-level code... It also makes it more difficult to call when you do not have
  a context available.
* Cleanup the instantiating part.

Last point is the most risky - previous code was sometimes quite confusing and hard to follow,
from tests nothing behaves differently in new code, but some hidden corner case may show up.

Anyway, no change in behavior is expected from this commit, if it happens please file a bugreport!
2015-10-12 15:07:07 +02:00
Bastien Montagne
d24bafa0d5 Cleanup: BLO: use proper typedef for expand_doit callback. 2015-10-12 14:31:47 +02:00
Bastien Montagne
6f41febff1 Cleanup: BLO: move func doc comments to definitions of functions.
Follows our conventions and makes include file itself much cleaner.
2015-10-12 14:30:00 +02:00
Bastien Montagne
4bc08d09ae Cleanup in BLO API: rename 'append' funcs to 'link', since none do append, but only linking of datablocks! 2015-10-12 13:47:44 +02:00
Bastien Montagne
07332dd2bb Fix T34446: Make Local on linked mesh object: object gets removed if redo function is used.
Root of the issue is that we do not re-read lib data blocks and ID placholders (ID_ID bheads)
in undo context (in `blo_read_file_internal`), because `BLO_read_from_memfile` copies
lib datablocks and Main data directly from oldmain.
The idea being, linked data do not change from undo/redo.

This is valid as long as linked data was not changed by the undo step - but if some
was deleted or localized, it will be missing from oldmain, leading to data loss
(note that does not only concern objects, all linkable data types can be affected,
at least in theory).

This commit addresses that issue by carefully mixing reuse of needed data from oldmain,
and "normal" re-reading of missing one. Makes us swimming in some rather dark waters,
and gives a rather non-easy-to-follow code, but it seems to work quite well,
and only other solution would be to get rid of that optimization
(not re-reading all libs on undo/redo), which is not acceptable.

Also, thanks to @carlosdp for initial investigation of the issue.

Differential Revision: https://developer.blender.org/D1485
2015-10-12 12:15:05 +02:00
Campbell Barton
e0c05a1e6a Support applying scale for font objects 2015-10-12 13:13:38 +11:00
Campbell Barton
e302105981 Cleanup: RNA naming, use 'max' as a suffix 2015-10-12 12:31:55 +11:00
Campbell Barton
eb6e8521c2 RNA: correct tips 2015-10-12 12:31:55 +11:00
Brecht Van Lommel
758febba45 Fix T46446: texture nodes image node not working with image sequences. 2015-10-12 03:22:43 +02:00
Campbell Barton
c2ce38b102 Fix T46434: Shear w/ local-center & editmode fails 2015-10-12 12:02:22 +11:00
Campbell Barton
1b8a4fd9bd Fix T46444: Crash importing DAE w/ empty armature 2015-10-12 11:35:08 +11:00
Brecht Van Lommel
d7ceca8c93 Fix T46085: UV project modifier artifacts with vertices behind the camera. 2015-10-11 20:36:38 +02:00
Thomas Szepe
bd6febc4c4 BGE: Change KX_WolrdInfo mathutils vector to color
Change the mathutils callback from vector to color for mistColor, backgroundColor and ambientColor.

Reviewers: lordloki, campbellbarton, panzergame, moguri, sybren

Reviewed By: panzergame, moguri, sybren

Projects: #game_engine, #game_logic

Differential Revision: https://developer.blender.org/D1432
2015-10-11 18:43:05 +02:00
Thomas Szepe
3dd83b533a BGE: Adding a Max Jumps value to the character physic window
Actually we only have a Python API that allows to change the max jumps value.
The patch also allows non programmers to change the maximum numbers of jumps.

Reviewers: panzergame, sybren, campbellbarton, lordloki, moguri, agoose77

Reviewed By: lordloki, moguri

Projects: #game_engine

Differential Revision: https://developer.blender.org/D1302
2015-10-11 18:28:43 +02:00
Sergey Sharybin
3f4c0612fe Fix T45058: Cycles hair shader reflects incorrectly for meshes
The issue was caused by non-continuous tangent space calculated for triangles.

This commit adds a Tangent input to Hair BSDF node which can be used to hook up
Tangent calculated form UV as an input to the node in order to make sure the
tangent space is continuous.

Doing this as an input instead of using default tangent layer from UV because of
several reasons:

- This way it's really easy to preserve compatibility with existing setups.

- Default UV map is not necessarily giving continuous space, one might want to
  use other tangent space sources or distort the space for some artistic
  decision.

Reviewers: juicyfruit, dingto

Reviewed By: dingto

Differential Revision: https://developer.blender.org/D1428
2015-10-11 19:43:30 +05:00
Thomas Szepe
83721682bb BGE: Change character jumping to char
* Change the character jumping variables and methods from int to char.
* Limit the maxJumps integer value from 0 to 255.
* Allow to set the minimum jump amount to 0.

Reviewers: panzergame, lordloki, moguri

Reviewed By: lordloki, moguri

Subscribers: agoose77

Projects: #game_engine

Differential Revision: https://developer.blender.org/D1305
2015-10-11 15:41:40 +02:00
Thomas Szepe
cdb8bf0c96 BGE: Add icons to collision shapes.
This patch adds icons to the physic collision shapes.
Adding a new capsule shape 'mesh_capsule' icon which represent the shape better then the metaballs icon.
And replace the metaballs icon for the Blender collision shape.

{F206628}

Reviewers: moguri, sybren, agoose77, lordloki, mont29, panzergame, campbellbarton

Reviewed By: lordloki, panzergame, campbellbarton

Projects: #game_engine, #game_ui, #user_interface

Differential Revision: https://developer.blender.org/D1403
2015-10-11 14:32:20 +02:00
Thomas Szepe
2247ebe16e BGE: Add recursive dupli group deletion
This patch will delete all associated objects from a group instance (dupli group) if the are deleted.

Reviewers: brita_, sybren, lordloki, moguri

Reviewed By: lordloki, moguri

Projects: #game_engine

Maniphest Tasks: T36388

Differential Revision: https://developer.blender.org/D1205
2015-10-11 14:08:38 +02:00
Thomas Szepe
d1ee195260 BGE: Adding a screenshot function to game actuator
Extending the existing game actuator with a screenshot function, to give also non programmers the ability to take screenshots in the BGE.

Reviewers: lordloki, campbellbarton, moguri

Reviewed By: lordloki, moguri

Subscribers: lordloki, Genome36

Projects: #game_engine

Differential Revision: https://developer.blender.org/D651
2015-10-11 13:41:38 +02:00
Campbell Barton
3748bbf2d9 Cleanup: warning with new glew 2015-10-11 12:54:14 +11:00
Brecht Van Lommel
6e66ddf5ed Fix warnings and remove casts by adding copy_vx_vx_uchar() functions. 2015-10-11 02:15:44 +02:00
Brecht Van Lommel
bb580664e6 Fix T46441: texture paint soften brush at 0 strength works at full strength. 2015-10-10 23:20:31 +02:00
Brecht Van Lommel
df1a3b0fda Fix T45152: multiview/stereo render not working with Freestyle + Cycles. 2015-10-10 19:18:42 +02:00
Brecht Van Lommel
fc7c856da2 Fix T44048: freestyle lines in Cycles are in the wrong color space. 2015-10-10 18:44:19 +02:00
Brecht Van Lommel
b098609186 Fix various compiler warnings. 2015-10-10 17:35:30 +02:00
Campbell Barton
05acf3d43a Random Select Seed Option
Add 'Seed' option for all random select operators

D1508 by @mba105, w/ edits
2015-10-10 23:52:11 +11:00
Bastien Montagne
db3dfb76a8 Fix T46426: 2D-version of zoom border operator is available in 3DView context. 2015-10-09 22:24:58 +02:00
Bastien Montagne
165c87dc4f Cleanup: 3DView object drawing: afterdraw lists: better 'loop & remove' with BLI_pophead.
Saves two lines and a temp variable for each loop...
2015-10-09 21:26:33 +02:00
Bastien Montagne
01f235e138 Fix T46418: Constraints - influence other than 0 or 1 - bad results with non-homogeneous scaled matrices.
Use new interp_m4_m4m4 instead of blend_m4_m4m4.

Note that maybe we could replace other usages of blend_m... by interp_m...,
but this should be investigated on a case-by-case basis.
2015-10-09 21:26:33 +02:00
Bastien Montagne
be72df4f06 BLI_math: add mat3_polar_decompose, interp_m3_m3m3 and interp_m4_m4m4.
mat3_polar_decompose gives the right polar decomposition of given matrix,
as a pair (U, P) of matrices.

interp_m3_m3m3 uses that polar decomposition to perform a correct matrix interpolation,
even with non-uniformly scaled ones (where blend_m3_m3m3 would fail).

interp_m4_m4m4 just adds translation interpolation to the _m3 variant.
2015-10-09 21:26:33 +02:00
Bastien Montagne
8159718faf BLI: add SVD solver for mat3 (using eigen3). 2015-10-09 21:26:33 +02:00
Bastien Montagne
c8005703f2 Fix T46420: Segfault when instancing smoke domain.
Looks like instancing of smoke sim is not supported at all
(was fake-working in 3DView in 2.74, but not rendered).

But it should not crash - code was adding temp 'fromdupli' base to the delayed
drawing list...

Nice to backport this to 2.76 I think.
2015-10-09 10:51:38 +02:00
Sybren A. Stüvel
46ad220305 BGE Fix T41943: Zeroing out angular velocity not possible
This patch makes it possible to zero out angular velocity. tiny angular
velocities may cause instabilities, according to the discussion in T41943,
so they are mapped to (0, 0, 0) instead.

It also applies the same reasoning to the linear velocity, unifying the
different approaches.

Differential revision: D952
2015-10-09 09:50:20 +02:00
Campbell Barton
ff7effdc04 Correct own error in editmesh bvh
Flag mix-up and uninitialized var.
2015-10-09 16:35:42 +11:00
Campbell Barton
e9b9b883fb Fix leak creating 'empty' looptri bvh tree 2015-10-09 11:22:41 +11:00
Brecht Van Lommel
103e38cbec Fix T46415: empty node group in GLSL shader has incorrect socket type conversion. 2015-10-09 01:29:13 +02:00
Campbell Barton
05ee31e38c Fix error after change to IDWalkFunc 2015-10-09 09:27:23 +11:00
Porteries Tristan
24c94eaf9c BGE: Use BLI_task instead of pthread in KX_BlenderSceneConverter. 2015-10-08 21:38:12 +02:00
Sergey Sharybin
fd2bdc07ca Fix crash loading modifiers with missing IDs
Was very visible with barcelona file from Cycles benchmark repository.
2015-10-08 21:06:09 +05:00
Sergey Sharybin
216f1916a2 Fix compilation error with bullet disabled 2015-10-08 21:01:44 +05:00
Lukas Stockner
e3abcd6723 Cycles: Add an interpolation option to environment textures
This commit exposes the interpolation parameter for environment textures (requested by DolpheenDream on IRC), just as it already is for image textures.

Reviewers: sergey

Differential Revision: https://developer.blender.org/D1544
2015-10-08 15:45:45 +02:00