5 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:

5 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

5 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.

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

5 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.

5 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

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

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

5 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.

5 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.

5 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).

5 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

5 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.

5 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

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

5 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.

5 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: (selected nodes are folded).

5 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.

5 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.

5 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.

5 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.

5 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.

5 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.

5 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

5 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.

5 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:

5 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

5 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.

5 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.

5 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.

5 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

5 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

5 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.

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

5 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.

5 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.

5 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.

  - 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.

5 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.

5 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

5 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.

5 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).

5 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.

5 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.

5 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.

5 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.

5 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.

5 years agoBMesh: store stackdepth as an index
Campbell Barton [Tue, 22 Dec 2015 04:57:45 +0000 (15:57 +1100)]
BMesh: store stackdepth as an index

Avoids -1 all over.

5 years agoCycles-Bake: Fix Uninitialised value created by a heap allocation
Dalai Felinto [Mon, 21 Dec 2015 17:31:13 +0000 (15:31 -0200)]
Cycles-Bake: Fix Uninitialised value created by a heap allocation

This was causing some random black bakes. It was introduced in of of the commits replacing calloc by malloc. Things should be better now.

This error was only noticeable when baking the selected objects (not when baking from selected to active).

5 years agoUI: fix minor glitch copying small float value
Campbell Barton [Mon, 21 Dec 2015 08:26:15 +0000 (19:26 +1100)]
UI: fix minor glitch copying small float value

Would copy 0.0 when button displayed 0.0000001.

5 years agoBLI_storage: Split text/binary version of mem-from-file funcs
Campbell Barton [Mon, 21 Dec 2015 07:16:14 +0000 (18:16 +1100)]
BLI_storage: Split text/binary version of mem-from-file funcs

Fix T47022, caused by own commit de0119d08

5 years agoCMake: disable warning 4146
Campbell Barton [Mon, 21 Dec 2015 03:54:36 +0000 (14:54 +1100)]
CMake: disable warning 4146

This is warning on noisy (false positives).

5 years agoFix T47023: Boolean w/ empty mesh didn't transform
Campbell Barton [Mon, 21 Dec 2015 03:37:42 +0000 (14:37 +1100)]
Fix T47023: Boolean w/ empty mesh didn't transform

5 years agoCleanup: remove unused file
Campbell Barton [Mon, 21 Dec 2015 02:13:52 +0000 (13:13 +1100)]
Cleanup: remove unused file

5 years agoCleanup: warnings (msvc)
Campbell Barton [Mon, 21 Dec 2015 02:00:06 +0000 (13:00 +1100)]
Cleanup: warnings (msvc)

Part of patch D1670 by @LazyDodo

5 years agoNewDepsgraph: Fix typo tagging wrong flag.
Bastien Montagne [Sun, 20 Dec 2015 22:06:18 +0000 (23:06 +0100)]
NewDepsgraph: Fix typo tagging wrong flag.

Tagging NodeTree->flag instead of NodeTree->id.flag, not sure if this fixes something, but...

5 years agoCleanup: invalid comment & style
Campbell Barton [Sun, 20 Dec 2015 13:10:50 +0000 (00:10 +1100)]
Cleanup: invalid comment & style

5 years agoBuildbot: Cleanup unused code
Sergey Sharybin [Sun, 20 Dec 2015 10:44:53 +0000 (15:44 +0500)]
Buildbot: Cleanup unused code

- Remove deprecated/unused builders
- Remove unused SCons OSX slave configuration
- Remove SCons slave logic, it is not giving error about unknown building
  system used for the slave.

5 years agoBuildbot: Make sure optiosn override are passed after the config file
Sergey Sharybin [Sun, 20 Dec 2015 10:32:59 +0000 (15:32 +0500)]
Buildbot: Make sure optiosn override are passed after the config file

5 years agoBuildbot: Disable CUDA binaries for 32bit OSX slave
Sergey Sharybin [Sun, 20 Dec 2015 10:19:02 +0000 (15:19 +0500)]
Buildbot: Disable CUDA binaries for 32bit OSX slave

Funny thing, 32bit OSX slave was always building 64bit CUDA kernels
and nobody never noticed this..

