5 years agoCleanup: harmless mistake in rangetree
Campbell Barton [Sat, 19 Nov 2016 22:11:26 +0000 (09:11 +1100)]
Cleanup: harmless mistake in rangetree

5 years agoGHOST/X11: Incorrect WM_STATE access
Campbell Barton [Sat, 19 Nov 2016 21:58:41 +0000 (08:58 +1100)]
GHOST/X11: Incorrect WM_STATE access

This worked by accident because of struct padding,
treat state as a CARD32 as documented.

Matches wine-x11 usage.

5 years agoFix T50081: Grease pencil parented rotation problem
Antonioya [Sat, 19 Nov 2016 21:41:37 +0000 (22:41 +0100)]
Fix T50081: Grease pencil parented rotation problem

When the parent object matrix change after the layer was parented, the
inverse matrix for strokes must be updated when editing strokes or the
transformations will be wrong.

5 years agoFix T50078: Vertex Groups not copied over when making proxy.
Luca Rood [Sat, 19 Nov 2016 18:18:10 +0000 (19:18 +0100)]
Fix T50078: Vertex Groups not copied over when making proxy.

Reviewers: mont29

Reviewed By: mont29

Differential Revision:

5 years agoFix T49991: reloading librairies doesn't update node groups.
Bastien Montagne [Sat, 19 Nov 2016 11:20:29 +0000 (12:20 +0100)]
Fix T49991: reloading librairies doesn't update node groups.

We need to check node tree links are still valid, after we remapped
some NodeGroup.

Note: In fact, we have to run that for *all* ID types, since nodes may
use any kind of data-block (in theory)... :/

5 years agoFix NodeGroup generic verify function crashing if node's ID pointer is NULL.
Bastien Montagne [Sat, 19 Nov 2016 11:18:32 +0000 (12:18 +0100)]
Fix NodeGroup generic verify function crashing if node's ID pointer is NULL.

Another nice crasher - in this case, we just want to nuke all sockets...

Related to T49991.

5 years agoFix (unreported) nodeRemoveAllSockets() not clearing inputs/outputs sockets lists.
Bastien Montagne [Sat, 19 Nov 2016 11:16:14 +0000 (12:16 +0100)]
Fix (unreported) nodeRemoveAllSockets() not clearing inputs/outputs sockets lists.

Nice crasher (though seems to not be much used so far)!

Related to T49991.

5 years agoFix forward-compat Nodes write code being executed also for undo steps writing.
Bastien Montagne [Fri, 18 Nov 2016 21:41:56 +0000 (22:41 +0100)]
Fix forward-compat Nodes write code being executed also for undo steps writing.

Forward compatibility code should never, ever be run during undo saving.

Note: related to T49991 (but does not fix it either, crash now happens
when doing a real file save...).

5 years agoFix Node space ID remap callback not handling node trees.
Bastien Montagne [Fri, 18 Nov 2016 21:36:52 +0000 (22:36 +0100)]
Fix Node space ID remap callback not handling node trees.

Yep. Kinda ridiculous, but forgot to handle the very node trees
data-blocks in that editor!

Related (but not fixing) to T49991.

5 years agoFix T50071: Radience HDR fomat does not support alpha at all.
Bastien Montagne [Fri, 18 Nov 2016 21:34:04 +0000 (22:34 +0100)]
Fix T50071: Radience HDR fomat does not support alpha at all.

5 years agoFix UV layer bug in object_utils.object_data_add()
Campbell Barton [Fri, 18 Nov 2016 19:57:55 +0000 (06:57 +1100)]
Fix UV layer bug in object_utils.object_data_add()

Adding a torus in edit-mode, with 'Generate UVs'
for example would either create another UV layer with the default name or
switch to the default UV layer name if it exists.

Now use the existing UV layer if present.

5 years agoAdd Torus: avoid excessive attr access
Campbell Barton [Fri, 18 Nov 2016 19:57:13 +0000 (06:57 +1100)]
Add Torus: avoid excessive attr access

5 years agoBMesh: invalid return from BM_mesh_validate
Campbell Barton [Fri, 18 Nov 2016 19:26:25 +0000 (06:26 +1100)]
BMesh: invalid return from BM_mesh_validate

Returned value was always false, even for valid meshes,
note that this is a debug-only function.

Also set internal-tag cleared.

