blender.git
3 years agoCycles: Wrap SVM compiler state variables into a single struct
Sergey Sharybin [Wed, 30 Dec 2015 14:21:19 +0000 (19:21 +0500)]
Cycles: Wrap SVM compiler state variables into a single struct

This way it's easier to pass stuff around and also much easier to add more
state variables.

So far should be no functional changes for artists.

3 years agoCycles: Optionally output luminance from the shader evaluation kernel
Sergey Sharybin [Wed, 30 Dec 2015 14:04:01 +0000 (19:04 +0500)]
Cycles: Optionally output luminance from the shader evaluation kernel

This makes it possible to move some parts of evaluation from host to the device
and hopefully reduce memory usage by avoid having full RGBA buffer on the host.

Reviewers: juicyfruit, lukasstockner97, brecht

Reviewed By: lukasstockner97, brecht

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

3 years agoCycles: Don't install CPU-related kernel files
Sergey Sharybin [Wed, 30 Dec 2015 13:51:35 +0000 (18:51 +0500)]
Cycles: Don't install CPU-related kernel files

3 years agoCycles: Deduplicte CPU kernel declaration and definition code
Sergey Sharybin [Wed, 30 Dec 2015 12:54:02 +0000 (17:54 +0500)]
Cycles: Deduplicte CPU kernel declaration and definition code

Main goal is to make kernel signatures editing easier and less prone to the
errors caused by missing function signature update or so.

This will also make it easier to add new CPU architectures.

Reviewers: juicyfruit, dingto, lukasstockner97, brecht

Reviewed By: dingto, lukasstockner97, brecht

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

3 years agoBGE: Fix invalid operator< for microsoft compiler.
Porteries Tristan [Wed, 30 Dec 2015 12:27:30 +0000 (13:27 +0100)]
BGE: Fix invalid operator< for microsoft compiler.

It fixes the strict weak ordering assertion failure, see : https://support.microsoft.com/en-us/kb/949171.
sybren and youle are the author of this commit.

3 years agoGLog: Solve some compilation warnings
Sergey Sharybin [Wed, 30 Dec 2015 12:25:54 +0000 (17:25 +0500)]
GLog: Solve some compilation warnings

Those are actually sent to a pull-request, see

  https://github.com/google/glog/pull/81

3 years agoLibmv: Update to the latest upstream version
Sergey Sharybin [Wed, 30 Dec 2015 11:51:21 +0000 (16:51 +0500)]
Libmv: Update to the latest upstream version

Main reason is to bring up new Glog which should have MSVC 2015
support.

3 years agoFix Moto overflow warnings
Thomas Szepe [Wed, 30 Dec 2015 11:45:36 +0000 (12:45 +0100)]
Fix Moto overflow warnings

This fault (level 2, C4056) was introduced by changing Moto from double to float.

3 years agoSkip some more workarounds when using MSVC 2015
Martijn Berger [Wed, 30 Dec 2015 10:23:10 +0000 (11:23 +0100)]
Skip some more workarounds when using MSVC 2015

3 years agoMake cycles compile with MSVC 2015
Martijn Berger [Tue, 29 Dec 2015 17:59:23 +0000 (18:59 +0100)]
Make cycles compile with MSVC 2015

3 years agoCycles: Add timing information to the SVM compiler stats
Sergey Sharybin [Tue, 29 Dec 2015 16:20:10 +0000 (21:20 +0500)]
Cycles: Add timing information to the SVM compiler stats

3 years agoCycles: Optimize nodes deduplication routines
Sergey Sharybin [Tue, 29 Dec 2015 15:27:00 +0000 (20:27 +0500)]
Cycles: Optimize nodes deduplication routines

The idea is to have separate sets per node name in order to speed up the
comparison process. This will use a bit more memory and slow down simple
shaders, but this extra memory is not so much huge and time penalty is
not really measurable (at least from initial tests).

This saves orders of magnitude seconds when de-duplicating 17K nodes and
overall process now takes 0.01sec on my laptop,

3 years agoCycles: Remove assert which is no longer valid
Sergey Sharybin [Tue, 29 Dec 2015 14:15:59 +0000 (19:15 +0500)]
Cycles: Remove assert which is no longer valid

