blender.git
4 years agoFix for building blender as a Python module
Campbell Barton [Tue, 24 Mar 2015 06:02:34 +0000 (17:02 +1100)]
Fix for building blender as a Python module

Installation didn't work on debian distro's
now install into PYTHON_SITE_PACKAGES (which is detected and can be configured).

4 years agoUI: remove UI_BTYPE_SEARCH_MENU_UNLINK
Campbell Barton [Tue, 24 Mar 2015 04:05:27 +0000 (15:05 +1100)]
UI: remove UI_BTYPE_SEARCH_MENU_UNLINK

Internal change only,
use UI_BTYPE_SEARCH_MENU with an unlink flag instead.

They are really the same button type, one just happens to have the option to unlink.

4 years agoCleanup: unused function
Campbell Barton [Tue, 24 Mar 2015 04:08:52 +0000 (15:08 +1100)]
Cleanup: unused function

4 years agoBlender world value viewport update
Thomas Szepe [Mon, 23 Mar 2015 23:31:31 +0000 (00:31 +0100)]
Blender world value viewport update

This patch will update the 3D viewport if a word value has changed.

This patch does not depends on an other patch, but should applied after https://developer.blender.org/D151 otherwise the the word value viewport update is be slow.

Reviewers: brecht

Reviewed By: brecht

Subscribers: thelasthope, darkxiv

Differential Revision: https://developer.blender.org/D159

4 years agoBGE: Remove old world bge.render API
Thomas Szepe [Mon, 23 Mar 2015 23:27:45 +0000 (00:27 +0100)]
BGE: Remove old world bge.render API

This patch can be used to remove the old world bge.render API if the new world API D157 is used.

If  the new world API is applied we can remove the old API because the old has newer worked.
The patch keep the two old working methods for backward compatibility.

Reviewers: campbellbarton, moguri

Reviewed By: campbellbarton, moguri

Subscribers: brecht

Differential Revision: https://developer.blender.org/D158

4 years agoBGE: Add new world API KX_WorldInfo (KX_Scene)
Thomas Szepe [Mon, 23 Mar 2015 23:23:40 +0000 (00:23 +0100)]
BGE: Add new world API KX_WorldInfo (KX_Scene)

This Patch will add a the world API (mist, background, ambient)  to KX_WorldInfo.
The new API uses now attributes.

Reviewers: campbellbarton, moguri

Reviewed By: moguri

Subscribers: klauser, brecht

Differential Revision: https://developer.blender.org/D157

4 years agoBGE: Remove BlenderWorldInfo
Thomas Szepe [Mon, 23 Mar 2015 23:19:15 +0000 (00:19 +0100)]
BGE: Remove BlenderWorldInfo

This patch will remove the BlenderWorldInfo and move the source into KX_WorldInfo.

Reviewers: brecht, moguri

Reviewed By: brecht, moguri

Differential Revision: https://developer.blender.org/D156

4 years agoBGE: World color management fix
Thomas Szepe [Mon, 23 Mar 2015 22:56:46 +0000 (23:56 +0100)]
BGE: World color management fix

This patch will fix the color management for the mist and global ambient color.
It will remove the old "Color Management" switch in the BGE "Render > Shading" panel and will use the "Display Device" setting in the "Scene > Color Management" panel instead.

Reviewers: moguri, brecht

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D154

4 years agoBGE: Code clean up for world (mist, background, ambient)
Thomas Szepe [Mon, 23 Mar 2015 21:49:38 +0000 (22:49 +0100)]
BGE: Code clean up for world (mist, background, ambient)

Code clean up for BGE world mist, background and global ambient color.
Move mist render update to BlenderWolrdInfo

Reviewers: moguri, brecht

Reviewed By: moguri, brecht

Differential Revision: https://developer.blender.org/D152

4 years agoBGE: Fix T43592: World GLSL
Thomas Szepe [Mon, 23 Mar 2015 21:32:49 +0000 (22:32 +0100)]
BGE: Fix T43592: World GLSL

This patch will fix the world GLSL (mist, background, ambient) update for the BGE.

Reviewers: moguri, brecht

Reviewed By: moguri, brecht

Subscribers: panzergame

Differential Revision: https://developer.blender.org/D151

