4 years agoMerge branch 'master' into blender2.8
Julian Eisel [Fri, 17 Mar 2017 14:34:35 +0000 (15:34 +0100)]
Merge branch 'master' into blender2.8


4 years agoVarious icon adjustments
raa [Fri, 17 Mar 2017 13:47:19 +0000 (16:47 +0300)]
Various icon adjustments

4 years agoFix T50968: Cycles crashes when image datablock points to a directory
Sergey Sharybin [Fri, 17 Mar 2017 13:47:12 +0000 (14:47 +0100)]
Fix T50968: Cycles crashes when image datablock points to a directory

See more details about root of the cause there:

4 years agoRemote unecessary call to ces_type->callback
Dalai Felinto [Fri, 17 Mar 2017 10:52:09 +0000 (11:52 +0100)]
Remote unecessary call to ces_type->callback

4 years agoCycles: Fix mistake in previous split kernel commits
Sergey Sharybin [Fri, 17 Mar 2017 10:55:59 +0000 (11:55 +0100)]
Cycles: Fix mistake in previous split kernel commits

Own stupid mistake. Reported by nirved in IRC, thanks!

4 years agofix: redraw dope sheet / action editor when pose bone selection changes
Sybren A. Stüvel [Fri, 24 Feb 2017 17:21:46 +0000 (18:21 +0100)]
fix: redraw dope sheet / action editor when pose bone selection changes

4 years agoMerge branch 'master' into blender2.8
Bastien Montagne [Fri, 17 Mar 2017 10:00:41 +0000 (11:00 +0100)]
Merge branch 'master' into blender2.8


4 years agoCleanup: Use proper indentation
Sergey Sharybin [Thu, 16 Mar 2017 15:55:56 +0000 (16:55 +0100)]
Cleanup: Use proper indentation

4 years agoCycles: Cleanup, indentation
Sergey Sharybin [Fri, 17 Mar 2017 09:25:21 +0000 (10:25 +0100)]
Cycles: Cleanup, indentation

4 years agoRefactor writefile handling of data-blocks.
Bastien Montagne [Fri, 17 Mar 2017 09:02:08 +0000 (10:02 +0100)]
Refactor writefile handling of data-blocks.

Instead of calling a function looping over whole list of a given ID
type, make whole loop over Main in parent function, and call functions
writing a single datablock at a time.

This design is more in line with all other places in Blender where we
handle whole content of Main (including readfile.c), and much more easy
to extend and add e.g. some generic processing of IDs before/after
writing, etc.

From user point, there should be no change at all, only difference is
that data-block types won't be saved in same order as before (.blend
file specs enforces no order here, so this is not an issue, but it could
bug some third party users using other, simplified .blend file reader maybe).

Reviewers: sergey, campbellbarton

Differential Revision:

4 years agoCycles: Fix compilation error of LCG RNG
Sergey Sharybin [Fri, 17 Mar 2017 08:58:08 +0000 (09:58 +0100)]
Cycles: Fix compilation error of LCG RNG

4 years agoCycles: Silence strict compiler warning
Sergey Sharybin [Fri, 17 Mar 2017 08:56:44 +0000 (09:56 +0100)]
Cycles: Silence strict compiler warning

4 years agoCycles: Improve memory usage of CPU split kernel by using smaller global size
Mai Lavelle [Fri, 17 Mar 2017 05:31:11 +0000 (01:31 -0400)]
Cycles: Improve memory usage of CPU split kernel by using smaller global size

4 years agoCycles: Fix handling of barriers
Mai Lavelle [Thu, 16 Mar 2017 06:16:02 +0000 (02:16 -0400)]
Cycles: Fix handling of barriers

4 years agofix blenderplayer build after moving Gawain to intern
Mike Erwin [Fri, 17 Mar 2017 03:57:36 +0000 (23:57 -0400)]
fix blenderplayer build after moving Gawain to intern

4 years agoGawain: fix compiler warning
Mike Erwin [Fri, 17 Mar 2017 03:51:18 +0000 (23:51 -0400)]
Gawain: fix compiler warning

This function is only used when strict run-time checks are enabled.

4 years agomove Gawain library to intern
Mike Erwin [Fri, 17 Mar 2017 03:32:35 +0000 (23:32 -0400)]
move Gawain library to intern

