4 years agoFix typo in new error reporting during arg parsing.
Bastien Montagne [Fri, 6 Nov 2015 17:54:52 +0000 (18:54 +0100)]
Fix typo in new error reporting during arg parsing.

4 years agoNew uialign code, based on 2D positions of widgets.
Bastien Montagne [Fri, 6 Nov 2015 17:39:56 +0000 (18:39 +0100)]
New uialign code, based on 2D positions of widgets.

This new code fixes a tons of issues with previous one, which basically was epic-failing
in many non-basic cases (especially mixed columns and rows with column-dominant layout).

It basically no more relies over order of buttons declaration in the uiBlock, instead it
finds and stores spatial neighbors and uses that data to compute needed stitching.
See code comments for details.

New code seems to be roughly ten times slower than old one (for complex grouped layouts),
that is, about a few microsecconds per alignment group - this remains reasonable.

Also, ui-align code becomming rather big in itself, it was separated in
own new `interface_align.c` file.

Reviewers: campbellbarton, severin

Reviewed By: campbellbarton, severin

Differential Revision:

4 years agoCommand line args: print error w/ invalid numbers
Campbell Barton [Fri, 6 Nov 2015 15:04:01 +0000 (02:04 +1100)]
Command line args: print error w/ invalid numbers

4 years agoUse toggle buttons instead of checkboxes for VSE proxy percentage
Julian Eisel [Fri, 6 Nov 2015 13:56:32 +0000 (14:56 +0100)]
Use toggle buttons instead of checkboxes for VSE proxy percentage

Was inconsistent with Clip Editor which uses toggle buttons. Toggle buttons are narrower, so changing to them.

Reported in T46708.

4 years agoFix T46587: Drivers do not work in node groups
Sergey Sharybin [Fri, 6 Nov 2015 13:36:22 +0000 (18:36 +0500)]
Fix T46587: Drivers do not work in node groups

This commit makes drivers on node groups to with when using new dependency graph.

Still TODO: Need a relation between drivers and tree evaluation  perhaps, so we
guarantee proper order of all operations.

4 years agoFix T46696: Voxel crash indexing over INT_MAX
Campbell Barton [Fri, 6 Nov 2015 08:37:50 +0000 (19:37 +1100)]
Fix T46696: Voxel crash indexing over INT_MAX

Use int64_t for index values.

4 years agoDraw limit & mist indicators darker for non-active cameras
Julian Eisel [Thu, 5 Nov 2015 18:30:59 +0000 (19:30 +0100)]
Draw limit & mist indicators darker for non-active cameras

Darkens the colors for limit and mist indicators of non-active cameras. This makes it easier to see which indicators belong to the active camera and which don't.
Useful for layouts with multiple cameras.

Requested by the Caminandes team.

4 years agoCleanup: comments/style
Campbell Barton [Thu, 5 Nov 2015 18:09:14 +0000 (05:09 +1100)]
Cleanup: comments/style

4 years agoCorrect error in recent commit
Campbell Barton [Thu, 5 Nov 2015 14:56:29 +0000 (01:56 +1100)]
Correct error in recent commit

4 years agoUse 'beauty' for sculpt triangulation
Campbell Barton [Thu, 5 Nov 2015 14:12:07 +0000 (01:12 +1100)]
Use 'beauty' for sculpt triangulation

Causes fewer degenerate quads.

4 years agoFix T46692: Triangulate creates duplicate faces
Campbell Barton [Thu, 5 Nov 2015 14:05:38 +0000 (01:05 +1100)]
Fix T46692: Triangulate creates duplicate faces

Caused a crash in dyntopo.

4 years agoFix T46691: Graph Editor, Channel, Toggle Channel Editability. Cannot reassign hotkey...
Bastien Montagne [Thu, 5 Nov 2015 11:56:48 +0000 (12:56 +0100)]
Fix T46691: Graph Editor, Channel, Toggle Channel Editability. Cannot reassign hotkey after removing it.

Anim Channels keymap is not editor-related...