4 years agoCMake: readme.html version trick broke packages
Campbell Barton [Mon, 23 Mar 2015 20:47:01 +0000 (07:47 +1100)]
CMake: readme.html version trick broke packages

4 years agotweaks to packman build
Campbell Barton [Mon, 23 Mar 2015 19:49:44 +0000 (06:49 +1100)]
tweaks to packman build

remove --asroot arg to makepkg

4 years agoBGE: Fix T27322: World F-Curve
Thomas Szepe [Mon, 23 Mar 2015 20:43:42 +0000 (21:43 +0100)]
BGE: Fix T27322: World F-Curve

This patch fixes the world (mist, background, ambient) F-Curve for  for the BGE.

Reviewers: moguri, brecht

Reviewed By: moguri, brecht

Differential Revision: https://developer.blender.org/D150

4 years agoBGE: Add setMistType and setMistIntensity API.
Thomas Szepe [Mon, 23 Mar 2015 20:40:11 +0000 (21:40 +0100)]
BGE: Add setMistType and setMistIntensity API.

This patch adds the missing setMistType() and setMistIntensity() to the API

Reviewers: campbellbarton, brecht, moguri

Reviewed By: campbellbarton, brecht, moguri

Subscribers: campbellbarton, dingto

Differential Revision: https://developer.blender.org/D149

4 years agoBGE: Multitexture world (mist, ambient) fix
Thomas Szepe [Mon, 23 Mar 2015 20:36:08 +0000 (21:36 +0100)]
BGE: Multitexture world (mist, ambient) fix

This patch fix the existing word API for mist and global ambient lighting.
Add deprecated message to disableMist()
Add setUseMist(enable).

Reviewers: dfelinto, campbellbarton, moguri

Reviewed By: moguri

Subscribers: solarlune, jta, brecht

Projects: #bf_blender:_next

Differential Revision: https://developer.blender.org/D148

4 years agocleanup: use spaces for alignment
Mike Erwin [Mon, 23 Mar 2015 19:29:42 +0000 (15:29 -0400)]
cleanup: use spaces for alignment

while studying GPU lib

4 years agoRemove 'lorem ipsum' operator
Campbell Barton [Mon, 23 Mar 2015 19:15:52 +0000 (06:15 +1100)]
Remove 'lorem ipsum' operator

its a very specific function, and not hard to paste body text from elsewhere.
We can make an addon if its important to some users.

4 years agocompile fix
Mike Erwin [Mon, 23 Mar 2015 19:04:11 +0000 (15:04 -0400)]
compile fix

4 years agoDisable high quality depth of field for GPUs that don't support it,
Antony Riakiotakis [Mon, 23 Mar 2015 18:23:49 +0000 (19:23 +0100)]
Disable high quality depth of field for GPUs that don't support it,
system will fall back to low quality depth of field.

Also add check in case some of the errors are caused by crappy
framebuffer object support.

4 years agoBGE: LoD Hysteresis clean up
Jorge Bernal [Mon, 23 Mar 2015 17:57:19 +0000 (18:57 +0100)]
BGE: LoD Hysteresis clean up

Move scene hysteresis value to KX_Scene where it should be (instead of
KX_GameObject)

4 years agoFix T44076, SSAO in solid mode will disable antialiasing in wireframe
Antony Riakiotakis [Mon, 23 Mar 2015 17:54:56 +0000 (18:54 +0100)]
Fix T44076, SSAO in solid mode will disable antialiasing in wireframe
mode.