Before now it lived in source/blender/gpu for convenience. Only a few files in the gpu module use Gawain directly.

Tested on Mac, time to push and test on Windows.

Todo: some CMake magic to make it easy to
#include "gawain/some_header.h"
from any C or H file. Main problem here is the many editors that include GPU_immediate.h which includes Gawain's immediate.h -- is there a way to avoid changing every editor's CMakeLists?

4 years agoMesh Convert: remove meaningless modifier check
Campbell Barton [Thu, 16 Mar 2017 23:10:55 +0000 (10:10 +1100)]
Mesh Convert: remove meaningless modifier check

Meshes w/o modifiers wouldn't have their derived mesh applied.
Check was to avoid crash but its in fact meaningless,
since the modifier might be disabled, or there may be virtual modifiers.

4 years agoFix T50950: Converting meshes fails w/ boolean
Campbell Barton [Thu, 16 Mar 2017 22:58:05 +0000 (09:58 +1100)]
Fix T50950: Converting meshes fails w/ boolean

4 years agoAdd BKE_blendfile_userdef_read_from_memory
Campbell Barton [Thu, 16 Mar 2017 20:01:11 +0000 (07:01 +1100)]
Add BKE_blendfile_userdef_read_from_memory

Needed to read user-preferences from in-memory startup.blend

Also skip data-blocks when reading preferences.

4 years agoset required MacOS version to 10.9
Mike Erwin [Thu, 16 Mar 2017 19:02:07 +0000 (15:02 -0400)]
set required MacOS version to 10.9

We could do more to simplify build files, but this is a start.

4 years agoAdd support for loading preference struct
Campbell Barton [Thu, 16 Mar 2017 18:10:36 +0000 (05:10 +1100)]
Add support for loading preference struct

Previously it would always load into 'U' global.
Needed for loading & merging template preferences.

4 years agoPyAPI: Menu.path_menu: Add path filter callback
Campbell Barton [Thu, 16 Mar 2017 18:17:39 +0000 (05:17 +1100)]
PyAPI: Menu.path_menu: Add path filter callback

Needed if we want to filter based on filenames (not just extension).

4 years agoCorrect reading missing property
Campbell Barton [Thu, 16 Mar 2017 18:20:09 +0000 (05:20 +1100)]
Correct reading missing property

4 years agoFix T50958: `template_ID_preview` is crashing the blender's UI from branch 2.8
Julian Eisel [Thu, 16 Mar 2017 15:04:20 +0000 (16:04 +0100)]
Fix T50958: `template_ID_preview` is crashing the blender's UI from branch 2.8

So apparently ID pointer is allowed to be NULL here.

4 years agoMerge branch 'master' into blender2.8
Bastien Montagne [Thu, 16 Mar 2017 16:28:04 +0000 (17:28 +0100)]
Merge branch 'master' into blender2.8

4 years agoFix missing undo pushes in outliner's new datablock management operations.
Bastien Montagne [Thu, 16 Mar 2017 16:02:11 +0000 (17:02 +0100)]
Fix missing undo pushes in outliner's new datablock management operations.

Not sure why I did not put those from start... Actually *not* having an
undo point here can be problematic, since undoing some previous action
was trying to restore from bad pointer (I think) in UI, generating

Note however that it's not a 'pure' undo, in that you may not find your
linked data in exact same state as before deleting it, after an undo,
since it actually implies *reloading* the deleted libraries (and not
restoring from a previously stored memory dump).

Reported by @sergey, thanks.

4 years agoFix outliner contextual menu allowing to delete indirect libraries.
Bastien Montagne [Thu, 16 Mar 2017 15:47:56 +0000 (16:47 +0100)]
Fix outliner contextual menu allowing to delete indirect libraries.

There is no way currently to prevent the option from showing in menu, so
instead report a warning to user (and curse again current nightmarish
system of operation in outliner...).

Reported by @sergey, thanks.

4 years agoMerge branch 'master' into blender2.8
Sergey Sharybin [Thu, 16 Mar 2017 14:42:49 +0000 (15:42 +0100)]
Merge branch 'master' into blender2.8