4 years agoBGE: Cleanup occlusion buffer in CcdPhysicsEnvironment.cpp
Porteries Tristan [Thu, 5 Nov 2015 11:34:31 +0000 (12:34 +0100)]
BGE: Cleanup occlusion buffer in CcdPhysicsEnvironment.cpp

This patch cleanup spaces/braces and newlines.

Reviewers: moguri, kupoman

Reviewed By: moguri, kupoman

Subscribers: kupoman

Differential Revision:

4 years agoError in last commit
Campbell Barton [Thu, 5 Nov 2015 11:23:36 +0000 (22:23 +1100)]
Error in last commit

4 years agoFix T46699: copy_prev_settings() gives misleading error message when previous version...
Bastien Montagne [Thu, 5 Nov 2015 10:10:31 +0000 (11:10 +0100)]
Fix T46699: copy_prev_settings() gives misleading error message when previous version's config dir doesn't exist.

4 years agoFix face creation using incorrect loop-custom-data
Campbell Barton [Thu, 5 Nov 2015 09:04:36 +0000 (20:04 +1100)]
Fix face creation using incorrect loop-custom-data

Custom-data on newly created face data was often rotated.

Now the API doesn't copy data from adjacent loops when creating faces.
Most functions were already overwriting this anyway.

Since such decisions are better made at a higher level, now it's the responsibility of the caller.

4 years agoAPI Docs: use importlib in examples
Campbell Barton [Thu, 5 Nov 2015 08:08:17 +0000 (19:08 +1100)]
API Docs: use importlib in examples

4 years agoFix BMesh memory leak w/ multires data
Campbell Barton [Thu, 5 Nov 2015 08:07:22 +0000 (19:07 +1100)]
Fix BMesh memory leak w/ multires data

4 years agoBMesh: triangulate & poke - multires data support
Campbell Barton [Thu, 5 Nov 2015 06:40:33 +0000 (17:40 +1100)]
BMesh: triangulate & poke - multires data support

4 years agoBMesh: generalize logic for quad/ngon triangulate
Campbell Barton [Wed, 4 Nov 2015 19:32:04 +0000 (06:32 +1100)]
BMesh: generalize logic for quad/ngon triangulate

Avoid having 2 different code-paths for face triangulation.

4 years agoAdd missing check for multires interpolation
Campbell Barton [Wed, 4 Nov 2015 19:03:26 +0000 (06:03 +1100)]
Add missing check for multires interpolation

4 years agoFix compilation error with OpenSubdiv disabled
Sergey Sharybin [Wed, 4 Nov 2015 17:31:06 +0000 (22:31 +0500)]
Fix compilation error with OpenSubdiv disabled

4 years agoOpenSubdiv: Use pool for delayed OpenGL buffers free when freeing from non-main thread
Sergey Sharybin [Wed, 4 Nov 2015 16:30:25 +0000 (21:30 +0500)]
OpenSubdiv: Use pool for delayed OpenGL buffers free when freeing from non-main thread

This is really similar to what GPU module was already doing. There are number of
possible improvements still:

- Re-use allocated VAOs when requesting new ones instead of going to the trouble
  of freeing VAO and then re-creating it again.

- Move VAO handling to GPU module.

Fixes T46589: OpenSubdiv crash with drivers

4 years agoTracking: Solve annoying "script needs updating" warning printed to the console
Sergey Sharybin [Wed, 4 Nov 2015 15:12:51 +0000 (20:12 +0500)]
Tracking: Solve annoying "script needs updating" warning printed to the console

4 years agoFix T46687: Animating tracks properties from objects didn't use proper path
Sergey Sharybin [Wed, 4 Nov 2015 15:01:33 +0000 (20:01 +0500)]
Fix T46687: Animating tracks properties from objects didn't use proper path

4 years agoTracking: Move tracks list base search to an utility function
Sergey Sharybin [Wed, 4 Nov 2015 14:16:47 +0000 (19:16 +0500)]
Tracking: Move tracks list base search to an utility function

No functional changes expected, just makes it easier for reuse.