Yes it will, because those modes stay active. So on user side, expose
depth of field option always (I don't see why not), but disable SSAO in
wireframe/bounding box mode. It is a known limitation that compositing
does not support antialiasing yet, but better give users some more
control.

This could be included in final release but it's not that serious
either.

4 years agoVersioning code to correct socket naming after
Antony Riakiotakis [Mon, 23 Mar 2015 17:33:50 +0000 (18:33 +0100)]
Versioning code to correct socket naming after
340b76b42c53816ddac1b4cecdff3d8d2010a9cc

Reported by formerly Old_Demon on blenderartists.

Apparently this caused old files to lose their links to material sockets
(noob own mistake from inexperience with node system).

This should either be included in release with version checking being
set to version 2.73 and subversion 10, without tweaking the
BKE_blender.h file

OR

340b76b42c53816ddac1b4cecdff3d8d2010a9cc should be reverted for this
release.

Thanks to Lukas for checking this out.

4 years agoUse linear filtering for final pass of high quality depth of field, no
Antony Riakiotakis [Mon, 23 Mar 2015 16:07:21 +0000 (17:07 +0100)]
Use linear filtering for final pass of high quality depth of field, no
need to get nearest point anymore.

4 years agoShader errors:
Antony Riakiotakis [Mon, 23 Mar 2015 14:19:54 +0000 (15:19 +0100)]
Shader errors:

Count line from beginning of the whole shader source instead of each
string sepatately since it helps with finding out the error line in most
tested platforms

4 years agoFix T44093: Color picker SV+H order wrong.
Campbell Barton [Mon, 23 Mar 2015 13:18:57 +0000 (00:18 +1100)]
Fix T44093: Color picker SV+H order wrong.

Based on HSV ordering, SV+H had S<>V swapped.

4 years agoAllow bg-image rotation for camera views
Campbell Barton [Mon, 23 Mar 2015 13:02:09 +0000 (00:02 +1100)]
Allow bg-image rotation for camera views

4 years agoCleanup: comments, style
Campbell Barton [Mon, 23 Mar 2015 11:51:12 +0000 (22:51 +1100)]
Cleanup: comments, style

4 years agoTidy up the user interface for depth of field based on feedback by
Antony Riakiotakis [Mon, 23 Mar 2015 11:48:09 +0000 (12:48 +0100)]
Tidy up the user interface for depth of field based on feedback by
NudelZ on irc, thanks!

4 years agoUse same rgb -> greyscale for BLI_math as imbuf
Campbell Barton [Mon, 23 Mar 2015 11:26:00 +0000 (22:26 +1100)]
Use same rgb -> greyscale for BLI_math as imbuf

4 years agoChange coefficients to 4 digit precision only.
Antony Riakiotakis [Mon, 23 Mar 2015 11:18:42 +0000 (12:18 +0100)]
Change coefficients to 4 digit precision only.

Need to match convention and sum up to 1.0 (previous set had a minor
10^(-10) overflow) Thanks to Campbell for taking notice.

4 years agoMake sure matcap icons are within range.
Antony Riakiotakis [Mon, 23 Mar 2015 11:00:34 +0000 (12:00 +0100)]
Make sure matcap icons are within range.

Basically out of range could happen when opening files made in 2.72 when
the new icons for texture painting were added. Apparently some more
caution is needed here.

4 years agoMitigate T44035: Proportional editing lag
Campbell Barton [Mon, 23 Mar 2015 06:43:14 +0000 (17:43 +1100)]
Mitigate T44035: Proportional editing lag

Calculating connected data can be slow,
it still lags with heavy meshes but perform some optimizations (nearly twice as fast)

4 years agoFix T43926: Volume scatter: intersecting objects GPU rendering artifacts
Sergey Sharybin [Mon, 23 Mar 2015 07:48:33 +0000 (12:48 +0500)]
Fix T43926: Volume scatter: intersecting objects GPU rendering artifacts
Fix T44007: Cycles Volumetrics: block artifacts with overlapping volumes

The issue was caused by uninitialized parameters of some closures, which
lead to unpredictable behavior of shader_merge_closures().

4 years agoFix wrong sizeof() in new ghash hashing helpers code.
Bastien Montagne [Sun, 22 Mar 2015 20:13:43 +0000 (21:13 +0100)]
Fix wrong sizeof() in new ghash hashing helpers code.

Spotted by Coverity.

4 years agoOSX: fix 1 leak ( found and fixed by marcclintdion ) and 1 possible leak in dragndrop...
Jens Verwiebe [Sun, 22 Mar 2015 18:29:31 +0000 (19:29 +0100)]
OSX: fix 1 leak ( found and fixed by marcclintdion ) and 1 possible leak in dragndrop, backport to 2.74

4 years agoBGE: New hysteresis offset to improve LOD level transitions
Jorge Bernal [Sun, 22 Mar 2015 17:13:53 +0000 (18:13 +0100)]
BGE: New hysteresis offset to improve  LOD level transitions

This change introduces a new hysteresis parameter that it will be added
or subtracted to/from the LOD distance to avoid popping when a LOD
object moves close to the LOD transition continuously.

Then, we have the following:

- a new LOD Hysteresis setting per scene (default 10%) which is located
in Scene context --> Level of Detail panel. This scene parameter also
will active/deactive the scene hysteresis.
- and a new LOD Hysteresis setting per object (default 10%) which is
located in Object context --> Levels of Detail panel. The LOD hysteresis
setting per object (if active) will overwrite the hysteresis setting per
scene value.

For the new blends: the hysteresis setting per scene would be active by
default and the per object would be inactive by default.
For the old blends: both hysteresis settings (per scene and per object)
would be inactive by default. A quick way to take advantage of this
feature for old blends would be to activate the hysteresis parameter in
the scene context -> Level of Detail panel

Reviewers: campbellbarton, kupoman, moguri

Reviewed By: kupoman, moguri

Subscribers: nonamejuju, lordodin

Differential Revision: https://developer.blender.org/D957

4 years agoBGE: Add physics constraints replication
Thomas Szepe [Sun, 22 Mar 2015 16:55:43 +0000 (17:55 +0100)]
BGE: Add physics constraints replication

This patch will add a physics constraints replication for group instances
(dupli group).
It also fix crashing when when a group instance is made from a linked
group instance and both are on the active layer.

Initial patch T31443 from moerdn (Martin Sell).

Reviewers: lordloki, sergof, moguri, sybren

Reviewed By: moguri, sybren

Differential Revision: https://developer.blender.org/D658

4 years agoRevert part of D1074 related to acceleration taked into account.
Jorge Bernal [Sat, 21 Mar 2015 16:53:18 +0000 (17:53 +0100)]
Revert part of D1074 related to acceleration taked into account.
It has been reverted because it was affecting obstacle avoidance
(T44041).

This fix should be backported to 2.74

4 years agoCleanup: instantiate arg once in context macro
Campbell Barton [Sat, 21 Mar 2015 16:29:59 +0000 (03:29 +1100)]
Cleanup: instantiate arg once in context macro

4 years agoCleanup: minor edits to project generators
Campbell Barton [Sat, 21 Mar 2015 16:24:56 +0000 (03:24 +1100)]
Cleanup: minor edits to project generators

4 years agoOSX/GHOST: need one more release in error case
Jens Verwiebe [Sat, 21 Mar 2015 16:15:38 +0000 (17:15 +0100)]
OSX/GHOST: need one more release in error case

4 years agoFix T44065: fixed vehicle constraint
Sybren A. Stüvel [Sat, 21 Mar 2015 13:42:57 +0000 (14:42 +0100)]
Fix T44065: fixed vehicle constraint

Commit ffee7f1a58a18bc08add94176ddffe29809139a6 broke vehicle constraints; this fixes that.

4 years agoCleanup: constify view3d/camera
Campbell Barton [Sat, 21 Mar 2015 11:34:20 +0000 (22:34 +1100)]
Cleanup: constify view3d/camera

4 years agoCleanup: constify scene/modifiers
Campbell Barton [Sat, 21 Mar 2015 11:10:43 +0000 (22:10 +1100)]
Cleanup: constify scene/modifiers

4 years agoCleanup: use tabs
Campbell Barton [Sat, 21 Mar 2015 05:40:17 +0000 (16:40 +1100)]
Cleanup: use tabs

4 years agoView3D: fix view-selected zoom logic
Campbell Barton [Sat, 21 Mar 2015 04:11:30 +0000 (15:11 +1100)]
View3D: fix view-selected zoom logic

- Correct logic converting radius to view distance.
- Wasn't taking view-zoom into account converting lens to angle.
- Support framing the selection in the camera bounds (for camera locked views).

Add ED_view3d_radius_to_dist to handles these details.

4 years agoView3D: use defines for default zoom-levels
Campbell Barton [Sat, 21 Mar 2015 04:11:19 +0000 (15:11 +1100)]
View3D: use defines for default zoom-levels

4 years agoFix indentation in last commit, tab slipped in
Jens Verwiebe [Fri, 20 Mar 2015 19:26:51 +0000 (20:26 +0100)]
Fix indentation in last commit, tab slipped in

4 years agoReally fix scons with new glsl shaders
Jens Verwiebe [Fri, 20 Mar 2015 19:24:30 +0000 (20:24 +0100)]
Really fix scons with new glsl shaders

4 years agoFix scons build
Antony Riakiotakis [Fri, 20 Mar 2015 18:46:48 +0000 (19:46 +0100)]
Fix scons build

4 years agoPartly fix T44025, pixelFormat retain was left, for 2.74 backport
Jens Verwiebe [Fri, 20 Mar 2015 16:57:35 +0000 (17:57 +0100)]
Partly fix T44025, pixelFormat retain was left, for 2.74 backport

4 years agoCycles: Avoid memcpy of intersecting memory
Sergey Sharybin [Fri, 20 Mar 2015 16:14:50 +0000 (21:14 +0500)]
Cycles: Avoid memcpy of intersecting memory

Could happen when assignment happens to self during sorting.

4 years agoCorrection to previous commit, initialization of needs_free got lost by accident
Sergey Sharybin [Fri, 20 Mar 2015 16:09:52 +0000 (21:09 +0500)]
Correction to previous commit, initialization of needs_free  got lost by accident

4 years agoDisable IME for headless builds
Campbell Barton [Fri, 20 Mar 2015 16:02:09 +0000 (03:02 +1100)]
Disable IME for headless builds

4 years agoFix link error with GLEW
Antony Riakiotakis [Fri, 20 Mar 2015 15:35:26 +0000 (16:35 +0100)]
Fix link error with GLEW

4 years agoCorrect recent commit
Campbell Barton [Fri, 20 Mar 2015 15:25:28 +0000 (02:25 +1100)]
Correct recent commit

4 years agoFix for building win32 headless
Campbell Barton [Fri, 20 Mar 2015 15:16:39 +0000 (02:16 +1100)]
Fix for building win32 headless

4 years agoRemove unused armature code
Campbell Barton [Fri, 20 Mar 2015 12:55:47 +0000 (23:55 +1100)]
Remove unused armature code

ED_armature_deselect_all now simply de-selects

4 years agoAvoid per-draw allocation when drawing currently rendering tiles
Sergey Sharybin [Fri, 20 Mar 2015 14:56:09 +0000 (19:56 +0500)]
Avoid per-draw allocation when drawing currently rendering tiles

4 years agoOnly create vertex buffers if supported and clean them up properly.
Antony Riakiotakis [Fri, 20 Mar 2015 14:43:34 +0000 (15:43 +0100)]
Only create vertex buffers if supported and clean them up properly.

4 years agoFix high quality depth of field on the Mac.
Antony Riakiotakis [Fri, 20 Mar 2015 14:26:13 +0000 (15:26 +0100)]
Fix high quality depth of field on the Mac.

Quite a few things wrong here:

* Mac did not support EXT_draw_instanced, only ARB_draw_instanced
* Draw instanced did not work unless data came from vertex buffer, which
is second time we see weird things with vertex arrays in mac
* There were a few stupid mistakes by me as well, such as binding to
uniform locations for the wrong shaders (it's a wonder it ever worked
:p)

4 years agoFix race condition and bad memory access highlighting render tiles
Sergey Sharybin [Fri, 20 Mar 2015 12:48:45 +0000 (17:48 +0500)]
Fix race condition and bad memory access highlighting render tiles

Is was possible that interface will be refreshed at thesame time
as render engine will start freeing render parts.

Not sure if we can get away without RW mutex here, seems we need
one way of synchronization or another..

4 years agoFix/Improve FKey bone creation
Campbell Barton [Fri, 20 Mar 2015 12:38:08 +0000 (23:38 +1100)]
Fix/Improve FKey bone creation

- new bone is now made active
- previous selection cleared
- bone direction places the tip on the active bone (if available)

4 years agoFix T43986: VSE Mask Modifier don't move with video-Clip.
Bastien Montagne [Fri, 20 Mar 2015 11:39:25 +0000 (12:39 +0100)]
Fix T43986: VSE Mask Modifier don't move with video-Clip.

Now mask animation is offset to start of strip, instead of staying at frame 1!

Warning: this may break existing files, in case some would be using (hacking around!)
current bad behavior...

4 years agoCmake: Some more tweaks to building from branch without upstream
Sergey Sharybin [Fri, 20 Mar 2015 09:07:56 +0000 (14:07 +0500)]
Cmake: Some more tweaks to building from branch without upstream

4 years agoSCons: Attempt to deal with branches without upstream configured
Sergey Sharybin [Fri, 20 Mar 2015 09:03:54 +0000 (14:03 +0500)]
SCons: Attempt to deal with branches without upstream configured

4 years agoCMake: Suppress unconfigured branch upstream error in the output
Sergey Sharybin [Fri, 20 Mar 2015 08:59:05 +0000 (13:59 +0500)]
CMake: Suppress unconfigured branch upstream error in the output

4 years agoFix T43786: Cycles bake disregards Auto Smooth (vertex per-face normals)
Sergey Sharybin [Fri, 20 Mar 2015 07:41:31 +0000 (12:41 +0500)]
Fix T43786: Cycles bake disregards Auto Smooth (vertex per-face normals)

Added an utility function which performs vertex split based on the loop
normal so now backing API matches to what's happening in Cycles and BI
in terms of autosplit.

Reviewers: dfelinto, campbellbarton

Reviewed By: campbellbarton

Differential Revision: https://developer.blender.org/D1174

4 years agoFix stupid strict flags in math_color_inline.c
Sergey Sharybin [Fri, 20 Mar 2015 07:25:14 +0000 (12:25 +0500)]
Fix stupid strict flags in math_color_inline.c

It was unleashed with recent ghash commit and issue seems to
be the same as fixed in 69065b5b.

4 years agoAdd missing update adding a shape-key
Campbell Barton [Fri, 20 Mar 2015 04:50:56 +0000 (15:50 +1100)]
Add missing update adding a shape-key

Noticeable when pin is enabled.

4 years agoCleanup: warnings bit-shift int overflow
Campbell Barton [Fri, 20 Mar 2015 04:26:47 +0000 (15:26 +1100)]
Cleanup: warnings bit-shift int overflow

4 years agoCleanup remove unused variable
Antony Riakiotakis [Thu, 19 Mar 2015 20:11:33 +0000 (21:11 +0100)]
Cleanup remove unused variable

4 years agoMissed this last commit.
Antony Riakiotakis [Thu, 19 Mar 2015 20:10:05 +0000 (21:10 +0100)]
Missed this last commit.

4 years agoFix T43989: Sequencer - Ctrl snapping a sequencer strip does not work if you specify...
Bastien Montagne [Thu, 19 Mar 2015 19:47:38 +0000 (20:47 +0100)]
Fix T43989: Sequencer - Ctrl snapping a sequencer strip does not work if you specify the x axis.

New 'strip' snapping was simply not computed in case of constrained transform, hence init
'0' value was used as frame offset in this case.

This commit reorganizes a bit that snapping, to keep it more 'confined' into `snapSequenceBounds()`
dedicated function. It still needs a minor hack (setting snapping mode to something else than
defualt `SCE_SNAP_MODE_INCREMENT`, to avoid this snapping to be called by contraint code).

Thanks to Antony for review and enhancements.

This fix should be backported to 2.74.

4 years agoFix cycles dof settings
Antony Riakiotakis [Thu, 19 Mar 2015 19:48:43 +0000 (20:48 +0100)]
Fix cycles dof settings

4 years agoRemove deleted list for palette colors
Campbell Barton [Thu, 19 Mar 2015 19:07:22 +0000 (06:07 +1100)]
Remove deleted list for palette colors

was used because of UI memory access only.

4 years agoUI: minor re-organization of dof options
Campbell Barton [Thu, 19 Mar 2015 17:00:05 +0000 (04:00 +1100)]
UI: minor re-organization of dof options

4 years agoBlender will now use trilinear filtering by default
Antony Riakiotakis [Thu, 19 Mar 2015 19:04:55 +0000 (20:04 +0100)]
Blender will now use trilinear filtering by default

4 years agoBLI GHash: add some basic gtests.
Bastien Montagne [Thu, 19 Mar 2015 17:06:15 +0000 (18:06 +0100)]
BLI GHash: add some basic gtests.

We could likely add much more, but those already covers basic behavior and should be able
to catch most errors when editing this code.

Also added some performances tests as well (timing ghash insert/lookup under heavy loads,
for different kinds of keys).

4 years agoGHash - code reorganization, performance enhancements, add a few missing utils to...
Bastien Montagne [Thu, 19 Mar 2015 16:36:59 +0000 (17:36 +0100)]
GHash - code reorganization, performance enhancements, add a few missing utils to API.

This patch is the root of the GHash rework, all other diff will be based on it:

Reduce average load from 3.0 to 0.75
----------------------------------

This is the big performance booster part, e.g. makes tracing a dyntopo stroke between 25% and 30% faster.

Not much to say about it, aside that it obviously increase memory footprint (about 25% - 30% too).

Add optional shrinking
----------------------------------

I.e. ghashes/gsets can now shrink their buckets array when you remove enough entries. This remains optional and OFF by default.

Add code to use masking instead of modulo
----------------------------------

Buckets indices are obtained from hashes by “reducing” the hash value into the valid bucket range. This can be done either by bit-masking, or using modulo operation.
The former is quicker, but requires real hashes, while the later is slower (average 10% impact on ghash operations) but can also be used as a 'fake' hashing on raw values, like e.g. indices.

In Blender currently not all ghash usages actually hash their keys, so we stick to modulo for now (masking is ifdef’ed out), we may however investigate the benefits of switching to masking with systematic very basic hashing later…

Add various missing API helpers
----------------------------------

I.e. a way to deep-copy a ghash/gset, and a way to (re-)reserve entries (i.e. manually grow or shrink the ghash after its creation).

Various code refactoring
----------------------------------

* Get rid of the 'hack' regarding ghash size when used as gset (it’s simpler and safer to have two structs defined here, and cast pointers as needed).
* Various re-shuffle and factorization in low-level internal code.
* Some work on hashing helpers, introducing some murmur2a-based hashing too.

Thanks a bunch to Campbell for the extensive review work. :)