4 years agoDepsgraph: Fixed crash with curve bevel indirect dupligroups
Sergey Sharybin [Thu, 16 Mar 2017 14:27:03 +0000 (15:27 +0100)]
Depsgraph: Fixed crash with curve bevel indirect dupligroups

Need to expand all object's dupli-groups, not only the dupli-groups
of objects directly linked to the scene.

4 years agoDepsgraph: Use string and vector in the DEG namespace only
Sergey Sharybin [Thu, 16 Mar 2017 11:31:19 +0000 (12:31 +0100)]
Depsgraph: Use string and vector in the DEG namespace only

4 years agoDepsgraph: Don't use explicit values in runtime only enum
Sergey Sharybin [Thu, 16 Mar 2017 11:29:43 +0000 (12:29 +0100)]
Depsgraph: Don't use explicit values in runtime only enum

Lower risk of forgetting to update some values here.

4 years agoCleanup: differentiate startup/prefs in home-file reading
Campbell Barton [Thu, 16 Mar 2017 13:37:28 +0000 (00:37 +1100)]
Cleanup: differentiate startup/prefs in home-file reading

4 years agoSupport passing in UserDef for free function
Campbell Barton [Thu, 16 Mar 2017 13:18:20 +0000 (00:18 +1100)]
Support passing in UserDef for free function

Needed so we can load and free non-global user preferences.

4 years agoOpenGL immediate mode: `image_draw.c`: Draw `Sample Line` with new imm mode
Germano Cavalcante [Thu, 16 Mar 2017 13:15:01 +0000 (10:15 -0300)]
OpenGL immediate mode: `image_draw.c`: Draw `Sample Line` with new imm mode

part of T49043

4 years agoCycles: Define ccl_local variables in kernel functions
Sergey Sharybin [Wed, 8 Mar 2017 12:34:29 +0000 (13:34 +0100)]
Cycles: Define ccl_local variables in kernel functions

Declaring ccl_local in a device function is not supported
by certain compilers.

4 years agoCycles: Workaround for compilation error caused by passing KernelGlobals
Sergey Sharybin [Wed, 8 Mar 2017 11:49:04 +0000 (12:49 +0100)]
Cycles: Workaround for compilation error caused by passing KernelGlobals

Pass globals as a bare pointer, same as it sued to be prior to split kernel rework.

AMD CPU platform and Intel OpenCL were complaining about this.

Perhaps we shouldn't pass globals as pointer at all, this isn't something what is
really portable and can cause issues on 32 bit perhaps.

4 years agoCycles: Avoid some ccl_local in various kernels
Sergey Sharybin [Tue, 14 Mar 2017 13:44:52 +0000 (14:44 +0100)]
Cycles: Avoid some ccl_local in various kernels

4 years agoCycles: Adjust global size for OpenCL CPU devices to make them faster
Mai Lavelle [Thu, 16 Mar 2017 06:57:45 +0000 (02:57 -0400)]
Cycles: Adjust global size for OpenCL CPU devices to make them faster

4 years agoFix BGE building.
Bastien Montagne [Thu, 16 Mar 2017 09:30:02 +0000 (10:30 +0100)]
Fix BGE building.

When you use typedef'ed enum, you need to define all supported values
explicitely in enum, else compiler goes grumpy...

4 years agoAdds missing `immUnbindProgram()` in `image_draw`
Germano Cavalcante [Thu, 16 Mar 2017 04:13:18 +0000 (01:13 -0300)]
Adds missing `immUnbindProgram()` in `image_draw`

This was interruping the execution of the code (To test: Just left click on the UV editing window to read the pixel)

4 years agoOpenGL: draw navmesh with new imm mode
Mike Erwin [Thu, 16 Mar 2017 04:05:05 +0000 (00:05 -0400)]
OpenGL: draw navmesh with new imm mode

This is an old stash. Part of DerivedMesh so the whole thing might be removed soon.

part of T49043

4 years agoOpenGL: more new imm mode for image_draw
Mike Erwin [Wed, 15 Mar 2017 20:49:26 +0000 (16:49 -0400)]
OpenGL: more new imm mode for image_draw

plus some minor cleanup

part of T49043

4 years agoGawain: bypass strict error checking for release builds
Mike Erwin [Wed, 15 Mar 2017 20:33:18 +0000 (16:33 -0400)]
Gawain: bypass strict error checking for release builds