Was a left-over since 5b33115.

3 years agoMore from T47045: Add i18n translations to render status from compo.
Bastien Montagne [Tue, 29 Dec 2015 11:42:12 +0000 (12:42 +0100)]
More from T47045: Add i18n translations to render status from compo.

Also fix inconsistency for freestyle translation - we use IFACE_ everywhere
(TIP_ may be more suited, but let's be consistent first!).

3 years agoBuilding w/o OpenMP now works again
Campbell Barton [Mon, 28 Dec 2015 23:22:11 +0000 (10:22 +1100)]
Building w/o OpenMP now works again

rename define since its no longer OpenMP specific.

3 years agoFix invalid memory access in multiview code during render, reported on irc.
Brecht Van Lommel [Mon, 28 Dec 2015 23:24:41 +0000 (00:24 +0100)]
Fix invalid memory access in multiview code during render, reported on irc.

3 years agoOS X: remove code for OS X <= 10.5, which is already not supported since 2 years.
Brecht Van Lommel [Sun, 27 Dec 2015 17:54:14 +0000 (18:54 +0100)]
OS X: remove code for OS X <= 10.5, which is already not supported since 2 years.

3 years agoFix memleaks in our gtests.
Bastien Montagne [Mon, 28 Dec 2015 22:19:24 +0000 (23:19 +0100)]
Fix memleaks in our gtests.

3 years agoBLI_math_statistics: switch from OMP to BLI_task.
Bastien Montagne [Mon, 28 Dec 2015 21:57:55 +0000 (22:57 +0100)]
BLI_math_statistics: switch from OMP to BLI_task.

This time, with have over 300% speedup!

But no, this is not due to switch to BLI_task (which 'only' gives usal 15% speedup),
but to enhancement of the algorithm, flatten loop over covariance matrix items now allows
to compute (usually) all items in parallel, instead of having at most 3 or 4 working threads
(with unbalanced load even)...

3 years agoBLI_kdopbvh: switch from OMP to BLI_task.
Bastien Montagne [Mon, 28 Dec 2015 20:37:46 +0000 (21:37 +0100)]
BLI_kdopbvh: switch from OMP to BLI_task.

Gives the usual 10%-30% speedup on affected functions themselves (BLI_bvhtree_overlap() and
BLI_bvhtree_balance()), and about 2% speedup to overall cloth sim e.g. (measured from
main Cloth modifier func).

3 years agoFix opengl error when GLSL is on for basic shader: shader needs to be
Antony Riakiotakis [Mon, 28 Dec 2015 19:51:38 +0000 (20:51 +0100)]
Fix opengl error when GLSL is on for basic shader: shader needs to be
bound before setting uniforms

3 years agocdderivedmesh fix stippled faces not getting drawn at all
Antony Riakiotakis [Mon, 28 Dec 2015 16:54:45 +0000 (17:54 +0100)]
cdderivedmesh fix stippled faces not getting drawn at all

Also rearranged code here to not issue a draw call (explicit flush) per
face and not set shader per face either when stippled drawing is mixed
with regular drawing. Not good at all for performance.

3 years agoFix T47045: add some missing UI i18n translations to texture buttons and freestyle...
Bastien Montagne [Mon, 28 Dec 2015 16:46:48 +0000 (17:46 +0100)]
Fix T47045: add some missing UI i18n translations to texture buttons and freestyle render messages.

3 years agoMinor cleanup (paranoid checks) and fixes from coverity.
Bastien Montagne [Mon, 28 Dec 2015 15:48:35 +0000 (16:48 +0100)]
Minor cleanup (paranoid checks) and fixes from coverity.

3 years agoSome fixes from coverity (only one really nasty, in paint_proj).
Bastien Montagne [Mon, 28 Dec 2015 15:08:36 +0000 (16:08 +0100)]
Some fixes from coverity (only one really nasty, in paint_proj).

3 years agoCycles: Use different approach for SVM summary report
Sergey Sharybin [Mon, 28 Dec 2015 14:30:43 +0000 (19:30 +0500)]
Cycles: Use different approach for SVM summary report

Use Summary structure to collect all summary related on the shader compilation
process which then could be either simply reported to the log or be passed to
some user interface or so.

This is type of the summary / report which is most flexible and useful and
something we could use for other parts like shader optimization.

3 years agoCleanup: style, indentation
Campbell Barton [Mon, 28 Dec 2015 14:08:13 +0000 (01:08 +1100)]
Cleanup: style, indentation

3 years agoCorrect recent error passing NULL to fclose
Campbell Barton [Mon, 28 Dec 2015 14:00:25 +0000 (01:00 +1100)]
Correct recent error passing NULL to fclose

3 years agoCycles; Fix typo in the comment
Sergey Sharybin [Mon, 28 Dec 2015 14:01:26 +0000 (19:01 +0500)]
Cycles; Fix typo in the comment

3 years agoCycles: Log basic statistics of SVM compilation process
Sergey Sharybin [Mon, 28 Dec 2015 14:00:11 +0000 (19:00 +0500)]
Cycles: Log basic statistics of SVM compilation process

3 years agoCeres: Remove suitesparse related files
Sergey Sharybin [Sat, 26 Dec 2015 19:26:57 +0000 (00:26 +0500)]
Ceres: Remove suitesparse related files

It's quite small chance we'll be supporting suitesparse for Blender due to all
the complexity of 3rd party libraries, so removing implementation files which
are only needed when suitesparse is enabled.

3 years agoCycles: Implement node deduplication routines
Sergey Sharybin [Tue, 15 Dec 2015 16:56:27 +0000 (21:56 +0500)]
Cycles: Implement node deduplication routines

The idea of this commit is to merge nodes which has identical settings
and matching inputs into a single node in order to minimize number of
SVM instructions.

This is quite simple bottom-top graph traversal and the trickiest part
is how to compare node settings without too much trouble which seems to
be solved is quite clean way.

Still possibilities for further improvements:

- Support comparison of BSDF nodes
- Support comparison of volume nodes
- Support comparison of curve mapping/ramp nodes

Reviewers: brecht, juicyfruit, dingto

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

3 years agoWhite Balance modifier for the VSE
Thomas Beck [Mon, 28 Dec 2015 10:55:14 +0000 (11:55 +0100)]
White Balance modifier for the VSE

This snippet creates a white balance modifier for the video sequence editor. It is useful for everyone who likes to set a new white point in the video source (easily via the eyedropper). Just select a point in the source file where you know that it should be white. The algorithm will then shift the colors towards your new white point.

See attached the image for a quick demo.

{F270576}

Reviewers: psy-fi

Reviewed By: psy-fi

Subscribers: Blendify

Projects: #bf_blender

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

3 years agoFix for building ghost-tests
Campbell Barton [Mon, 28 Dec 2015 10:40:49 +0000 (21:40 +1100)]
Fix for building ghost-tests

3 years agoFix possible invalid-index use /w link/path select
Campbell Barton [Mon, 28 Dec 2015 10:26:02 +0000 (21:26 +1100)]
Fix possible invalid-index use /w link/path select

3 years agoCleanup: use BLI_libblock prefix for id functions
Campbell Barton [Mon, 28 Dec 2015 06:17:25 +0000 (17:17 +1100)]
Cleanup: use BLI_libblock prefix for id functions

- test_idbutton -> BLI_libblock_ensure_unique_name (not only used from UI)
- BKE_rename_id -> BKE_libblock_rename (always pass valid main)

also rename:
- name_uiprefix_id -> BKE_id_uiprefix

3 years agoCleanup typo.
Bastien Montagne [Sun, 27 Dec 2015 23:33:07 +0000 (00:33 +0100)]
Cleanup typo.

Harmless but irritating... :P

3 years agoSwitch BKE_smoke from OMP to BLI_task.
Bastien Montagne [Sun, 27 Dec 2015 23:29:36 +0000 (00:29 +0100)]
Switch BKE_smoke from OMP to BLI_task.

Gives a global speedup of about 5% in smoke simulation (as usual, parallelized chunks themselves
are about 15-25% quicker with BLI_task than with OMP), using a simple setup with two generators
(one from mesh, one from particles), an obstacle and a windfield.

3 years agoFix (unreported) broken BLI_task's forloop func in case we have less iterations that...
Bastien Montagne [Sun, 27 Dec 2015 23:28:37 +0000 (00:28 +0100)]
Fix (unreported) broken BLI_task's forloop func in case we have less iterations that workers.

When called with very small range, `BLI_task_parallel_range_ex()` would generate a zero `chunk_size`,
leading to some infinite looping in `parallel_range_func` due to `parallel_range_next_iter_get` returning
true without actually increasing the counter!

So now, we ensure `chunk_size` and `num_tasks` are always at least 1 (and avoid generating too much tasks too).

3 years agoFix for heap-use-after-free happening in GHOST_EventManager.
Kévin Dietrich [Sun, 27 Dec 2015 23:35:27 +0000 (00:35 +0100)]
Fix for heap-use-after-free happening in GHOST_EventManager.

Issue was that dispatchEvent might call removeWindowEvents/
removeTypeEvents which will delete the event before we can do so.

To address this, handled events are now put in a separate list.

Reported by psy-fi and reviewed by brecht in IRC.

3 years agoChanges to rename_id function:
Antony Riakiotakis [Sun, 27 Dec 2015 22:22:43 +0000 (23:22 +0100)]
Changes to rename_id function:

* Don't copy name before entering new_id function. new_id does that for
us already.

* Take a main argument to make the function possible to use with
different databases

* Append BKE_ to rename_id

3 years agoAddendum to previous GHOST commit: remove redundant check.
Kévin Dietrich [Sun, 27 Dec 2015 20:32:19 +0000 (21:32 +0100)]
Addendum to previous GHOST commit: remove redundant check.

3 years agoMinor UI incosistency reported by erickblender on irc. Twist brush is
Antony Riakiotakis [Sun, 27 Dec 2015 20:16:16 +0000 (21:16 +0100)]
Minor UI incosistency reported by erickblender on irc. Twist brush is
renamed to Rotate to match the tool name.

It is not actually compulsory that the two must match since users can
change the name of a brush arbitrarily but at least try to have
consistent naming in our defaults.

3 years agoFix memory leak in GHOST Event Manager.
Kévin Dietrich [Sun, 27 Dec 2015 17:07:38 +0000 (18:07 +0100)]
Fix memory leak in GHOST Event Manager.

The events are allocated on the heap, then pushed on a stack. Before
being processed, they are popped from the stack, and deleted after
processing is done. When the manager is destroyed (e.g. application
closing), any remaining event in the stack is detroyed.

Issue is that when the "application closing" event is processed, it is
never freed, because the manager gets destroyed before the call to
`delete` is made and the event is not on the stack anymore.

Now events are left on the stack while they are processed, and only
popped and deleted after processing is done.

As a slight bonus refactor: use void as return type for dispatch events
functions, as no caller is checking the return value, and it is not
clear what it means (suggested by the reviewer).

Reviewers: brecht

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

3 years agoCMake: make install prefix option irrelevant for MinGW too.
Antony Riakiotakis [Sun, 27 Dec 2015 15:57:31 +0000 (16:57 +0100)]
CMake: make install prefix option irrelevant for MinGW too.

3 years agoFix T47064: Change Audio defaults to 48 kHz
Jörg Müller [Sun, 27 Dec 2015 15:33:54 +0000 (16:33 +0100)]
Fix T47064: Change Audio defaults to 48 kHz

Historically blender had an audio sample rate of 44.1 kHz as default which is mostly popular because it's the sample rate of audio CDs. Audaspace kept using this default from the pre 2.5 era. It was about time to change to 48 kHz, which is a more widespread standard nowadays, especially in video. It is the recommended sampling rate of the Audio Engineering Society.

Further reading: https://en.wikipedia.org/wiki/44,100_Hz#Status

3 years agoBMesh Path Select: Face Stepping Option
Campbell Barton [Sun, 27 Dec 2015 11:38:12 +0000 (22:38 +1100)]
BMesh Path Select: Face Stepping Option

Supports diagonal paths for verts and faces,
Selects edge-rings with edges.

3 years agoBMesh: BM_loop_share_edge_check utility func
Campbell Barton [Sun, 27 Dec 2015 11:37:12 +0000 (22:37 +1100)]
BMesh: BM_loop_share_edge_check utility func

3 years agoSplit id->flag in two, persistent flags and runtime tags.
Bastien Montagne [Sun, 27 Dec 2015 10:53:50 +0000 (11:53 +0100)]
Split id->flag in two, persistent flags and runtime tags.

This is purely internal sanitizing/cleanup, no change in behavior is expected at all.

This change was also needed because we were getting short on ID flags, and
future enhancement of 'user_one' ID behavior requires two new ones.

id->flag remains for persistent data (fakeuser only, so far!), this also allows us
100% backward & forward compatibility.

New id->tag is used for most flags. Though written in .blend files, its content
is cleared at read time.

Note that .blend file version was bumped, so that we can clear runtimeflags from
old .blends, important in case we add new persistent flags in future.

Also, behavior of tags (either status ones, or whether they need to be cleared before/after use)
has been added as comments to their declaration.

Reviewers: sergey, campbellbarton

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

3 years agoBMesh Path Select: Add checker-select options
Campbell Barton [Sun, 27 Dec 2015 07:05:53 +0000 (18:05 +1100)]
BMesh Path Select: Add checker-select options

Allows to quickly select alternate elems in a path (matching checker-deselect options).

- adds redo support to MESH_OT_shortest_path_pick, allowing for other options.
- de-duplicates code between 2x path select operators.
- expose 'Topology Distance' property for path picking.
- remove unused 'extend' property.

3 years agoBMesh: extract int/bmesh element access funcs.
Campbell Barton [Sun, 27 Dec 2015 07:03:20 +0000 (18:03 +1100)]
BMesh: extract int/bmesh element access funcs.

Support getting an vert/edge/face from a single index, useful for operator redo.

3 years agoWM: add checker_interval utility functions
Campbell Barton [Sun, 27 Dec 2015 06:46:55 +0000 (17:46 +1100)]
WM: add checker_interval utility functions

3 years agoMove generic operator props into own file
Campbell Barton [Sun, 27 Dec 2015 05:36:08 +0000 (16:36 +1100)]
Move generic operator props into own file

This is unrelated to core operator internals, so move into own file.

3 years agoFix for error w/ QtCreator project builder
Campbell Barton [Sun, 27 Dec 2015 06:09:29 +0000 (17:09 +1100)]
Fix for error w/ QtCreator project builder

cmake_qtcreator_project.py now takes a '--build-dir' argument.

Since introduction of argparse, accessing last argv from project_info is no longer working.
Now require a call to project_info.init before use.

3 years agoOpenGL: stipple support added to basic GLSL shader
Alexander Romanov [Fri, 25 Dec 2015 21:57:50 +0000 (22:57 +0100)]
OpenGL: stipple support added to basic GLSL shader

The is intended to replace the deprecated glPolygonStipple() calls with a shader
based alternative, once we switch over to GLSL shaders.

Reviewers: brecht

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

3 years agoCMake: Disable some features when using MinGW and full cmake config
Sergey Sharybin [Sat, 26 Dec 2015 15:07:40 +0000 (20:07 +0500)]
CMake: Disable some features when using MinGW and full cmake config

3 years agoCMake: Fix errors building by MinGW
Sergey Sharybin [Sat, 26 Dec 2015 15:01:17 +0000 (20:01 +0500)]
CMake: Fix errors building by MinGW

Some libraries are nto updated for MinGW hence build system
needs some exceptions for this compiler.

3 years agoSupport custom project names
Julian Eisel [Sat, 26 Dec 2015 09:36:38 +0000 (20:36 +1100)]
Support custom project names

3 years agoBMesh: add checks for duplicates in a face
Campbell Barton [Sat, 26 Dec 2015 03:49:07 +0000 (14:49 +1100)]
BMesh: add checks for duplicates in a face

These could go un-noticed, causing errors later on.

3 years agoBMesh: check at least 2 edges in each loops vert
Campbell Barton [Sat, 26 Dec 2015 03:26:30 +0000 (14:26 +1100)]
BMesh: check at least 2 edges in each loops vert

Also no need to check twice

3 years agoCleanup
Campbell Barton [Sat, 26 Dec 2015 04:32:37 +0000 (15:32 +1100)]
Cleanup

3 years agoMinor cleanup.
Bastien Montagne [Fri, 25 Dec 2015 14:53:18 +0000 (15:53 +0100)]
Minor cleanup.

3 years agoMOD_UVWarp: switch from OMP to BLI_task.
Bastien Montagne [Fri, 25 Dec 2015 14:52:14 +0000 (15:52 +0100)]
MOD_UVWarp: switch from OMP to BLI_task.

Usual 10%-15% speedup. Note that here OMP was rather erratic, with typical
timing about 10% slower than BLI_task, but having some 'burnouts' (~10% of times)
were it would be over ten times slower than usual... BLI_task looks much more stable.

3 years agoCleanup: SubsurfaceScatteringNode is a subclass of BsdfNode, no need to set the value...
Thomas Dinges [Fri, 25 Dec 2015 10:57:37 +0000 (11:57 +0100)]
Cleanup: SubsurfaceScatteringNode is a subclass of BsdfNode, no need to set the value again.

3 years agoFix (unreported) do not show 'appearances' options tool panel in ParticleEdit mode...
Bastien Montagne [Thu, 24 Dec 2015 17:53:18 +0000 (18:53 +0100)]
Fix (unreported) do not show 'appearances' options tool panel in ParticleEdit mode (not supported).

3 years agoCleanup: use enum for bmesh_elem_check
Campbell Barton [Thu, 24 Dec 2015 15:08:01 +0000 (02:08 +1100)]
Cleanup: use enum for bmesh_elem_check

3 years agoBMesh: remove doubles fix/optimization
Campbell Barton [Thu, 24 Dec 2015 09:16:41 +0000 (20:16 +1100)]
BMesh: remove doubles fix/optimization

Changes to remove doubles face creation,
Recent change to remove doubles broke when the new faces already existed (rare occurrence),
however theres no point to return an existing double face.

Now check if the face exists before creating it.

Other changes:

- avoid 2x hash lookups on all mapped verts.
- fill in the vert array instead of calculating from edges.
- remove inefficient search of entire edge-array before adding to it.
  (flag verts to ensure they're not used multiple times).
- move logic for transfusing edge-flags to edge creation.

3 years agoBMesh: BM_verts_from_edges utility function
Campbell Barton [Thu, 24 Dec 2015 08:51:41 +0000 (19:51 +1100)]
BMesh: BM_verts_from_edges utility function

3 years agoAdd STACK_CLEAR macro
Campbell Barton [Thu, 24 Dec 2015 08:48:18 +0000 (19:48 +1100)]
Add STACK_CLEAR macro

3 years agoCycles: Fix Tile access in the TileManager for viewport rendering
Lukas Stockner [Wed, 23 Dec 2015 23:29:40 +0000 (00:29 +0100)]
Cycles: Fix Tile access in the TileManager for viewport rendering

- When rendering in the Viewport, next_tile is sometimes called after a reset has been performed, but before
  new tiles were generated. In that case, the tile list would be invalid, causing Blender to crash randomly.
- When generating new tiles, the TileManager would not clear the tile lists before re-generating them, leading
  to some tiles being skipped during viewport rendering.
- When popping the next tile from a tile list, a reference to the just-deleted object would be returned, now the
  object is copied before deleting it.

3 years agoCycles: Implement constant fold for the ConvertNode.
Thomas Dinges [Wed, 23 Dec 2015 20:41:59 +0000 (21:41 +0100)]
Cycles: Implement constant fold for the ConvertNode.

This way socket type conversions (such as color to float, or float to vector) do not stop the folding process.
Example: http://www.pasteall.org/pic/show.php?id=96803 (selected nodes are folded).

3 years agoFix a few warnings with Apple LLVM 7.0.2.
Brecht Van Lommel [Wed, 23 Dec 2015 19:39:03 +0000 (20:39 +0100)]
Fix a few warnings with Apple LLVM 7.0.2.

3 years agoFix T47051: cycles viewport textured shadeless draw bug.
Brecht Van Lommel [Wed, 23 Dec 2015 19:38:58 +0000 (20:38 +0100)]
Fix T47051: cycles viewport textured shadeless draw bug.

3 years agoUpdate Link to the Blender Store.
Thomas Dinges [Wed, 23 Dec 2015 16:53:12 +0000 (17:53 +0100)]
Update Link to the Blender Store.

3 years agoFix weld edges into faces splicing verts that shared a face
Campbell Barton [Wed, 23 Dec 2015 16:28:35 +0000 (03:28 +1100)]
Fix weld edges into faces splicing verts that shared a face

This could happen with degenerate faces.

3 years agoFix weld edges into faces - eternal loop
Campbell Barton [Wed, 23 Dec 2015 16:26:32 +0000 (03:26 +1100)]
Fix weld edges into faces - eternal loop

Would happen with complex edge-nets mixed with faces.

3 years agoRemove BLI_buffer calloc option
Campbell Barton [Wed, 23 Dec 2015 14:52:54 +0000 (01:52 +1100)]
Remove BLI_buffer calloc option

This wasn't working reliably (after clear for example), and wasn't used anywhere.

3 years agoFix BLI_buffer_reinit not clearing static flag
Campbell Barton [Wed, 23 Dec 2015 14:51:45 +0000 (01:51 +1100)]
Fix BLI_buffer_reinit not clearing static flag

3 years agoFix error in BLI_buffer_reinit
Campbell Barton [Wed, 23 Dec 2015 14:36:20 +0000 (01:36 +1100)]
Fix error in BLI_buffer_reinit

alloc_size was set incorrectly causing arrays not to be resized correctly.

3 years agoCycles: Sort tiles in rendering order at construction time
Lukas Stockner [Tue, 22 Dec 2015 11:51:27 +0000 (12:51 +0100)]
Cycles: Sort tiles in rendering order at construction time

This commit modifies the TileManager to sort render tiles once after tiling the image,
instead of searching the next tile every time a new tile is acquired by a device.

This makes acquiring a tile run in constant time, therefore the render time is linear
w.r.t. the amount of tiles, instead of the quadratic dependency before.

Furthermore, each (logical) device now has its own Tile list, which makes acquiring
a tile for a specific device easier.
Also, some code in the TileManager was deduplicated.

Reviewers: dingto, sergey

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

3 years agoFix bevel RNA enum/boolean mixup
Campbell Barton [Wed, 23 Dec 2015 11:37:24 +0000 (22:37 +1100)]
Fix bevel RNA enum/boolean mixup

3 years agoMath Lib: clamp closest_to_line_segment_v# when segment has no length
Campbell Barton [Wed, 23 Dec 2015 11:05:36 +0000 (22:05 +1100)]
Math Lib: clamp closest_to_line_segment_v# when segment has no length

For a line this makes sense but segments should clamp,
avoids assert in edge-rip.

3 years agoFix issue w/ transform orientation & vert selection
Campbell Barton [Wed, 23 Dec 2015 10:31:22 +0000 (21:31 +1100)]
Fix issue w/ transform orientation & vert selection

Accessing selected verts as an array failed when only
some of the selected verts were in the selection-history.

3 years agoRemove feof check for file reading
Campbell Barton [Wed, 23 Dec 2015 06:45:46 +0000 (17:45 +1100)]
Remove feof check for file reading

This wasnt correct since we're not reading past the stream,
though it worked on Linux and some Windows systems.

3 years agoDisable calculating manipulator while transforming
Campbell Barton [Wed, 23 Dec 2015 05:35:13 +0000 (16:35 +1100)]
Disable calculating manipulator while transforming

Gives ~10% speedup

3 years agoAdd BM_vert_edge_pair utility function
Campbell Barton [Wed, 23 Dec 2015 05:07:48 +0000 (16:07 +1100)]
Add BM_vert_edge_pair utility function

3 years agoFix error in BM_vert_is_edge_pair
Campbell Barton [Wed, 23 Dec 2015 04:50:50 +0000 (15:50 +1100)]
Fix error in BM_vert_is_edge_pair

Returned true for verts with a single edge.

3 years agoTypo in last commit
Campbell Barton [Wed, 23 Dec 2015 04:11:54 +0000 (15:11 +1100)]
Typo in last commit

3 years agoSelect Linked: only use seam delimit for faces
Campbell Barton [Wed, 23 Dec 2015 03:54:26 +0000 (14:54 +1100)]
Select Linked: only use seam delimit for faces

Delimiting on seams was only ever intended for face selection,
Previously this option didn't work for vertices,
now it's fixed the defaults aren't right for vertex/edge select-linked.

Add a workaround that bypasses operator-defaults - since this is such a rare case.

3 years agoFix T47003: OpenGL draw missing selection highlight when using hidden wire.
Brecht Van Lommel [Tue, 22 Dec 2015 19:55:18 +0000 (20:55 +0100)]
Fix T47003: OpenGL draw missing selection highlight when using hidden wire.

3 years agoGet rid of OMP in MOD_build.
Bastien Montagne [Tue, 22 Dec 2015 16:08:52 +0000 (17:08 +0100)]
Get rid of OMP in MOD_build.

Reasons:
  - Only parallelized piece of code gives little local speedup (code block only about 25% quicker even on 1M polys cube).
  - No gain nor loss using new BLI_task system.
  - At 10% of build, parallelized piece of code is only about 5% of total func runtime (run-time explodes as build proportion increases).

See no point in adding (in utmost best optimistic case, in real use-case, when  depsgraph will likely already fire several evaluations in parallel,
speedup would be even smaller) 1% speedup here at the cost of threading complexity...

Note that since later code uses hashes, I don't think it's easy to thread it, so think we can leave with it for now.

3 years agoView3D: measure smoothview angle comparing quat angles
Campbell Barton [Tue, 22 Dec 2015 18:09:25 +0000 (05:09 +1100)]
View3D: measure smoothview angle comparing quat angles

Rolling the view registered as no angle-difference.

3 years agoView3D: Rotate around selected support for view-roll
Campbell Barton [Tue, 22 Dec 2015 18:20:39 +0000 (05:20 +1100)]
View3D: Rotate around selected support for view-roll

3 years agoFix T31605: Nupad ignores Rotate around selection
Campbell Barton [Tue, 22 Dec 2015 18:04:52 +0000 (05:04 +1100)]
Fix T31605: Nupad ignores Rotate around selection

Add support for smooth-view orbiting a point besides the view center.

3 years agoFix error orbiting out of camera + orbit-selected
Campbell Barton [Tue, 22 Dec 2015 17:09:15 +0000 (04:09 +1100)]
Fix error orbiting out of camera + orbit-selected

Would use the wrong view center (that wasn't update from the camera).

3 years agoView3D: use c99 compound literals for smoothview params
Campbell Barton [Tue, 22 Dec 2015 15:47:34 +0000 (02:47 +1100)]
View3D: use c99 compound literals for smoothview params

Smooth-view functions took many arguments which were often NULL,
now take struct instead.

3 years agoCleanup: Remove comments, now that we have the dedicated constant fold functions...
Thomas Dinges [Tue, 22 Dec 2015 13:02:57 +0000 (14:02 +0100)]
Cleanup: Remove comments, now that we have the dedicated constant fold functions, it's obvious.

3 years agoCycles: Constant fold for the Gamma Node.
Thomas Dinges [Tue, 22 Dec 2015 12:53:13 +0000 (13:53 +0100)]
Cycles: Constant fold for the Gamma Node.

3 years agoRename mesh operators
Campbell Barton [Tue, 22 Dec 2015 06:12:32 +0000 (17:12 +1100)]
Rename mesh operators

- use 'Intersect' prefix for boolean and regular intersection.
  hints that they use the same basic logic with different modes.
- 'split by edges' while correct - isn't very descriptive.

3 years agoFix bad selection after symmetrize
Campbell Barton [Tue, 22 Dec 2015 05:33:45 +0000 (16:33 +1100)]
Fix bad selection after symmetrize

Weld verts now keeps original faces so callers don't need to keep track of newly created face data.