Reviewers: sergey, campbellbarton

Subscribers: psy-fi, lukastoenne

Projects: #bf_blender

Maniphest Tasks: T43766

Differential Revision: https://developer.blender.org/D1178

4 years agoArmature select-hierarchy now uses connected bones
Campbell Barton [Thu, 19 Mar 2015 14:37:29 +0000 (01:37 +1100)]
Armature select-hierarchy now uses connected bones

Traverse down connected child bones (when available)

Also remove redundant bone loops.

4 years agoDepth of field high quality:
Antony Riakiotakis [Tue, 3 Mar 2015 16:47:31 +0000 (17:47 +0100)]
Depth of field high quality:

A new checkbox "High quality" is provided in camera settings to enable
this. This creates a depth of field that is much closer to the rendered
result and even supports aperture blades in the effect, but it's more
expensive too. There are optimizations to do here since the technique is
very fill rate heavy.

People, be careful, this -can- lock up your screen if depth of field
blurring is too extreme.

Technical details:

This uses geometry shaders + instancing and is an adaptation of
techniques gathered from

http://bartwronski.com/2014/04/07/bokeh-depth-of-field-going-insane-

 http://advances.realtimerendering.com/s2011/SousaSchulzKazyan%20-
%20in%20Real-Time%20Rendering%20Course).ppt