5 years agoBuildbot: Update master config file
Sergey Sharybin [Sun, 20 Dec 2015 09:49:54 +0000 (14:49 +0500)]
Buildbot: Update master config file

5 years agoBuildbot: Disable some unsupported features for 32bit OSX CMake slave
Sergey Sharybin [Sun, 20 Dec 2015 09:22:34 +0000 (14:22 +0500)]
Buildbot: Disable some unsupported features for 32bit OSX CMake slave

5 years agoBuildbot: Fix wrong architecture passed to CMake
Sergey Sharybin [Sun, 20 Dec 2015 09:12:43 +0000 (14:12 +0500)]
Buildbot: Fix wrong architecture passed to CMake

5 years agoBuildbot: Use proper archive name for CMake OSX slave
Sergey Sharybin [Sun, 20 Dec 2015 09:12:04 +0000 (14:12 +0500)]
Buildbot: Use proper archive name for CMake OSX slave

5 years agoBuildbot: initial work to enable CMake OSX slave
Sergey Sharybin [Sun, 20 Dec 2015 08:59:04 +0000 (13:59 +0500)]
Buildbot: initial work to enable CMake OSX slave

5 years agoFix T47016: curve tilt value in N (redo) panel to much precise with mouse dragging.
Bastien Montagne [Sat, 19 Dec 2015 15:58:30 +0000 (16:58 +0100)]
Fix T47016: curve tilt value in N (redo) panel to much precise with mouse dragging.

Let's just use dafaults of angle props here. :)

5 years agoFix shadowing var in own previous commit.
Bastien Montagne [Sat, 19 Dec 2015 10:04:56 +0000 (11:04 +0100)]
Fix shadowing var in own previous commit.

5 years agoBGE: Fix unconverted character max jump value from old files.
Porteries Tristan [Fri, 18 Dec 2015 21:44:19 +0000 (22:44 +0100)]
BGE: Fix unconverted character max jump value from old files.

The bug was introduced in 3dd83b, a little conversion in versioning_270.c
was forgotten. Now max_jumps is set as default to 1.

5 years agoAdd a void 'user_data' memeber to Outliner's callbacks.
Bastien Montagne [Fri, 18 Dec 2015 21:12:32 +0000 (22:12 +0100)]
Add a void 'user_data' memeber to Outliner's callbacks.

This is not used currently, but needed for work done in id-remap branch, and will
greatly reduce diff noise in this area...

5 years agoOpenSubdiv: Avoid having bad-level call
Sergey Sharybin [Fri, 18 Dec 2015 18:16:52 +0000 (23:16 +0500)]
OpenSubdiv: Avoid having bad-level call

This is always asking for problems. Additionally, that call was leading
to OpenGL calls happening from threads.

5 years agoCycles: Log OSL texture system statistics after finishing the render
Sergey Sharybin [Fri, 18 Dec 2015 16:50:10 +0000 (21:50 +0500)]
Cycles: Log OSL texture system statistics after finishing the render

5 years agoCycles: Implement proper texture derivatives evaluation for OSL
Sergey Sharybin [Fri, 18 Dec 2015 16:42:04 +0000 (21:42 +0500)]
Cycles: Implement proper texture derivatives evaluation for OSL

This was an oldie TODO since initial work on newer OSL/OIIO support.
Now we should be ready for the libraries bump.

5 years agoFix T47009: Value typing issue in pie menu.
Bastien Montagne [Fri, 18 Dec 2015 15:32:51 +0000 (16:32 +0100)]
Fix T47009: Value typing issue in pie menu.

When we have an active button in modal state, completely bypass the whole 'pie' handling part of the menu.