4 years agoFile Selector, support filepath dropping
Gaia Clary [Wed, 4 Nov 2015 13:24:46 +0000 (14:24 +0100)]
File Selector, support filepath dropping

This adds support for dropping a filepath on an open file-selector to set that path.

4 years agoFix T46672: Concurrent access to source DM in datatransfer modifier.
Bastien Montagne [Tue, 3 Nov 2015 20:16:58 +0000 (21:16 +0100)]
Fix T46672: Concurrent access to source DM in datatransfer modifier.

There is no real elegant solution here, ideally a modifier shall never *modify*
a source DM, but that would imply much better ways to ensure required data
is available in that source DM, which we do not have currently.

So instead, let's use brute force solution for now and always create a local copy
of our source DM, that we can modify to our heart content!

4 years agoimp: show alert color if mesh has weight groups but no active group is selected
Gaia Clary [Tue, 3 Nov 2015 19:19:03 +0000 (20:19 +0100)]
imp: show alert color if mesh has weight groups but no active group is selected

4 years agoFix T46683: High pitch sound artifact on import of 48k audio
Jörg Müller [Tue, 3 Nov 2015 18:24:17 +0000 (19:24 +0100)]
Fix T46683: High pitch sound artifact on import of 48k audio

The bug header is wrong, the file contains the high pitched sound, but the bug that existed was that animation rendering did not use the high quality resampler, while audio mixdown does.
Blender uses the low quality resampler to be as little CPU consuming as possible.

4 years agoAvoid assert weight painting w/o an active group
Campbell Barton [Tue, 3 Nov 2015 17:37:47 +0000 (04:37 +1100)]
Avoid assert weight painting w/o an active group

4 years agoCleanup: de-duplicate quad_coord & resolve_quad_uv_v2
Campbell Barton [Tue, 3 Nov 2015 17:01:15 +0000 (04:01 +1100)]
Cleanup: de-duplicate quad_coord & resolve_quad_uv_v2

4 years agoFix T46611: Vertex group locking fails
Campbell Barton [Tue, 3 Nov 2015 16:00:50 +0000 (03:00 +1100)]
Fix T46611: Vertex group locking fails

4 years agoFix related to T46567: Skin modifier: add a warning message when no valid root vertex...
Bastien Montagne [Tue, 3 Nov 2015 13:50:27 +0000 (14:50 +0100)]
Fix related to T46567: Skin modifier: add a warning message when no valid root vertex is found.

Otherwise user may have a hard time understanding why their modifier is no more working
after they e.g. deleted some vertices... including the root one. ;)

4 years agoFix T46671: Cycles assert with CMJ sample function
Sergey Sharybin [Tue, 3 Nov 2015 13:44:33 +0000 (18:44 +0500)]
Fix T46671: Cycles assert with CMJ sample function

With current formulation of cmj_fast_div_pow2() it should always return 0
in the case of first argument is zero and no assert really needed anymore.

4 years agoCorrect error in recent commit
Campbell Barton [Tue, 3 Nov 2015 13:01:41 +0000 (00:01 +1100)]
Correct error in recent commit

4 years agoDon't expand toggle brush on linking
Sergey Sharybin [Tue, 3 Nov 2015 10:29:49 +0000 (15:29 +0500)]
Don't expand toggle brush on linking

Toggle brush is more a runtime only feature, not really supposed to be used
as real ID linking as it's done for modifiers i.e.

4 years agoEdge/Vert slide: improve multires interpolation
Campbell Barton [Tue, 3 Nov 2015 09:30:54 +0000 (20:30 +1100)]
Edge/Vert slide: improve multires interpolation

Need to re-interpolate the entire face, not just the connected loop.

Also add BM_face_interp_multires()

4 years agoBGE: Remove KX_IPOActuator.
Porteries Tristan [Tue, 3 Nov 2015 09:31:08 +0000 (10:31 +0100)]
BGE: Remove KX_IPOActuator.

KX_IPOActuator is not used since 2.4.