TODOs:

* Support dithering to minimize banding.
* Optimize fill rate in geometry shader.

4 years agoFix compilation error of blenderplayer after recent constraint commit
Sergey Sharybin [Thu, 19 Mar 2015 14:10:09 +0000 (19:10 +0500)]
Fix compilation error of blenderplayer after recent constraint commit

4 years agoCorrect recent armature symmetrize
Campbell Barton [Thu, 19 Mar 2015 13:41:29 +0000 (00:41 +1100)]
Correct recent armature symmetrize

Duplicating part of a chain could have invalid 'connected' flag.

4 years agoSpeedup for constraints update from python script
Sergey Sharybin [Thu, 19 Mar 2015 13:28:49 +0000 (18:28 +0500)]
Speedup for constraints update from python script

General idea is to avoid actual calculation from property update()
callback and tag things for update later instead.

That said, pose constraint flags are now tagged for update and
handled as a part of object update. In the new depsgraph it'll
be a nice dedicated operation node.

Also avoid updating disabled flags for all the modifiers. This
part of the path is not totally optimal since it'll still need
to iterate over bones in order to get pchan, but to optimize it
further would be nice to find a way to avoid pchan requirement
all together.

Reviewers: campbellbarton

Reviewed By: campbellbarton

Differential Revision: https://developer.blender.org/D1191