Now that we're almost done with T49043, let's run immediate mode at full speed. Debug builds will still do strict checks.

Developers should still test their changes before committing! Recommended:
$ make debug (or make lite debug)
$ blender --debug-gpu

4 years agoOutliner: Don't show master collection itself in "Master Collection Tree"
Julian Eisel [Wed, 15 Mar 2017 20:48:18 +0000 (21:48 +0100)]
Outliner: Don't show master collection itself in "Master Collection Tree"

It would always be the only highest-level element in the tree, without
serving a real purpose. Even collapsing it wouldn't make much sense.

4 years agoOutliner: Rename "All Collections" display mode to "Master Collection Tree"
Julian Eisel [Wed, 15 Mar 2017 19:43:04 +0000 (20:43 +0100)]
Outliner: Rename "All Collections" display mode to "Master Collection Tree"

Also don't show alphabetical sorting option for "Active Render Layer" mode.

4 years agoComments: wmOperator.cancel & modal
Campbell Barton [Wed, 15 Mar 2017 19:37:09 +0000 (06:37 +1100)]
Comments: wmOperator.cancel & modal

4 years agoMerge branch 'master' into blender2.8
Julian Eisel [Wed, 15 Mar 2017 19:28:12 +0000 (20:28 +0100)]
Merge branch 'master' into blender2.8

Needed for compile fix.

4 years agoMissed BGE in recent commit
Campbell Barton [Wed, 15 Mar 2017 19:28:03 +0000 (06:28 +1100)]
Missed BGE in recent commit

4 years agoOutliner: Change default display mode to "Active Layer"
Julian Eisel [Wed, 15 Mar 2017 19:03:35 +0000 (20:03 +0100)]
Outliner: Change default display mode to "Active Layer"

We concluded this is going to be the display mode users will need to work
with the most, so makes sense to make it the default one.
Also, if the opened file only has one collection in the active render
layer, we expand it (almost empty list would be misleading).

What I had to do to make the expanding work is a bit ugly, but didn't
find a better way. During do_version we don't have access to the
TreeElement instances, and including ED_outliner.h to share code here
should be avoided too.

4 years agoMerge branch 'master' into blender2.8
Campbell Barton [Wed, 15 Mar 2017 17:53:07 +0000 (04:53 +1100)]
Merge branch 'master' into blender2.8

4 years agoLoad user-preferences before startup file
Campbell Barton [Wed, 15 Mar 2017 16:54:58 +0000 (03:54 +1100)]
Load user-preferences before startup file

Internal change needed for template support.
Loading the user preferences first so it's possible
for preferences to control startup behavior.

In general it's useful to load preferences before data-files,
so we know security settings for eg.

4 years agoOpenGL: remove non-GLSL option from basic shader
Mike Erwin [Wed, 15 Mar 2017 15:52:54 +0000 (11:52 -0400)]
OpenGL: remove non-GLSL option from basic shader

This code path was only used when Blender was launched with --enable-legacy-basic-shader at the command line.

Part of general OpenGL upgrade (T49165)

4 years agoFix "search for unknown operator 'WM_OT_window_duplicate'" warning
Julian Eisel [Wed, 15 Mar 2017 15:03:01 +0000 (16:03 +0100)]
Fix "search for unknown operator 'WM_OT_window_duplicate'" warning

Mistake in rB7bc76f8a3c1416.

4 years agoCycles: Allow rendering a range of resumable chunks
Sergey Sharybin [Wed, 15 Mar 2017 14:52:27 +0000 (15:52 +0100)]
Cycles: Allow rendering a range of resumable chunks

The range is controlled using the following command line arguments:


Those are 1-based index of range for rendering.

4 years agoCycles: Use argument parser for resumable render feature
Sergey Sharybin [Wed, 15 Mar 2017 14:36:40 +0000 (15:36 +0100)]
Cycles: Use argument parser for resumable render feature

Currently there is no functional changes, but we will be adding
couple more of options here soon.

4 years agoFix bug on Blender version string
Dalai Felinto [Wed, 15 Mar 2017 14:42:01 +0000 (15:42 +0100)]
Fix bug on Blender version string