This patch removes:
- KX_IPOActuator.h/cpp;
- Python doc;
- Write of IPO actuator in write.c;
- Allocation of IPOactuator in sca.c;
- Conversion in KX_ConvertActuators.cpp;
- Initialization of the python proxy in KX_PythonInitTypes.cpp;
- Other minor remove in logic_windows.c and in KX_PythonInit.cpp.

Reviewers: sybren, campbellbarton

Reviewed By: campbellbarton

Subscribers: moguri

Differential Revision:

4 years agoFix T46677: OpenSubdiv crashes when witching from simple and CC subdivisions
Sergey Sharybin [Tue, 3 Nov 2015 09:25:42 +0000 (14:25 +0500)]
Fix T46677: OpenSubdiv crashes when witching from simple and CC subdivisions

Crash was happening due to OpenGL free from the non-main thread. Ideally we need
to implement somewhat delayed unused buffer free for OpenSubdiv similar to what we
are doing in GPU module.

4 years agoFix: edge/vert slide ignored multires data
Campbell Barton [Tue, 3 Nov 2015 08:08:14 +0000 (19:08 +1100)]
Fix: edge/vert slide ignored multires data

Multires data fails the CustomData_layer_has_math() check,
so meshes without UV's for eg werent getting interpolated multires.

4 years agoBMesh: add BM_loop_interp_multires_ex which takes cached vars
Campbell Barton [Tue, 3 Nov 2015 07:28:13 +0000 (18:28 +1100)]
BMesh: add BM_loop_interp_multires_ex which takes cached vars

Avoid recalculating face centers (for each loop) when interpolating multires.

4 years agoBMesh: inline vert-loop iteration for normal calc
Campbell Barton [Tue, 3 Nov 2015 06:38:47 +0000 (17:38 +1100)]
BMesh: inline vert-loop iteration for normal calc

Calculating normals is called often (sculpting for eg),
so avoid using high-level iterator here.

4 years agoCleanup: use 'const' for BMesh checking funcs
Campbell Barton [Tue, 3 Nov 2015 06:06:56 +0000 (17:06 +1100)]
Cleanup: use 'const' for BMesh checking funcs

4 years agoFix flip normals w/ multires
Campbell Barton [Tue, 3 Nov 2015 04:47:37 +0000 (15:47 +1100)]
Fix flip normals w/ multires

Needs Z axis flip to maintain the shape.

4 years agoBMesh: avoid mdisp lookups (minor optimization)
Campbell Barton [Tue, 3 Nov 2015 04:14:12 +0000 (15:14 +1100)]
BMesh: avoid mdisp lookups (minor optimization)

4 years agoBetter fix for pthread ID comparison crap on windows.
Bastien Montagne [Mon, 2 Nov 2015 18:25:00 +0000 (19:25 +0100)]
Better fix for pthread ID comparison crap on windows.

Suggested by Sergey, thanks!

4 years agoAttempt to fix win32 compilation after own recent commits.
Bastien Montagne [Mon, 2 Nov 2015 17:48:14 +0000 (18:48 +0100)]
Attempt to fix win32 compilation after own recent commits.

4 years agoFilebrowser: fix preview handling to make correct use of task scheduler.
Bastien Montagne [Mon, 2 Nov 2015 16:04:31 +0000 (17:04 +0100)]
Filebrowser: fix preview handling to make correct use of task scheduler.

We needed the 'background' feature here, since we never wait on those preview-generation tasks.

Note that it also simplifies the code, and as usual testing is needed here on all possible platforms...

4 years agoBLI_task: add support for full-background taskpools.
Bastien Montagne [Mon, 2 Nov 2015 15:57:48 +0000 (16:57 +0100)]
BLI_task: add support for full-background taskpools.

With current code, in single-threaded context, a pool of task may never be executed
until one calls BLI_task_pool_work_and_wait() on it, this is not acceptable for
asynchronous tasks where you never want to actually lock the main thread.

This commits adds an extra thread in single-threaded case, and a new 'type' of pool,
such that one can create real background pools of tasks. See code for details.