4 years agoFix T44040: Blender crashes when nodes are muted
Sergey Sharybin [Thu, 19 Mar 2015 11:04:49 +0000 (16:04 +0500)]
Fix T44040: Blender crashes when nodes are muted

It was actually an old issue with wrong conversion happening for muted
nodes, which wasn't visible before memory optimization commit.

This is to be backported to the final release.

4 years agoCleanup
Campbell Barton [Thu, 19 Mar 2015 09:34:02 +0000 (20:34 +1100)]
Cleanup

4 years agoTransform: Shift for precision PET adjustment
Campbell Barton [Thu, 19 Mar 2015 09:09:34 +0000 (20:09 +1100)]
Transform: Shift for precision PET adjustment

Patch T36753 by @hjaarnio

4 years agoArmature Symmetrize tool
Campbell Barton [Thu, 19 Mar 2015 06:57:17 +0000 (17:57 +1100)]
Armature Symmetrize tool

D1147 by @julien, with fixes/improvements

Duplicate bones where needed, otherwise use existing.
Keeps parent relations intact, can operate on parts of an armature.

4 years agoCleanup: style (armature duplicate)
Campbell Barton [Thu, 19 Mar 2015 06:29:46 +0000 (17:29 +1100)]
Cleanup: style (armature duplicate)

