Commit Graph

48282 Commits

Author SHA1 Message Date
Tamito Kajiyama
ce504cffad Freestyle: Fix for assertion failure in viewport preview.
An assertion to check if `re->clipsta` < 0 (added as part of addressing
T36009 in rBrB795034c17d76bef2a15e576ac9c70ae2268a823b) was failing when
Freestyle viewport preview rendering takes place in the camera view with
an orthographic camera (in this case, the user-defined clipping range is
used without changes, so that `re->clipsta` is positive).  The
`re->clipsta` property has a negative value only when the 3D viewport is
in an orthographic view but not in the camera view.  It seems that this
viewport setting cannot be identified from rendering settings accessible
from Freestyle.  Now a negative `re->clipsta` value is directly checked
instead, without relying on other render flags.
2015-05-12 02:18:24 +09:00
Bastien Montagne
1bf685488c Collada Exporter: sanitize a bit lnor export.
In case `BKE_mesh_calc_normals_split()` would fail, exporter would read
uninitialized random mem... Should not happen, but better be safe than sorry.
2015-05-11 17:22:18 +02:00
Bastien Montagne
2c4736e6db Clearing preview image shall also unset 'user edited' flag! 2015-05-11 17:12:31 +02:00
Bastien Montagne
d30f664c04 Expose PreviewImage & custom icons to py API.
This commit mainly:

* Exposes PreviewImage struct in RNA, including ways for user to set images data.
* Adds a new kind of PreviewImage, using a file path and IMB_thumb to get image.
* Adds a new kind of custom icon using PreviewImage, unrelated to ID previews system.
* Adds a python API (utils.previews) to allow python scripts to access those custom previews/icons.

Note that loading image from files' thumbnails is done when needed (deferred loading), not
when defining the custom preview/icon.

WARNING: for release addons who would want to use this, please keep it to a strict minimum, really needed level.
We do not want our UI to explode under hundreds of different flashy icons!