Review: D1565

4 years agoBLI_task: add freedata callback to tasks.
Bastien Montagne [Mon, 2 Nov 2015 15:52:19 +0000 (16:52 +0100)]
BLI_task: add freedata callback to tasks.

Useful in case one needs more complex handling of tasks data than a mere MEM_freeN().

4 years agoBLI_task: Fix/enhance logic of exiting worker threads.
Bastien Montagne [Mon, 2 Nov 2015 15:35:53 +0000 (16:35 +0100)]
BLI_task: Fix/enhance logic of exiting worker threads.

In previous code, worker would exit in case it gets awoken from a condition_wait() and
task queue is empty. However, there may be spurious wake up (either due to pthread itself,
or to some race condition between workers) that would lead to wrongly exiting a worker before
we actually exit the whole scheduler. See code for more details.

4 years agoFix/workaround T46622: crash w/ metas & particles
Campbell Barton [Mon, 2 Nov 2015 11:59:46 +0000 (22:59 +1100)]
Fix/workaround T46622: crash w/ metas & particles

Metas are scanning all scenes duplis,
which can go into particle systems without an initialized derived-mesh.

For now just do NULL check, its not correct but real fix is not fitting well with current design.

4 years agoFix T46626: Crash generating previews
Campbell Barton [Mon, 2 Nov 2015 10:37:15 +0000 (21:37 +1100)]
Fix T46626: Crash generating previews

Brush.toggle_brush was allowed to be an invalid pointer,
it worked for the one operator that used it - but in general bad practice,
requiring a lookup on every access.

Ensure the pointer is kept valid now.

4 years agoLibrary API: pass Main struct to unlink functions
Campbell Barton [Mon, 2 Nov 2015 10:20:03 +0000 (21:20 +1100)]
Library API: pass Main struct to unlink functions

4 years agoFix BMesh selection flushing w/ mixed modes
Campbell Barton [Mon, 2 Nov 2015 05:53:42 +0000 (16:53 +1100)]
Fix BMesh selection flushing w/ mixed modes

Fix for T46494 wasn't working properly when de-selecting faces,
adjacent faces would remain selected but have unselected edges.

Logic here is admittedly rather fragile since it relies on both
selection functions and flushing afterwards.

4 years agoFix T46660: No need to set explicitely UI range of auto smooth angle anymore.
Bastien Montagne [Sun, 1 Nov 2015 18:57:52 +0000 (19:57 +0100)]
Fix T46660: No need to set explicitely UI range of auto smooth angle anymore.

4 years agoCycles: Partially revert previous commit
Sergey Sharybin [Sun, 1 Nov 2015 16:00:26 +0000 (21:00 +0500)]
Cycles: Partially revert previous commit

Apparently removing kernel arguments broke NVidia OpenCL.

Needs more investigation, for the time being revering changes which caused problem.

4 years agoCycles: Remove unused argument from the split kernel functions
Sergey Sharybin [Sun, 1 Nov 2015 11:51:32 +0000 (16:51 +0500)]
Cycles: Remove unused argument from the split kernel functions

Should be no functional changes, just simplifies operation with kernels.

4 years agoCycles: Minor code style cleanup
Sergey Sharybin [Sun, 1 Nov 2015 10:39:58 +0000 (15:39 +0500)]
Cycles: Minor code style cleanup

4 years agoFix T46655: crash reading unknown ID types
Campbell Barton [Sun, 1 Nov 2015 03:27:25 +0000 (14:27 +1100)]
Fix T46655: crash reading unknown ID types

4 years agoCleanup: remove unused scene recalc
Campbell Barton [Sun, 1 Nov 2015 01:45:15 +0000 (12:45 +1100)]
Cleanup: remove unused scene recalc

4 years agoCleanup: old comments
Campbell Barton [Sun, 1 Nov 2015 01:32:04 +0000 (12:32 +1100)]
Cleanup: old comments