4 years agoFix out-of-bounds read BKE_deform_flip_side_name
Campbell Barton [Thu, 19 Mar 2015 07:00:10 +0000 (18:00 +1100)]
Fix out-of-bounds read BKE_deform_flip_side_name

4 years agoCMake: unbundle eigen3
Campbell Barton [Thu, 19 Mar 2015 04:41:41 +0000 (15:41 +1100)]
CMake: unbundle eigen3

Optionally use systems eigen3 library.

T41989 by @hasufell with edits

4 years agoCMake: exclude Colamd when OpenNL's disabled
Campbell Barton [Thu, 19 Mar 2015 03:48:52 +0000 (14:48 +1100)]
CMake: exclude Colamd when OpenNL's disabled

4 years agoFreestyle: pass Main struct to new/copy
Campbell Barton [Thu, 19 Mar 2015 03:33:05 +0000 (14:33 +1100)]
Freestyle: pass Main struct to new/copy

4 years agoCleanup: spelling grey -> gray
Campbell Barton [Thu, 19 Mar 2015 03:14:48 +0000 (14:14 +1100)]
Cleanup: spelling grey -> gray

4 years agoRevert part of recent color-management commit
Campbell Barton [Thu, 19 Mar 2015 03:09:01 +0000 (14:09 +1100)]
Revert part of recent color-management commit

This adds back rgb_to_grayscale,
not all color is managed or depends on the current loaded blend file's CM options.

Noted in comments that this is only to be used outside the CM pipeline.

4 years agoColor managed luminance for shader ramp-in-energy
Campbell Barton [Thu, 19 Mar 2015 01:59:36 +0000 (12:59 +1100)]
Color managed luminance for shader ramp-in-energy

4 years agoCleanup: better not pass function call to FTOCHAR
Campbell Barton [Thu, 19 Mar 2015 01:42:34 +0000 (12:42 +1100)]
Cleanup: better not pass function call to FTOCHAR

also use rgb_uchar_to_float

4 years agoUse fabsf for floats
Campbell Barton [Wed, 18 Mar 2015 19:13:50 +0000 (06:13 +1100)]
Use fabsf for floats

4 years agoSelect nth option to skip steps
Campbell Barton [Wed, 18 Mar 2015 17:40:43 +0000 (04:40 +1100)]
Select nth option to skip steps

Patch T43752 @codemanx, added matching curve option.