For more info, see also the release notes of Blender 2.75 (http://wiki.blender.org/index.php/Dev:Ref/Release_Notes/2.75/Addons)
and the example/templates featured with Blender.

Patch by Campbell (ideasman42), Inês (brita) and Bastien (mont29).

Differential Revision: https://developer.blender.org/D1255
2015-05-11 16:37:15 +02:00
Antony Riakiotakis
cc1883468d Keep valgrind happy by using tight vec3 packing instead of lax vec4 with
an unused coordinate missing.
2015-05-11 14:14:06 +02:00
Campbell Barton
dfbb876d46 UI: initial support for UI editing selected items
Add basic support (holding Alt) to edit all selected objects/bones/sequences.
2015-05-11 15:32:43 +10:00
Campbell Barton
097862cb26 GHash: avoid redundant casts 2015-05-11 12:39:39 +10:00
Campbell Barton
18cf235893 GHash: use const keys when only used for lookups 2015-05-11 12:39:08 +10:00
Campbell Barton
3141870c96 Outliner: postpone rebuilding the tree
On existing Blender could rebuild tree many times (on freeing each ID).
Use a flag instead of immediately rebuilding.
2015-05-11 11:09:21 +10:00
Campbell Barton
f4bae1f6d6 Outliner: cleanup flag was never cleared
Was running cleanup on every draw.
2015-05-11 10:58:53 +10:00
Campbell Barton
9e2e85a367 GHash: Add BLI_ghash_ensure_p_ex to copy the key
Needed in cases where the memory from each key is owned by the GHash.
2015-05-11 09:27:05 +10:00
c20c07f27a Fix T44633: image cache broken for movies and sequences.
After multiview, it was continuously unloading/loading image buffers from
the cache due to mismatch in cache insert and lookup keys.
2015-05-10 20:51:18 +02:00
Porteries Tristan
4d8f7eddda BGE : Fix crash during physics mesh update.
Currently we can't update the physics mesh of an added rigid body.
The cause is that that we need to update all shapes to say that the mesh was changed, for static object we don't do that previously because we use a odd way to reallocate memory at the same place.
So now when a mesh is changed we iterate all physics controllers which use the same shape info and recreate its shape with the correct mesh.

example file : {F168100}

Reviewers: scorpion81, sergof, hg1, sybren, moguri, agoose77

Reviewed By: moguri, agoose77

Subscribers: sybren

Differential Revision: https://developer.blender.org/D1269
2015-05-10 19:21:21 +02:00
Gaia Clary
0525db39d1 fix T44648: Collada finding bone chains during import crashes when no bones are there 2015-05-10 11:04:37 +02:00
Bastien Montagne
1fb97ffeed Fix T44644 Missing thread-protection (spinlock) of image in new multiview code.
Many thanks to Sergey, for practically giving the solution!

Note that it may also fix T44345, depends whether there are other missing
protections/locks or not...
2015-05-10 09:18:52 +02:00
Jorge Bernal
dc95ca92ca BGE: Fix T43822 Videotexture does not use sky color for off-screen
rendering

Make scene background color as default for render-to-texture instead of
current blue color (0, 0, 255).

It is very useful for mirrors setups.

Reviewers: moguri, ben2610, sybren, panzergame, hg1

Reviewed By: panzergame, hg1, moguri

Subscribers: mpan3

Differential Revision: https://developer.blender.org/D1287
2015-05-10 00:56:51 +02:00
Porteries Tristan
8647c7d501 Fix T38335: incorrect triangle index in raycast with more than 2 quads
eb81153896 broke the fix for T38335, and this fix was incomplete, now we iterate by triangles and polys in the same while block.
2015-05-09 19:12:22 +02:00
Tamito Kajiyama
8c1b805f87 Freestyle: Partial fix for a crash with Save Buffers option enabled.
Prevents null pointer references in the case of the Save Buffers option
enabled.  This is a regression likely due to rBd5f1b9c22233.
2015-05-09 13:20:40 +09:00
Campbell Barton
eb81153896 Cleanup: warning (sequence-point) 2015-05-09 11:00:50 +10:00
Julian Eisel
54ac84f2b8 Fix 3D View Properties scrollbar being not set to top in startup.blend 2015-05-08 22:20:18 +02:00
Porteries Tristan
6ee0327594 Fix T38335: incorrect triangle index in raycast result
Previously we forgot to do a special operation for indexes to convert a quad to two triangles.
2015-05-08 21:12:36 +02:00
Ines Almeida
a08d90f070 matcaps browser: changing emboss style and grid direction according to T44613 2015-05-08 19:22:41 +01:00
Antony Riakiotakis
b65c77e664 Add Intel's 3000 driver to exceptions for df/dy calculations. Should fix
another case of SSAO effect reversal.
2015-05-08 19:25:51 +02:00
Porteries Tristan
2e6634e4a8 BGE: Cleanup function UpdateMesh and SetMesh in CcdPhysicsController.cpp
"if (value == true)" -> "if(value)"
"if (ptr == NULL)" -> "if (!ptr)"
"vector<bool>" -> "std::vector<bool>"
And other blender typo.
2015-05-08 18:17:37 +02:00
Antony Riakiotakis
4c79608b3b Revert "Motionpaths: Use scene range option, takes start/end frame and
preview"

Looks like this does not work for animators here after all, will use a
different code for this (probably not hardcoded)

This reverts commit 3bbb4020e7f0fae80a5edd31e19b7fa97d2149e4.
2015-05-08 17:16:59 +02:00
Antony Riakiotakis
3bbb4020e7 Motionpaths: Use scene range option, takes start/end frame and preview
settings into account.
2015-05-08 12:35:52 +02:00
Bastien Montagne
945e302409 Cleanup: #define -> enum, and get rid of useless braces in case's. 2015-05-08 10:44:18 +02:00
Bastien Montagne
9190d18b74 Fix T44634: Slide edge not responding to ALT + WHEEL to change reference edge in "even mode".
Modal events (TFM_MODAL_EDGESLIDE_UP/_DOWN) were eaten by NOP generic transform event handling...
2015-05-08 10:29:59 +02:00
Campbell Barton
a8da11c014 Add missing TEXTEDIT_UPDATE option 2015-05-08 08:58:29 +10:00
Campbell Barton
a077be3658 Cleanup: use r_* prefix for return args 2015-05-08 07:25:39 +10:00
Campbell Barton
e010960431 DNA; document how to ignore a struct 2015-05-08 06:54:13 +10:00
Antony Riakiotakis
0a82c3cfef Minor cleanup 2015-05-07 18:32:35 +02:00
Antony Riakiotakis
a5dead2e8c Fix T44604 bad quality of rake with bezier curves.
We can calculate tangents analytically for bezier curves, so just make
them awesome. New code uses forward differencing calculation for
efficiency just like curve calculation.

Picture before/after:

http://www.pasteall.org/pic/87843
2015-05-07 18:10:48 +02:00
Bastien Montagne
a2eb94b470 Fix T44631: Custom Normal Data Transfer crash.
Own stupid mistake in rBcdabf7e3...
2015-05-07 15:32:37 +02:00
Bastien Montagne
aa3fc89257 Fix T44611: 'make_links_data' modifiers would fail and crash with multires modifier.
Since it was not ensuring dest has valid mdisp data matching new multires modifier subdiv level...

Also, fixed a bug in `multires_subdivide()`, which would crash when trying to
increase from level 0 (aka no subdiv) to > 1 (wrong check, trying to interpolate
when it should not). And added a few sanity checks.
2015-05-07 15:19:32 +02:00
Antony Riakiotakis
15fd37fab2 Rake: store last position from mouse, don't store halfpoint between last
and current position.

patch by Bastien
2015-05-07 15:04:11 +02:00
Antony Riakiotakis
e6a7fdd309 Fix T44627, black spots with lock alpha in projection paint:
Painting would revert alpha even on unpainted pixels, where values would
contain garbage.
2015-05-07 14:49:40 +02:00
Antony Riakiotakis
e39ec27bba Fix crash when rendering opengl from sequencer. 2015-05-07 14:09:30 +02:00
Campbell Barton
e3b0d5e99b EdgeSlide: support for un-clamped sliding
Functionality matches vertex slide.
2015-05-07 21:31:24 +10:00
Campbell Barton
94b9b259e7 Cleanup: remove unneeded context arg 2015-05-07 21:31:24 +10:00
Campbell Barton
2ec808a4bc EdgeSlide: use pairs for TransDataEdgeSlideVert
no functional changes
2015-05-07 21:31:24 +10:00
Campbell Barton
cb7fdf45cd EdgeSlide: fix divide by zero 2015-05-07 21:31:24 +10:00
Antony Riakiotakis
11cf1ebdd1 Fix first part of T44627, locking alpha should happen in straight space
for float images or we get inconsistent premultiplied values.
2015-05-07 11:42:37 +02:00
0e9b210595 Fix T44630: incorrect mirror modifier merge limit tooltip. 2015-05-07 10:57:37 +02:00
Antony Riakiotakis
236360c838 Change fix for T44530 which caused a "regression".
Looks like the previous commit here is really correct and fixes cases of
distortion that were in mirror-subsurf combination since blender 2.5.

This may cause some changed files in which case we will be adding an
option, but it is expected this will only happen with low res models,
and hand painted textures, and the better distortion here compensates
for that enough to consider not adding a compatibility option yet.

Leaving the facemap winding argument as is just in case we do consider
to add the option.
2015-05-06 23:30:15 +02:00
e73f1035d7 Fix T44598: blender internal not giving same result on repeated texture bakes. 2015-05-06 23:06:47 +02:00
Porteries Tristan
fb0dd596e9 BGE : KX_VertexProxy support for more than 2 UV channel.
I have added an optional named "index" argument for methode get/setUV, I have also modified the and set to deprecated methodes setUV2 and getUV2 : the doc was wrong and the methode can't be called anyway because it declared as VARARG in the .h and convert directly the args value to a vector in the .cpp.

Reviewers: sybren, lordloki, hg1

Reviewed By: lordloki, hg1

Subscribers: agoose77

Differential Revision: https://developer.blender.org/D1240
2015-05-06 22:55:46 +02:00
Antony Riakiotakis
de180aba35 Feature request: Dyntopo detail expressed in percentage of brush radius.
Not sure how useful this will be but people have requested it so, here
it is...
2015-05-06 22:51:49 +02:00
Campbell Barton
4a5933bb74 Rip tool, support filling-edges with fill enabled 2015-05-07 05:34:07 +10:00
Campbell Barton
4d7b0e4fe3 Correct own error: is_manifold_region on wire vert 2015-05-07 05:23:07 +10:00