4 years agoFix T46651: Select linked crash w/ wire seam edges
Campbell Barton [Sat, 31 Oct 2015 06:10:22 +0000 (17:10 +1100)]
Fix T46651: Select linked crash w/ wire seam edges

4 years agoFix T46648: Recalculate normals fails
Campbell Barton [Sat, 31 Oct 2015 02:39:20 +0000 (13:39 +1100)]
Fix T46648: Recalculate normals fails

Certain shapes could trick the inside/outside test.
An edge between 2 planar faces could be selected for detecting face-flipping (which failed).
While this could be prevented by skipping those edges,
use a method which searches for the outer most face-loop, then check it faces the center.

4 years agoFix netbeans project generator
Campbell Barton [Fri, 30 Oct 2015 21:26:22 +0000 (08:26 +1100)]
Fix netbeans project generator

Need to escape defines

4 years agoCycles: Add split kernel headers to project generation
Sergey Sharybin [Fri, 30 Oct 2015 23:07:57 +0000 (04:07 +0500)]
Cycles: Add split kernel headers to project generation

4 years agoFix T46647: Crash when using redo panel after extrude individual faces
Julian Eisel [Fri, 30 Oct 2015 20:52:58 +0000 (21:52 +0100)]
Fix T46647: Crash when using redo panel after extrude individual faces

Caused by rBe0c60985b6.

4 years agoCycles: Fixes for few typos in OpenCL kernel
Sergey Sharybin [Fri, 30 Oct 2015 18:30:48 +0000 (23:30 +0500)]
Cycles: Fixes for few typos in OpenCL kernel

4 years agoFix memory leak caused by recent shutter curve commits
Sergey Sharybin [Fri, 30 Oct 2015 13:01:25 +0000 (18:01 +0500)]
Fix memory leak caused by recent shutter curve commits

4 years agoInclude Python binary in system-info.txt
Campbell Barton [Fri, 30 Oct 2015 11:29:15 +0000 (22:29 +1100)]
Include Python binary in system-info.txt

4 years agoPython: check version binary name first
Campbell Barton [Fri, 30 Oct 2015 11:06:06 +0000 (22:06 +1100)]
Python: check version binary name first

Check version name first since 'python' binary may be a different version.

4 years agoImage editor: Add options to display separate R, G and B channels
Sergey Sharybin [Fri, 30 Oct 2015 11:06:00 +0000 (16:06 +0500)]
Image editor: Add options to display separate R, G and B channels

Works totally similar to backdrop in the compositor.

Requested by Sean Kennedy, but could be useful for lots for VFX guys.

Reviewers: campbellbarton

Reviewed By: campbellbarton

Subscribers: sebastian_k, hype

Differential Revision:

4 years agoTransform: Support storing virtual cursor location
Campbell Barton [Fri, 30 Oct 2015 06:31:07 +0000 (17:31 +1100)]
Transform: Support storing virtual cursor location

Grabbing now doesn't 'jump' when shift is released (matching rotation modes).

This simplifies most logic for transform input,
where mouse input callbacks can choose to use the 'virtual' cursor,
which accounts for precision when shift is held.

4 years agoBGE: Fix SetMass function affecting own object gravity.
Jorge Bernal [Fri, 30 Oct 2015 05:49:43 +0000 (06:49 +0100)]
BGE: Fix SetMass function affecting own object gravity.

Each time we setted the mass the own object gravity was divided by its
old mass (i.e you could convert you car in a flying DeLorean with a
simple mass car modification).

A note will be included in release notes due to retro compability

4 years agoOptimization: use dot product for angle comparison
Campbell Barton [Fri, 30 Oct 2015 05:20:22 +0000 (16:20 +1100)]
Optimization: use dot product for angle comparison

4 years agoFix T46507: Cycles baking re-orders face
Campbell Barton [Fri, 30 Oct 2015 03:47:50 +0000 (14:47 +1100)]
Fix T46507: Cycles baking re-orders face

Regression in 2.76, order of tessellated vertices needs to follow MFace tessellation.