Reported by Pablo Vazquez (venomgfx) over irc.

4 years agoImmediate Mode: Fix text color in iuage info line
Sergey Sharybin [Wed, 15 Mar 2017 14:04:41 +0000 (15:04 +0100)]
Immediate Mode: Fix text color in iuage info line

4 years agoBlender 2.8: Always prefer Occlusion Queries when using AUTO selection mode
Sergey Sharybin [Wed, 15 Mar 2017 13:55:46 +0000 (14:55 +0100)]
Blender 2.8: Always prefer Occlusion Queries when using AUTO selection mode

GL_SELECT is really slow in this branch and will be removed.

For now we simply change AUTO behavior to avoid possible conflicts with merges
and upcoming color-id-based selection.

4 years agoMerge branch 'master' into blender2.8
Sergey Sharybin [Wed, 15 Mar 2017 13:19:53 +0000 (14:19 +0100)]
Merge branch 'master' into blender2.8

4 years agoDe-duplictae fix for lasso with Dalai
Sergey Sharybin [Wed, 15 Mar 2017 13:17:52 +0000 (14:17 +0100)]
De-duplictae fix for lasso with Dalai

Git silently merged our both fixes together. Sure thing it's double safe this way, but cmon.

4 years agoLayers: handle doversion naming differently
Dalai Felinto [Wed, 15 Mar 2017 13:12:38 +0000 (14:12 +0100)]
Layers: handle doversion naming differently

Talked with Pablo Vazquez (venomgfx) and Julian Eisel (Severin), and we came up with this solution instead.

Basically, if the file has only one layer, it is converted to a collection named "Default Collection". Otherwise we name the collections: "Collection 1 [converted from 2.75]"

4 years agoMove Blender version string handling to its own function
Dalai Felinto [Wed, 15 Mar 2017 13:10:20 +0000 (14:10 +0100)]
Move Blender version string handling to its own function

Planning to use this util function in 2.8 for doversioning (to communicate converted layers)

4 years agoCorrect assert failure in debug mode with lasso select
Sergey Sharybin [Wed, 15 Mar 2017 13:01:30 +0000 (14:01 +0100)]
Correct assert failure in debug mode with lasso select

Just do early output and don't bother with any GLSL program bind when
there is not enough points of lasso to draw.

This could have happened at the very beginning of the stroke.

4 years agoRemove commented out code from transform_snap.c
Dalai Felinto [Wed, 15 Mar 2017 11:17:29 +0000 (12:17 +0100)]
Remove commented out code from transform_snap.c

Code was commented out in 2012 and it was not working even then. So it makes for an impossible conversion to the new gawain API.

4 years agoRemove commented out code from reeb.c
Dalai Felinto [Wed, 15 Mar 2017 11:09:14 +0000 (12:09 +0100)]
Remove commented out code from reeb.c

Code was commented out in 2009

4 years agoRemove commented out code from pbvh.c
Dalai Felinto [Wed, 15 Mar 2017 11:06:46 +0000 (12:06 +0100)]
Remove commented out code from pbvh.c

Code was commented out in 2009

4 years agoRemove commented out code from editarmature_sketch.c
Dalai Felinto [Wed, 15 Mar 2017 10:55:32 +0000 (11:55 +0100)]
Remove commented out code from editarmature_sketch.c

Code was commented out in 2010

4 years agoImmediate Mode: update drawnode.c commented out debug code
Dalai Felinto [Wed, 15 Mar 2017 10:51:06 +0000 (11:51 +0100)]
Immediate Mode: update drawnode.c commented out debug code

It works fine if you uncomment it, it shows a bigger circle around the re-route element, with a different color based on the selection state

4 years agoFix crash on node editor when using lasso to remove nodes connections
Dalai Felinto [Wed, 15 Mar 2017 10:41:56 +0000 (11:41 +0100)]
Fix crash on node editor when using lasso to remove nodes connections

4 years agoRemove unused code from drawnode.c
Dalai Felinto [Wed, 15 Mar 2017 10:26:54 +0000 (11:26 +0100)]
Remove unused code from drawnode.c

The code in question was marked as /* not used in 2.5x yet */.