Note that behavior is probably still not ideal here (e.g. would be nice to avoid enter/escape to quit
completely the pie menu in that case - but on the other hand Pies were not really designed to handle
that kind of modal stuff either, so think having minimal support for it is enough for now.

5 years agoCleanup: use unpacking generalization
Campbell Barton [Fri, 18 Dec 2015 11:27:03 +0000 (22:27 +1100)]
Cleanup: use unpacking generalization

5 years agoFix T46946: EdgeSlide via G-G disables 'Correct UV'
Campbell Barton [Fri, 18 Dec 2015 07:25:37 +0000 (18:25 +1100)]
Fix T46946: EdgeSlide via G-G disables 'Correct UV'

5 years agoAdd wrap argument to cycle wm utility funcs
Campbell Barton [Fri, 18 Dec 2015 05:17:13 +0000 (16:17 +1100)]
Add wrap argument to cycle wm utility funcs

Now zooming text in the console and text editor isn't wrapping from large/small font size (annoying).

5 years agoFix T46998: Console zoom doesn't update scrollbars
Campbell Barton [Fri, 18 Dec 2015 05:02:31 +0000 (16:02 +1100)]
Fix T46998: Console zoom doesn't update scrollbars

5 years agoFix T46959: sys.meta_path reset on on exit
Campbell Barton [Thu, 17 Dec 2015 16:00:38 +0000 (03:00 +1100)]
Fix T46959: sys.meta_path reset on on exit

5 years agoCleanup: quiet warning
Campbell Barton [Thu, 17 Dec 2015 15:46:08 +0000 (02:46 +1100)]
Cleanup: quiet warning

5 years agoTransform: bend-mouse-input error initializing
Campbell Barton [Thu, 17 Dec 2015 08:45:29 +0000 (19:45 +1100)]
Transform: bend-mouse-input error initializing

Missed from transform-mouse-input changes.

5 years agoBMesh: split-by-edges minor fixes
Campbell Barton [Thu, 17 Dec 2015 07:10:04 +0000 (18:10 +1100)]
BMesh: split-by-edges minor fixes

- select all newly created edges
- remove redundant edges (not essential but nicer output).

5 years agoBMesh: add BM_face_share_vert_check/count
Campbell Barton [Thu, 17 Dec 2015 07:06:05 +0000 (18:06 +1100)]
BMesh: add BM_face_share_vert_check/count

5 years agoBMesh: partial-connection could make duplicate edges
Campbell Barton [Thu, 17 Dec 2015 06:49:56 +0000 (17:49 +1100)]
BMesh: partial-connection could make duplicate edges

Avoiding to make duplicate edges is too involved, do a remove-duplicates pass at the end instead.

5 years agoRevert "3D Cursor: Add option to lock it in place to prevent accidental modification"
Campbell Barton [Thu, 17 Dec 2015 03:54:06 +0000 (14:54 +1100)]
Revert "3D Cursor: Add option to lock it in place to prevent accidental modification"

This reverts commit a791153ca5e6f87d50396e188a3664b579884161.

Rather users get feedback on changing cursor-depth,
instead of preventing 3d-cursor placement entirely.

5 years agoFix particle count being grayed out when emitting from verts, but grid is on.
Eberhard Höpfner [Thu, 17 Dec 2015 00:17:55 +0000 (01:17 +0100)]
Fix particle count being grayed out when emitting from verts, but grid is on.

Differential Revision:

5 years agoBMesh: support connecting single-edge island links
Campbell Barton [Wed, 16 Dec 2015 18:02:39 +0000 (05:02 +1100)]
BMesh: support connecting single-edge island links

Handle these cases by temporarily disconnecting the single links to ensure isolated islands,
then link back up after.

5 years agoBMesh: utility function to split off wire edges
Campbell Barton [Wed, 16 Dec 2015 18:02:14 +0000 (05:02 +1100)]
BMesh: utility function to split off wire edges

5 years agocleanup: C99
Mike Erwin [Wed, 16 Dec 2015 06:24:15 +0000 (01:24 -0500)]
cleanup: C99

- for loop scope
- tighter scope on local vars
- more bool
- more const

5 years agoBGE clean up: use float version of trigonometric functions
Jorge Bernal [Wed, 16 Dec 2015 00:52:30 +0000 (01:52 +0100)]
BGE clean up: use float version of trigonometric functions

5 years agoBGE Ketsji clean-up: double-promotion warnings
Jorge Bernal [Wed, 16 Dec 2015 00:31:38 +0000 (01:31 +0100)]
BGE Ketsji clean-up: double-promotion warnings

5 years agoCycles: Fix wrong assert failure happening after recent de-duplicate
Sergey Sharybin [Tue, 15 Dec 2015 16:01:56 +0000 (21:01 +0500)]
Cycles: Fix wrong assert failure happening after recent de-duplicate

This is actually intended behavior to return NULL when the socket is not
found. It's used in certain BSDF nodes to query whether some inputs exists
or not.

Perhaps we can be more explicit here and have dedicated logic to query
socket existance and keep assert in place.

In any case, even if we lost assert() for the constant fold now it's
still somewhat better than duplicated code. Perhaps.

5 years agoCycles: De-duplicate utility functions in ccl::Graph
Sergey Sharybin [Tue, 15 Dec 2015 15:04:00 +0000 (20:04 +0500)]
Cycles: De-duplicate utility functions in ccl::Graph

5 years agoTemp workaround: Object mode pie glitches since 'Edit Strokes' mode was introduced
Julian Eisel [Tue, 15 Dec 2015 14:29:23 +0000 (15:29 +0100)]
Temp workaround: Object mode pie glitches since 'Edit Strokes' mode was introduced

To ensure all items of a pie are always at the same position, invisible dummy buttons were added for unavailable items. This caused mainly two issues: Command line printed warning because of the > 8 elements, and some modes weren't visible in some cases ('Object Mode' entry was missing in stroke edit mode).
To solve this nicely, we had to support > 8 items per pie. Will look into that this week, but for now, drawing dummy buttons is disabled.

From a user POV this has two ugly consequences: 1. While this temporary workaround is used, *some* pie items are positioned differently than before, 2. The 'Edit Strokes' mode entry might change its position depending on the amount of available modes.

5 years agoTemporary solution for Add/Subtract toggles being meaningless for some GPencil brushes
Joshua Leung [Tue, 15 Dec 2015 13:57:06 +0000 (02:57 +1300)]
Temporary solution for Add/Subtract toggles being meaningless for some GPencil brushes

For now, we just change the labels of these toggles so that it makes sense what
results we should expect from each. A better solution may be to create separate
"direction" props for the different brush types here, so that we can also define
more appropriate tooltips too to go with the labels.

5 years agoCompositor: Expose track velocity via the Track Position node
Sergey Sharybin [Tue, 15 Dec 2015 08:51:09 +0000 (13:51 +0500)]
Compositor: Expose track velocity via the Track Position node

velocity is measured in pixels per frame. It is basically a coordinate
difference of track coordinate at current frame and previous one (no future
prediction happens).

It's not really most intuitive place for such a things, but historically the
node was called this way..

Track velocity could be used to face effects like motion blur bu piping it
to the vector blur node.

Reviewers: campbellbarton

Reviewed By: campbellbarton

Subscribers: hype, sebastian_k

Differential Revision:

5 years agoCorrect own error in knife edge-net cutting
Campbell Barton [Tue, 15 Dec 2015 07:44:21 +0000 (18:44 +1100)]
Correct own error in knife edge-net cutting

Need to ensure no duplicate edges in the array.

5 years agoCleanup: math lib naming
Campbell Barton [Tue, 15 Dec 2015 07:14:22 +0000 (18:14 +1100)]
Cleanup: math lib naming

Distinguish between line / line_segment

5 years agoCleanup: math lib naming
Campbell Barton [Tue, 15 Dec 2015 07:06:24 +0000 (18:06 +1100)]
Cleanup: math lib naming

Rename not-very-descriptive (p1, d) -> (ray_origin, ray_direction)

5 years agoCleanup: consistent naming for closest_to_line api
Campbell Barton [Tue, 15 Dec 2015 06:49:31 +0000 (17:49 +1100)]
Cleanup: consistent naming for closest_to_line api

5 years agoBMesh: split-py-edge now splices verts into edges
Campbell Barton [Tue, 15 Dec 2015 05:08:33 +0000 (16:08 +1100)]
BMesh: split-py-edge now splices verts into edges

Edge chains spanning faces or ending without a connecting edge
are now supported by splicing verts into the face boundaries.

5 years agoFix split-py-edge assuming valid face indices
Campbell Barton [Mon, 14 Dec 2015 05:09:40 +0000 (16:09 +1100)]
Fix split-py-edge assuming valid face indices

Also reduce variable scope