5 years agoMinor debug-report tweak to autosave code.
Bastien Montagne [Fri, 18 Nov 2016 17:46:10 +0000 (18:46 +0100)]
Minor debug-report tweak to autosave code.

Print in cosole a warning when we skip autosave due to runnning modal op.

Related to T49974.

5 years agoCycles: Different noise seed for stereoscopic rendering (Fix #T50024)
Dalai Felinto [Fri, 18 Nov 2016 17:23:45 +0000 (18:23 +0100)]
Cycles: Different noise seed for stereoscopic rendering (Fix #T50024)

Patch by Sergey Sharybin.

5 years agoDepsgraph: Fix residue of debug-only code
Sergey Sharybin [Fri, 18 Nov 2016 16:47:17 +0000 (17:47 +0100)]
Depsgraph: Fix residue of debug-only code

5 years agoFix T50035: Minor interface bug: UV/ImageEditor - Paint Mode - Fill Brush
Bastien Montagne [Fri, 18 Nov 2016 14:49:41 +0000 (15:49 +0100)]
Fix T50035: Minor interface bug: UV/ImageEditor - Paint Mode - Fill Brush

Patch by @LucaRood, added some cleanup of DRAW/FILL conditions in this
code too...

5 years agoFix (unreported) bad handling of brush's fill threshold value.
Bastien Montagne [Fri, 18 Nov 2016 14:32:50 +0000 (15:32 +0100)]
Fix (unreported) bad handling of brush's fill threshold value.

'1' threshold value would only allow to access a third of the basic
'color space' (from black to white, from 0.0 to 1.0 component values),
when you expect it to access the whole range.

Unfortunately, this needs a subversion bump to allow already defined
brushes to keep exact same behavior!

Also, did not change default value (0.2) for new brushes, think here
keeping current one makes more sense.

Thanks to @LucaRood for confirming the issue.

5 years agoFix T50052: bpy.utils.unregister_module doesn't unregister classes of submodules...
Bastien Montagne [Fri, 18 Nov 2016 14:14:22 +0000 (15:14 +0100)]
Fix T50052: bpy.utils.unregister_module doesn't unregister classes of submodules in reload scenario.

reload case would clear TypeMap before unregistering addons, which made
all calls to unregister_module() to do absolutely nothing.

5 years agoFix T50063: Editing driver's expression eliminates "Zero" number
Julian Eisel [Fri, 18 Nov 2016 12:37:04 +0000 (13:37 +0100)]
Fix T50063: Editing driver's expression eliminates "Zero" number

Disables trimming of trailing zeros in case button contains an expression.

5 years agoImplement multi-view stereo support for image empties
Dalai Felinto [Fri, 18 Nov 2016 11:37:39 +0000 (12:37 +0100)]
Implement multi-view stereo support for image empties

Empty images were implemented to expand (and eventually replace)
the background images functionalities. If we are ever to drop
background images "image empties" should support stereo/multi-view as well.

5 years agoFix potential NULL dereference in mesh sequence cache modifier.
Bastien Montagne [Fri, 18 Nov 2016 11:03:12 +0000 (12:03 +0100)]
Fix potential NULL dereference in mesh sequence cache modifier.

Reported by coverity.

5 years agoFix copy/paste typo in new depsgraph object geometry builder (found by coverity).
Bastien Montagne [Fri, 18 Nov 2016 10:55:28 +0000 (11:55 +0100)]
Fix copy/paste typo in new depsgraph object geometry builder (found by coverity).

5 years agoBMesh: avoid using temp array for face-area
Campbell Barton [Thu, 17 Nov 2016 18:55:37 +0000 (05:55 +1100)]
BMesh: avoid using temp array for face-area

5 years agoBMesh: minor cleanup
Campbell Barton [Tue, 15 Nov 2016 16:22:49 +0000 (03:22 +1100)]
BMesh: minor cleanup

Comment & don't use dummy pointer.

5 years agoCleanup: redundant index loop for monkey-create
Campbell Barton [Thu, 17 Nov 2016 19:08:51 +0000 (06:08 +1100)]
Cleanup: redundant index loop for monkey-create

Also rename face vars (the faces aren't temp),
and quiet old-style-definition warning.

5 years agoDepsgrpah: Fix missing animation update in movie clips
Sergey Sharybin [Thu, 17 Nov 2016 15:37:25 +0000 (16:37 +0100)]
Depsgrpah: Fix missing animation update in movie clips

5 years agoDepsgraph: Move scene builder function to own file
Sergey Sharybin [Thu, 17 Nov 2016 14:38:03 +0000 (15:38 +0100)]
Depsgraph: Move scene builder function to own file

This way it's much easier to grasp what the graph actually contains.

5 years agoFix T50060: New depsgraph does not update mask animation
Sergey Sharybin [Thu, 17 Nov 2016 14:29:22 +0000 (15:29 +0100)]
Fix T50060: New depsgraph does not update mask animation

5 years agoDepsgraph: Use utility macro to iterate over linked list
Sergey Sharybin [Thu, 17 Nov 2016 14:11:55 +0000 (15:11 +0100)]
Depsgraph: Use utility macro to iterate over linked list

This will be compiled into same exact code, just saves us from
doing annoying type casts all over the place.

5 years agoDepsgraph: Move rig builder functions to own files
Sergey Sharybin [Thu, 17 Nov 2016 13:34:46 +0000 (14:34 +0100)]
Depsgraph: Move rig builder functions to own files

Those routines are rather big and started to be annoying to have
one big file.

Should be no functional changes.

5 years ago[MSVC] Preliminary VS2017 support.
lazydodo [Thu, 17 Nov 2016 03:13:58 +0000 (20:13 -0700)]
[MSVC] Preliminary VS2017 support.

5 years agoFix T50001: auto tile size addon broken after Cycles GPU device changes.
Brecht Van Lommel [Thu, 17 Nov 2016 01:16:21 +0000 (02:16 +0100)]
Fix T50001: auto tile size addon broken after Cycles GPU device changes.

Adds a get_num_gpu_devices() utility function for the addon to use.

5 years agoFix T50051: Avoid crash when render grease pencil from VSE
Antonioya [Wed, 16 Nov 2016 20:33:47 +0000 (21:33 +0100)]
Fix T50051: Avoid crash when render grease pencil from VSE

The renderpasses for grease pencil are not necessary when render from

This fix solves the GPF but we need to rethink the complete render
process for grease pencil and integrate better in the render and
composition workflow.

Thanks to Dalai Felinto por helping in the debug and fixing of the

5 years agoCycles: Fix different noise pattern from fix in T49838:
Sergey Sharybin [Wed, 16 Nov 2016 14:12:31 +0000 (15:12 +0100)]
Cycles: Fix different noise pattern from fix in T49838:

No need to hash subframe == 0.

5 years agoFix T50046: Segmentation fault due to out-of-range VertexGroup.weight() call.
Bastien Montagne [Wed, 16 Nov 2016 11:38:57 +0000 (12:38 +0100)]
Fix T50046: Segmentation fault due to out-of-range VertexGroup.weight() call.

`get_vert_def_nr()` was not checking vert index in bmesh case (aka Edit mode).

5 years agoRemove unused vector icons
Martijn Berger [Wed, 16 Nov 2016 09:03:11 +0000 (10:03 +0100)]
Remove unused vector icons

it seems to me the icons are unused:


Since their code contains immediate mode GL calls and they seem to be unused i thought we could remove them.

Reviewers: mont29

Reviewed By: mont29

Subscribers: merwin

Tags: #bf_blender_2.8

Differential Revision:

5 years agoFix custom props not being handled correctly by manual/pyref UI menu entries.
Bastien Montagne [Wed, 16 Nov 2016 10:07:07 +0000 (11:07 +0100)]
Fix custom props not being handled correctly by manual/pyref UI menu entries.

5 years agoDisable possibility to flip bone names of linked armatures
Sergey Sharybin [Wed, 16 Nov 2016 09:39:41 +0000 (10:39 +0100)]
Disable possibility to flip bone names of linked armatures

Linked data should not be modified in such a way.

Reported by Nathan here in the studio, reviewed by Bastien, thanks!

5 years agoCleanup: Remove unused function
Sergey Sharybin [Wed, 16 Nov 2016 09:09:43 +0000 (10:09 +0100)]
Cleanup: Remove unused function

5 years agoFix T50026: "Only Insert Needed" doesn't work when using Trackball rotation
Joshua Leung [Tue, 15 Nov 2016 22:14:38 +0000 (11:14 +1300)]
Fix T50026: "Only Insert Needed" doesn't work when using Trackball rotation

The rotation case here only covered rotation by the "Rotate" tool, but skipped
the "Trackball" tool.

5 years agoFix T50023: Inverse Kinematics angle limits defaulting to 10313.2403124°
Joshua Leung [Tue, 15 Nov 2016 22:09:02 +0000 (11:09 +1300)]
Fix T50023: Inverse Kinematics angle limits defaulting to 10313.2403124°

Regression from 2.77a. The units for the min/max limits were changed in RNA
but the pose channels were still being initialised with in degrees.

5 years agoFIX T49899: Add EIGEN_MAKE_ALIGNED_OPERATOR_NEW to classes that use eigen's data...
lazydodo [Tue, 15 Nov 2016 20:21:01 +0000 (13:21 -0700)]
FIX T49899: Add EIGEN_MAKE_ALIGNED_OPERATOR_NEW to classes that use eigen's data types , to force aligned on 16 byte boundaries.

5 years agoRNA Main API: set remove's do_unlink default value to true.
Bastien Montagne [Tue, 15 Nov 2016 16:12:18 +0000 (17:12 +0100)]
RNA Main API: set remove's do_unlink default value to true.

On second and third thoughts, this should have been done that way since
the begining, cases were you just delete a few data-blocks without any
serious knowledge of their usages are much, much more frequent than
cases where you are deleting thousands of data-blocks and are sure they
are not used anywhere anymore...

Own fault, but really frustrated that this topic was only raised the day
after 2.78a was released. :(

5 years agoGet rid of 'drivers unlinking' code in `BKE_libblock_free_data()`
Bastien Montagne [Tue, 15 Nov 2016 15:36:47 +0000 (16:36 +0100)]
Get rid of 'drivers unlinking' code in `BKE_libblock_free_data()`

This has nothing to do here (freeing is not unlinking/remapping!), and
was actually redoing something already taken care of by
`BKE_libblock_relink_ex()` call in `BKE_libblock_free_ex()`.

Also, gives some noticeable speedup when removing datablocks with
do_unlink=True, about 5 to 10% quicker e.g. when deleting all objects
from a py console, in a big production file...

5 years agoDepsgraph: Fix frash with iTaSC solver
Sergey Sharybin [Tue, 15 Nov 2016 15:18:59 +0000 (16:18 +0100)]
Depsgraph: Fix frash with iTaSC solver

This commit reverts part of a fix for T33275, but things are:

- I can not reproduce the original issue at all, so doesn't seem to
  cause any regressions.

- It is really bad idea to do delayed initialization in the threaded
  environment, it's a straight way to some nasty issues.

- We can't do things like this anyway because we go more granular,
  meaning such a delayed initialization will fail in the case of
  having several IK solvers (unless they properly accommodate to
  changed bone head).

- Verified the fix with various files from Mango project and all of
  them seems to work nice with new depednency graph now (old depsgraph
  has some flickering, but it's not related on DEG itself, but on
  an environment with lots of proxies and threaded evaluation and it
  is not a new behavior).

5 years agoRevert "Proxy: Construct pchan hash when syncing armature proxy"
Sergey Sharybin [Tue, 15 Nov 2016 15:13:24 +0000 (16:13 +0100)]
Revert "Proxy: Construct pchan hash when syncing armature proxy"

This reverts commit 9b5a32cbfb8a8565202bdccd232c53f98b62eeec.

Apparently it is possible to have other thread mocking around with the hash.

Needs deeper investigation, for the time being reverting to prevent crashes.

5 years agoFix menu inconsistencies
Aaron Carlisle [Tue, 15 Nov 2016 14:55:54 +0000 (15:55 +0100)]
Fix menu inconsistencies

This commit fixes two issues:

- UV/Image editor uvs menu did not match the 3D View's which was changed in rB2b240b043078
- Circle select tool was missing in particle edit mode

Reviewers: Severin
Differential Revision:

5 years agoCleanup: More explicit parentheses
Sergey Sharybin [Tue, 15 Nov 2016 15:01:21 +0000 (16:01 +0100)]
Cleanup: More explicit parentheses

5 years agoAvoid interface ID remapping when freeing the whole database
Sergey Sharybin [Tue, 15 Nov 2016 14:46:52 +0000 (15:46 +0100)]
Avoid interface ID remapping when freeing the whole database

This makes heavy scenes to be freed almost instantly (so now
quadbot scene takes only 0.06sec to free),

5 years agoAvoid driver target remapping when freeing the whole database
Sergey Sharybin [Tue, 15 Nov 2016 14:38:03 +0000 (15:38 +0100)]
Avoid driver target remapping when freeing the whole database

Added BKE_libblock_free_data_ex() which takes special do_id_user
argument which basically indicates whether main database was already
taken care about not having "dead" pointers.

Gives about 40% speedup of main database free with quadbot scene
(3.4sec vs. 5.4 sec on quite powerful desktop).

5 years agoFix T50022: "Mirror" in Dopesheet Crashes Blender
Julian Eisel [Tue, 15 Nov 2016 14:27:22 +0000 (15:27 +0100)]
Fix T50022: "Mirror" in Dopesheet Crashes Blender

Just fixing crash itself. Actually operator shouldn't run in most editors (not in dopesheet either I guess), but don't want to spend time on that right now.

5 years agoImplement grouped undo option for operators
Dalai Felinto [Tue, 15 Nov 2016 10:50:11 +0000 (11:50 +0100)]
Implement grouped undo option for operators

This option makes an operator to not push a task to the undo stack if the previous stored elemen is the same operator or part of the same undo group.

The main usage is for animation, so you can change frames to inspect the
poses, and revert the previous pose without having to roll back tons of
"change frame" operator, or even see the undo stack full.

This complements rB13ee9b8e
Design with help by Sergey Sharybin.

Reviewers: sergey, mont29

Reviewed By: mont29, sergey

Subscribers: pyc0d3r, hjalti, Severin, lowercase, brecht, monio, aligorith, hadrien, jbakker

Differential Revision:

5 years agoDepsgraph: Fix typo in previous optimization commit
Sergey Sharybin [Tue, 15 Nov 2016 10:30:21 +0000 (11:30 +0100)]
Depsgraph: Fix typo in previous optimization commit

Was a residue from another experiment, caused infinite loop when
reporting dependency cycles.

5 years agoAtomics: Add some extra utility functions
Sergey Sharybin [Tue, 15 Nov 2016 12:41:08 +0000 (13:41 +0100)]
Atomics: Add some extra utility functions

Also fixed semantic of fetch-and-add in assembler implementation,
it seemed to not match the naming.

5 years agoAtomics: Make naming more obvious about which value is being returned
Sergey Sharybin [Tue, 15 Nov 2016 11:16:26 +0000 (12:16 +0100)]
Atomics: Make naming more obvious about which value is being returned

5 years agoBMesh: remove redundant link-list manipulation
Campbell Barton [Tue, 15 Nov 2016 01:39:33 +0000 (12:39 +1100)]
BMesh: remove redundant link-list manipulation

No need to track previous edge in vert-separate cleanup

5 years agoBMesh: match BM_vert_find_first_loop with iterator logic
Campbell Barton [Mon, 14 Nov 2016 20:55:55 +0000 (07:55 +1100)]
BMesh: match BM_vert_find_first_loop with iterator logic

Use changes from previous commit for BM_vert_find_first_loop.

5 years agoBMesh: avoid extra calls per faces-of-vert iterator
Campbell Barton [Mon, 14 Nov 2016 20:30:36 +0000 (07:30 +1100)]
BMesh: avoid extra calls per faces-of-vert iterator

- `bmesh_radial_faceloop_find_first` & `bmesh_disk_faceedge_find_first`
  can be replaced with a single call to a new function:

- `bmesh_disk_faceedge_find_first` called `bmesh_radial_facevert_check`
  which isn't needed, since either the current or next loop in the
  cycle is attached to the edge we're looking for.

5 years agoBMesh: use const for BM_vert_face_check
Campbell Barton [Mon, 14 Nov 2016 20:30:18 +0000 (07:30 +1100)]
BMesh: use const for BM_vert_face_check

5 years agoBMesh: minor improvement to BM_vert_face_check
Campbell Barton [Mon, 14 Nov 2016 19:50:33 +0000 (06:50 +1100)]
BMesh: minor improvement to BM_vert_face_check

No need to perform edge-of-vert then loop-of-edge check.

Any vertex that has an edge with a face will be connected to a face.

5 years agoBMesh: fix edge-rotate with w/ flipped faces
Campbell Barton [Mon, 14 Nov 2016 16:57:44 +0000 (03:57 +1100)]
BMesh: fix edge-rotate with w/ flipped faces

Edge-rotate would randomly flip one of the faces to match the other.

Also maintain active-face when rotating the edge.

5 years agoBMesh: fix edge-rotation selection state bug
Campbell Barton [Mon, 14 Nov 2016 16:26:19 +0000 (03:26 +1100)]
BMesh: fix edge-rotation selection state bug

Failed edge rotation could leave unselected edge between selected faces,
also report warning when edges fail to be rotated.

5 years agoBMesh: replace iterator with BM_face_vert_share_loop
Campbell Barton [Mon, 14 Nov 2016 15:41:23 +0000 (02:41 +1100)]
BMesh: replace iterator with BM_face_vert_share_loop

5 years agoBMesh: remove redundant argument
Campbell Barton [Mon, 14 Nov 2016 03:21:15 +0000 (14:21 +1100)]
BMesh: remove redundant argument

5 years agoCycles: De-duplicate image loading functions
Sergey Sharybin [Mon, 14 Nov 2016 13:03:17 +0000 (14:03 +0100)]
Cycles: De-duplicate image loading functions

The code was templated already, so don't see big reason to have
3 versions of templated functions. It was giving some extra code
to maintain and in fact already had divergency for support of huge
image resolution (missing size_t cast in byte image loading).

There should be no changes visible by artists.

5 years agointsall_deps / OSL use c++11 ABI when install_deps is asking for c++11
Martijn Berger [Mon, 14 Nov 2016 08:59:30 +0000 (09:59 +0100)]
intsall_deps / OSL use c++11 ABI when install_deps is asking for c++11

5 years agoBMesh: BM_face_exists no longer uses return arg
Campbell Barton [Sun, 13 Nov 2016 17:10:47 +0000 (04:10 +1100)]
BMesh: BM_face_exists no longer uses return arg

Just return the face or NULL, like BM_edge_exists(),
Also for BM_face_exists_overlap & bm_face_exists_tri_from_loop_vert.
No functional changes.

Old code did some partial overlap checks where this made some sense,
but it's since been removed.

5 years agoFix T50013: Blender 2.78a Link/Append Crash.
Bastien Montagne [Sun, 13 Nov 2016 14:49:41 +0000 (15:49 +0100)]
Fix T50013: Blender 2.78a Link/Append Crash.

Object freeing may in some kind access its obdata (in case it has some
caches e.g.), since here obdata may have already been freed, let's set
object's data pointer to NULL (probably not ideal solution, but we don't
care much, those form archipelagos of unused linked datablocks,
we nuke'em all anyway).

Also fix stupid mistake in one of own recent commits (using ID we just
freed, tsst...).

5 years agoFix T50007: blender offline python documentation in zipped HTML files, not shown...
Bastien Montagne [Sun, 13 Nov 2016 11:03:28 +0000 (12:03 +0100)]
Fix T50007: blender offline python documentation in zipped HTML files, not shown correctly.

Stupid mistake, os.scandir is not recursive... Patch by @brecht, thanks.

5 years agoFix T49997: don't flip texture users menu in texture properties.
Brecht Van Lommel [Sun, 13 Nov 2016 01:27:45 +0000 (02:27 +0100)]
Fix T49997: don't flip texture users menu in texture properties.

5 years agoFix T50008: camera DOF Distance picking from W key menu not working.
Brecht Van Lommel [Sat, 12 Nov 2016 21:29:49 +0000 (22:29 +0100)]
Fix T50008: camera DOF Distance picking from W key menu not working.

5 years agofix T50004: Removed check for empty mesh and adjusted the vertex import function...
Gaia Clary [Sat, 12 Nov 2016 21:20:07 +0000 (22:20 +0100)]
fix T50004: Removed check for empty mesh and adjusted the vertex import function to accept meshes without vertices as well

5 years agoFix Make Vertex Parent operator missing from vertex/curve/lattice menus.
Geoffroy Krantz [Sat, 12 Nov 2016 17:57:40 +0000 (18:57 +0100)]
Fix Make Vertex Parent operator missing from vertex/curve/lattice menus.

Reviewed By: brecht

Differential Revision:

5 years agoFix T49904: Cycles standalone missing default generated texture coordinates.
Brecht Van Lommel [Sat, 12 Nov 2016 16:21:21 +0000 (17:21 +0100)]
Fix T49904: Cycles standalone missing default generated texture coordinates.

5 years agoFix Cycles OSL compilation based on modified time not working.
Brecht Van Lommel [Sat, 12 Nov 2016 16:20:40 +0000 (17:20 +0100)]
Fix Cycles OSL compilation based on modified time not working.

5 years agoFix Cycles standalone not finding CPU device after recent changes.
Brecht Van Lommel [Sat, 12 Nov 2016 14:41:42 +0000 (15:41 +0100)]
Fix Cycles standalone not finding CPU device after recent changes.

5 years agoFix T49985: cycles standalone XML missing distant lights.
Brecht Van Lommel [Sat, 12 Nov 2016 14:26:51 +0000 (15:26 +0100)]
Fix T49985: cycles standalone XML missing distant lights.

5 years agoFix T49985: cycles standalone using wrong socket names for XML reading.
Brecht Van Lommel [Sat, 12 Nov 2016 14:26:24 +0000 (15:26 +0100)]
Fix T49985: cycles standalone using wrong socket names for XML reading.

5 years agoSculpt UI: Make DynTopo constant detail a resolution value
Julian Eisel [Sat, 12 Nov 2016 15:14:09 +0000 (16:14 +0100)]
Sculpt UI: Make DynTopo constant detail a resolution value

This should make it easier to sculpt in high resolutions, downside is that the new way to calculate maximum edge length is a bit less intuitive. Maximum edge length used to be calculated as blender_unit * percentage_value, now it's blender_unit / value.

Reused old DNA struct member, but had to bump subversion to ensure correct compatibility conversion. Also changed default value slightly (would have had to set to 3.333... otherwise).

Was Requested by @monio (see and I think it's worth testing.

5 years agoBMesh: update comments, ifdef'd code
Campbell Barton [Sat, 12 Nov 2016 14:35:22 +0000 (01:35 +1100)]
BMesh: update comments, ifdef'd code

5 years agoBMesh: Minor improvement to face-join
Campbell Barton [Fri, 11 Nov 2016 23:06:53 +0000 (10:06 +1100)]
BMesh: Minor improvement to face-join

Pass in loops instead of edge & faces.
Nearly all callers have the loop-pairs to pass in.

5 years agoFix renaming error in last commit
Campbell Barton [Fri, 11 Nov 2016 23:29:38 +0000 (10:29 +1100)]
Fix renaming error in last commit

5 years agoBKE_library_make_local(): some minor improvements.
Bastien Montagne [Fri, 11 Nov 2016 22:15:55 +0000 (23:15 +0100)]
BKE_library_make_local(): some minor improvements.

Do not set 'real user' to groups every time we run the first clearing loop.

And do fully clear properly LIB_TAG_DOIT (this is not yet enforced in
existing code, but would love to get to that stage in future, so let's
do it at least with new code!).

5 years agoMinor naming cleanup.
Bastien Montagne [Fri, 11 Nov 2016 21:56:47 +0000 (22:56 +0100)]
Minor naming cleanup.

5 years agoEnhance BKE_library_make_local() to make it much quicker in complex cases.
Bastien Montagne [Fri, 11 Nov 2016 21:29:54 +0000 (22:29 +0100)]
Enhance BKE_library_make_local() to make it much quicker in complex cases.

Basic idea is to split first loop in two, and run checks before making
anything actually local, to detect data-blocks that we can directly make
local (because we are sure they are only used by already/future local

This allows to avoid a lot of overhead in later 'cleanup' steps of this
function, here with barbershop shot it's four times quicker (from 190s to 48s).

We are still far from the instantaneous results of MakeLocal in 2.77,
but in that version main characters lose their connection to their
armature and remain static after makelocal, so guess new code is still
better. ;)

There are probably more optimizations possible here, but would rather
polish this area of code once we get rid of proxies, those really
make it a nightmare to work on.

5 years agoMinor optimization to BKE_library_tag_unused_linked_data().
Bastien Montagne [Fri, 11 Nov 2016 18:32:59 +0000 (19:32 +0100)]
Minor optimization to BKE_library_tag_unused_linked_data().

5 years agoSwitch to unsafe but quick freeing of archipelagos of linked data.
Bastien Montagne [Fri, 11 Nov 2016 17:58:00 +0000 (18:58 +0100)]
Switch to unsafe but quick freeing of archipelagos of linked data.

This *should* work, but do not hesitate to revert in case it creates new
crashes in append or makelocal processes.

5 years agoFix T49996: VSE opengl render crash with grease pencil if current frame is empty
Antonioya [Fri, 11 Nov 2016 21:27:10 +0000 (22:27 +0100)]
Fix T49996: VSE  opengl render crash with grease pencil if current frame is empty

If the opengl render with grease pencil is run from VSE with the current
frame outside visible frames, the render pass is wrong and the render
must be canceled because nothing to render. Related to #T49975

5 years agoGPencil: Create brush set when create new datablock or layer
Antonioya [Fri, 11 Nov 2016 19:04:30 +0000 (20:04 +0100)]
GPencil: Create brush set when create new datablock or layer

Before this commit, the brush set was created with the first stroke
drawing, but if the user creates the datablock or the layer manually
(not drawing) the brush list was empty.

This commit complement the python fix by Sergey:

5 years agoFix crash happening in some cases with MakeLocal operator.
Bastien Montagne [Fri, 11 Nov 2016 17:05:01 +0000 (18:05 +0100)]
Fix crash happening in some cases with MakeLocal operator.

Culprit here was once more proxies. Think what was happening here was:
1) Both proxy and proxified armatures' PoseChannels were cleared
   (needed after remapping due to Bone pointers being stored in pchans).
2) Proxy PoseChannels got rebuilt in `BKE_pose_rebuild_ex()`, which ends,
   in proxy cases, by actually replacing rebuilt pchans by those from
   the proxified object... which has not yet been rebuilt.

Fixed the issue by merely adding bone pointer to data copied from
original pchan into new 'from proxy' one... Sounds much, much safer and
sanier anyway, that way we can be sure bone pointer is actually pointing
to a bone of the object's armature (this is supposed to be the same
Armature datablock between proxy and proxified objects, but that may not
be always true especially during makelocal process).

5 years agoFix T49994: Setting dupligroup which uses indirect relation will crash
Sergey Sharybin [Fri, 11 Nov 2016 15:15:34 +0000 (16:15 +0100)]
Fix T49994: Setting dupligroup which uses indirect relation will crash

Did similar trick to old dependency graph: tag invisible relations for update.

Might need some re-consideration, see the comment.

This should solve our issues with powerlib addon here in the studio.

5 years agoDepsgraph: Add missing NULL pointer check
Sergey Sharybin [Fri, 11 Nov 2016 14:28:34 +0000 (15:28 +0100)]
Depsgraph: Add missing NULL pointer check

5 years agoDepsgraph: Fix missing DONE flag in relations builder
Sergey Sharybin [Fri, 11 Nov 2016 14:20:17 +0000 (15:20 +0100)]
Depsgraph: Fix missing DONE flag in relations builder

Was causing relations be build twice in certain cases.

5 years agoFix T49993: Indirectly used taper/bevel crashes new dependency graph
Sergey Sharybin [Fri, 11 Nov 2016 13:46:19 +0000 (14:46 +0100)]
Fix T49993: Indirectly used taper/bevel crashes new dependency graph

New dependency graph expects strict separation between nodes and relations builder,
meaning, if we try to create relation with an object which is not in the graph yet
we'll have an error in depsgraph.

Now, so far object nodes were created from bases of the current scene, which caused
missing objects in graph in certain cases.

Didn't find better approach than to simply ensure object nodes exists when we know
they'll be used by relation builder.

5 years agoDepsgraph: Fix typo in text on curve relation builder
Sergey Sharybin [Fri, 11 Nov 2016 13:41:02 +0000 (14:41 +0100)]
Depsgraph: Fix typo in text on curve relation builder

5 years agoDepsgraph: Fix missing ID node tag
Sergey Sharybin [Fri, 11 Nov 2016 13:25:26 +0000 (14:25 +0100)]
Depsgraph: Fix missing ID node tag

Might have caused nodes created multiple times for the same object.

5 years agoDepsgraph: Add some data builder logic to corresponding function
Sergey Sharybin [Fri, 11 Nov 2016 13:24:47 +0000 (14:24 +0100)]
Depsgraph: Add some data builder logic to corresponding function

5 years agoGrease Pencil: Fix python errors opening N panel -> GP with empty VSE
Sergey Sharybin [Fri, 11 Nov 2016 13:04:04 +0000 (14:04 +0100)]
Grease Pencil: Fix python errors opening N panel -> GP with empty VSE

Solves errors, but not sure interface is indeed what users will expect.

Will ask GP team to check on this.

5 years agoDepsgraph: cleanup, no functional changes
Sergey Sharybin [Fri, 11 Nov 2016 12:52:22 +0000 (13:52 +0100)]
Depsgraph: cleanup, no functional changes