4 years agoImmediate Mode: remove commented out code from drawgpencil.c
Dalai Felinto [Wed, 15 Mar 2017 10:15:51 +0000 (11:15 +0100)]
Immediate Mode: remove commented out code from drawgpencil.c

Some of this was "tagged" for removal by Dec 2016.

4 years agoUse FTOCHAR rather than CLAMP of uchar output
Sergey Sharybin [Wed, 15 Mar 2017 12:48:47 +0000 (13:48 +0100)]
Use FTOCHAR rather than CLAMP of uchar output

This makes no sense to clamp after value was assigned to uchar already.
Proper way to do so is to use FTOCHAR.

4 years agoOpenGL: Converted gpu_compositing.c to use batches.
Clément Foucault [Wed, 15 Mar 2017 12:17:08 +0000 (13:17 +0100)]
OpenGL: Converted gpu_compositing.c to use batches.

4 years agoMerge branch 'master' into blender2.8
Sergey Sharybin [Wed, 15 Mar 2017 11:48:48 +0000 (12:48 +0100)]
Merge branch 'master' into blender2.8

4 years agoFix strict compiler warning in the previous commit
Sergey Sharybin [Wed, 15 Mar 2017 11:48:07 +0000 (12:48 +0100)]
Fix strict compiler warning in the previous commit

4 years agoFix T50938: Cache not being reset when changing simulation settings with new depsgraph
Sergey Sharybin [Wed, 15 Mar 2017 10:10:42 +0000 (11:10 +0100)]
Fix T50938: Cache not being reset when changing simulation settings with new depsgraph

The thing i'm really starting to hate is the requirement to specify both
operation code and node type. Seems to be duplicated enums without real
need for that.

4 years agoBGE: Fix blenderplayer stub.
Porteries Tristan [Tue, 14 Mar 2017 21:15:50 +0000 (21:15 +0000)]
BGE: Fix blenderplayer stub.

Add dummy definition of WM_operator_is_repeat.

4 years agoMerge branch 'master' into blender2.8
Campbell Barton [Tue, 14 Mar 2017 19:04:52 +0000 (06:04 +1100)]
Merge branch 'master' into blender2.8

4 years agoWM: free operators when repeating
Campbell Barton [Tue, 14 Mar 2017 18:16:07 +0000 (05:16 +1100)]
WM: free operators when repeating

Needed since the active operator isn't ensured to be the last.