4 years agoFix T46619: Levels node becomes Undefined
Campbell Barton [Thu, 29 Oct 2015 23:49:22 +0000 (10:49 +1100)]
Fix T46619: Levels node becomes Undefined

regression caused by 79c345ac

4 years agoVertex Paint: orbit last stroke support
Campbell Barton [Thu, 29 Oct 2015 22:53:27 +0000 (09:53 +1100)]
Vertex Paint: orbit last stroke support

This option works for all paint modes now.

4 years agoFix T46632: Graph editor frame navigation shortcuts not working
Julian Eisel [Thu, 29 Oct 2015 19:50:30 +0000 (20:50 +0100)]
Fix T46632: Graph editor frame navigation shortcuts not working

4 years agoBGE: Fix T38986: Start object position not initialized in IPO.
Porteries Tristan [Thu, 29 Oct 2015 16:50:16 +0000 (17:50 +0100)]
BGE: Fix T38986: Start object position not initialized in IPO.

The start position must be initialized at the first call of KX_IpoSGController::Update when m_ipo_start_initialized is to false, not when also the frame time is not 0.

4 years agoCycles: Fix typo in split kernel
Sergey Sharybin [Thu, 29 Oct 2015 16:50:46 +0000 (21:50 +0500)]
Cycles: Fix typo in split kernel

Shadow blocked kernel was using wrong array for storing intersection.

4 years agoCycles: Add option to force mega kernel to be used
Sergey Sharybin [Thu, 29 Oct 2015 16:45:57 +0000 (21:45 +0500)]
Cycles: Add option to force mega kernel to be used

This way it's possible to test mega kernel on various hardware.

That being said mega kernel seems to work on Fiji card here in the studio.

4 years agoCycles: OpenCL split kernel cleanup, move casts from .h files to .cl files
Sergey Sharybin [Thu, 29 Oct 2015 16:44:36 +0000 (21:44 +0500)]
Cycles: OpenCL split kernel cleanup, move casts from .h files to .cl files

Ideally we shouldn't use char* at all, but for now we have to, so at least
let's assume common .h files are free from pointer magic.

4 years agoBGE: Cleanup KX_IPO_SGCOntroller.
Porteries Tristan [Thu, 29 Oct 2015 14:13:04 +0000 (15:13 +0100)]
BGE: Cleanup KX_IPO_SGCOntroller.

- Add spaces around operators.
- Replace !(a == b) by a != b
- Add "f" at end of float value.
- Remove extras lines in fonctions declaration.
- Remove indentation to align attributes definition.

4 years agoOpenCL wrangler: Update to latest version to fix issues with -1001 error code
Sergey Sharybin [Thu, 29 Oct 2015 15:37:38 +0000 (20:37 +0500)]
OpenCL wrangler: Update to latest version to fix issues with -1001 error code

4 years agoFix error introduced by D1588
Campbell Barton [Thu, 29 Oct 2015 13:09:25 +0000 (00:09 +1100)]
Fix error introduced by D1588

4 years agoBGE: Fix T46338 replace mesh from an other scene.
Porteries Tristan [Thu, 29 Oct 2015 11:05:06 +0000 (12:05 +0100)]
BGE: Fix T46338 replace mesh from an other scene.

To make consistent with KX_GameObject.replaceMesh, we don't allow this behavior but print an error message for the replace mesh actuator.
e.g : Warning: object "Cube" from ReplaceMesh actuator "Edit Object" uses a mesh not owned by an object in scene "scene1"

Reviewers: youle.

4 years agoNew depsgraph: Optimize updates flush
Sergey Sharybin [Thu, 29 Oct 2015 09:14:09 +0000 (14:14 +0500)]
New depsgraph: Optimize updates flush

Previously it was possible that same component will be tagged for update
again and again, making update flushing really slow. Now we'll store flag
whether component was fully tagged.

This is still temporary solution because ideally we should just support
partial updates, but that's for the future.

Gives around 10% speedup on file from jpbouza.

4 years agoBGE: Fix T35188: Duplicate an instance of group.
Porteries Tristan [Wed, 28 Oct 2015 20:58:40 +0000 (21:58 +0100)]
BGE: Fix T35188: Duplicate an instance of group.

This behavior caused a double free.
Before when we duplicated an instance of a group the new instance keep the pointer of the group but was not added in the group instance list (normal).
And during the object deletion we tried to remove the object in the instance list but anyways if it failed decrement the reference count.
Set the group and the instance list to NULL in ProcessReplica avoid these kind of problems.

4 years agoTemporary "fix" for crash when saving OpenEXR Multi-View from Image Editor
Dalai Felinto [Wed, 28 Oct 2015 16:05:49 +0000 (14:05 -0200)]
Temporary "fix" for crash when saving OpenEXR Multi-View from Image Editor

4 years agoFix T46617 File Output Node seems to save only black images into OpenEXR image data
Dalai Felinto [Wed, 28 Oct 2015 15:41:01 +0000 (13:41 -0200)]
Fix T46617 File Output Node seems to save only black images into OpenEXR image data

If the node output had only one layer, it would be detected as singlelayer, and it would miss the blender exr header string

4 years agoFreestyle: Fix for 'Distance from Object' modifiers without a target object.
Tamito Kajiyama [Wed, 28 Oct 2015 14:33:16 +0000 (23:33 +0900)]
Freestyle: Fix for 'Distance from Object' modifiers without a target object.

'Distance from Object' color/alpha/thickness modifiers without a target
object were raising a run-time exception although it is not considered an
error condition.

4 years agoFix T44231: Freestyle causes crash on render.
Tamito Kajiyama [Wed, 28 Oct 2015 14:09:10 +0000 (23:09 +0900)]
Fix T44231: Freestyle causes crash on render.

The reported crash was confirmed as a segmentation fault in std::sort().
The cause of the crash was traced down to a binary comparison function
that was not satisfying the so-called strict weak ordering requirements of
the C++ standard sorting function.  Specifically, the comparison operator
has to return false when two objects are equivalent (i.e., comp(a, a) must
be false), but that requirement was not met.

Since the binary comparison operator in question could be a user-defined
Python function, here a safety measure is implemented in the C++ layer to
make sure the aforementioned requirement is always satisfied.

4 years agoCeres: Update to the latest version
Sergey Sharybin [Wed, 28 Oct 2015 13:55:04 +0000 (18:55 +0500)]
Ceres: Update to the latest version

It brings all the performance improvements, bug fixes and stability improvements
which were done in the last year of Ceres development.

4 years agoBGE: Fix T45945: Action bouncing.
Porteries Tristan [Wed, 28 Oct 2015 13:30:52 +0000 (14:30 +0100)]
BGE: Fix T45945: Action bouncing.

Bug introduced in 583fa7d1e, KX_GameObject.setActionFrame can make BL_Action::m_starttime negative. But in BL_Action::Update m_starttime is set to the current time if it's negative.
To fix it we use a boolean BL_Action::m_initializedTime to know if we should initialize the time in BL_Action::Update, it's more stable than comparing times.

Tested with bug task T45945 and T32054, with an extra patch about to fix suspend resume scene issues with actions : D1569

4 years agoTransform: Replace t->imval w/ t->mouse.imval
Campbell Barton [Wed, 28 Oct 2015 11:56:09 +0000 (22:56 +1100)]
Transform: Replace t->imval w/ t->mouse.imval

Initial mouse position was saved in two different places

D1588 by @mauge

4 years agoDocs: support alternate binary path for PyAPI
Campbell Barton [Wed, 28 Oct 2015 11:22:00 +0000 (22:22 +1100)]
Docs: support alternate binary path for PyAPI

4 years agoCleanup: warning/style
Campbell Barton [Wed, 28 Oct 2015 12:30:08 +0000 (23:30 +1100)]
Cleanup: warning/style

4 years agoCycles: Fix compilation error with MSVC
Sergey Sharybin [Wed, 28 Oct 2015 12:32:26 +0000 (17:32 +0500)]
Cycles: Fix compilation error with MSVC