4 years agofix D2552: Collada - Follow up change to complete the fix in rBda6cd7762810 (use...
Gaia Clary [Tue, 14 Mar 2017 18:31:15 +0000 (19:31 +0100)]
fix D2552: Collada - Follow up change to complete the fix in rBda6cd7762810 (use unique id for bones with same name in different armatures)

4 years agoCollada simplify: avoid duplicate negation in boolean
Gaia Clary [Tue, 14 Mar 2017 14:07:31 +0000 (15:07 +0100)]
Collada simplify: avoid duplicate negation in boolean

4 years agoWM: add Operator.is_repeat() check for C & Py
Campbell Barton [Tue, 14 Mar 2017 16:43:44 +0000 (03:43 +1100)]
WM: add Operator.is_repeat() check for C & Py

This addresses an issue raised by D2453 -
that there was no way to check if operators are run
multiple times in a row.

Actions are still ignored that don't cause an UNDO event.

4 years agoWM: store operators with undo flag
Campbell Barton [Tue, 14 Mar 2017 15:37:33 +0000 (02:37 +1100)]
WM: store operators with undo flag

This is needed so we can tell if operators are executed repeatedly.

4 years agoUpdate path_menu for recent API change
Campbell Barton [Tue, 14 Mar 2017 15:59:32 +0000 (02:59 +1100)]
Update path_menu for recent API change

4 years agoCycles: Cleanup, indentation
Sergey Sharybin [Tue, 14 Mar 2017 15:54:16 +0000 (16:54 +0100)]
Cycles: Cleanup, indentation

4 years agoFix T50926: python crashes with path containing utf8 characters.
Bastien Montagne [Tue, 14 Mar 2017 15:04:03 +0000 (16:04 +0100)]
Fix T50926: python crashes with path containing utf8 characters.

Default text encoding is platform-dependent in python, and windows
usually do not use utf-8 as default...

4 years agofix D2552: Collada - use unique id for bones with same name but in different armature...
Jon Allee [Tue, 14 Mar 2017 13:17:04 +0000 (14:17 +0100)]
fix D2552: Collada - use unique id for bones with same name but in different armatures. Co-authored-by: Gaia <>

4 years agoCLNor: rework threaded computation.
Bastien Montagne [Tue, 14 Mar 2017 10:48:11 +0000 (11:48 +0100)]
CLNor: rework threaded computation.

Was using some threaded queue on top of task pool, tssk...

Now using properly task pool directly to crunch chunks of smooth fans.

No noticable changes in speed.

Tried to completely get rid of the 'no threading with few loops' code,
but even just creating/freeing the task pool, without actually pushing
any task, is enough to make code 50% slower in worst case scenario (i.e.
few thousands of simple cube objects).

4 years agoCLNor code: use averaged debug timing.
Bastien Montagne [Mon, 13 Mar 2017 15:44:58 +0000 (16:44 +0100)]
CLNor code: use averaged debug timing.

4 years agoFix T50876: Cycles Crash - Cycles crashes before sampling when certain meshes have...
Bastien Montagne [Mon, 13 Mar 2017 15:13:47 +0000 (16:13 +0100)]
Fix T50876: Cycles Crash - Cycles crashes before sampling when certain meshes have autosmooth enabled.

The root of the issue was in custom normal code, so far it assumed that
we could only have one cyclic smooth fan around each vertex, which is...
blatantly wrong (again, the two cones sharing same vertex tip e.g.).

This required a rather deep change in how smooth fans/clnor spaces are processed,
took me some time to find a 'good' solution.

Note that new code is slightly slower than previous one (maybe about 5%),
not much to be done here, am afraid.

Tested against all older report files I could find, seems OK.

4 years agoFix own mistake in recent 'edge split' refactor.
Bastien Montagne [Mon, 13 Mar 2017 15:11:48 +0000 (16:11 +0100)]
Fix own mistake in recent 'edge split' refactor.

We do can have some vertices to split, while not having any edge (think
about two cones sharing the same tip vertex e.g.).

4 years agoCycles: Try to avoid infinite loops by catching invalid ray states
Mai Lavelle [Sat, 11 Mar 2017 12:03:17 +0000 (07:03 -0500)]
Cycles: Try to avoid infinite loops by catching invalid ray states

4 years agoWM: Option to load startup w/o closing the splash
Campbell Barton [Tue, 14 Mar 2017 10:05:00 +0000 (21:05 +1100)]
WM: Option to load startup w/o closing the splash

Not user visible, needed for switching templates.

4 years agoPyAPI: extend Menu.path_menu
Campbell Barton [Tue, 14 Mar 2017 09:58:16 +0000 (20:58 +1100)]
PyAPI: extend Menu.path_menu

- Add optional 'display_name' callback
  so callers can construct own names.
- Add optional 'prop_filepath' argument
  (for operators that don't use "filepath").
- Add doc-string.
- Use keyword only arguments.

4 years agoCMake: add missing headers
Campbell Barton [Tue, 14 Mar 2017 07:47:26 +0000 (18:47 +1100)]
CMake: add missing headers

4 years agoCleanup: warnings
Campbell Barton [Tue, 14 Mar 2017 07:40:23 +0000 (18:40 +1100)]
Cleanup: warnings

4 years agoFix T50932: depth picking w/ pose-bone constraints
Campbell Barton [Tue, 14 Mar 2017 07:01:04 +0000 (18:01 +1100)]
Fix T50932: depth picking w/ pose-bone constraints

4 years agofix warnings from previous commit
Mike Erwin [Tue, 14 Mar 2017 05:41:09 +0000 (01:41 -0400)]
fix warnings from previous commit

Batch struct initializer needed more {{braces}}

4 years agoGawain: multiple VertexBuffers per Batch
Mike Erwin [Tue, 14 Mar 2017 05:38:42 +0000 (01:38 -0400)]
Gawain: multiple VertexBuffers per Batch

So we can store (for example) vertex positions in one buffer and normals + colors in another buffer. Not super exciting right now, but very useful once we start changing some attribute values.

Supports future work by Clément et al. Only tested with one VBO per Batch since that's all our current code uses.