blender.git
4 years agoDopesheet: Keyframe size can be adjusted as part of theme settings
Joshua Leung [Sat, 2 Jul 2016 15:42:28 +0000 (03:42 +1200)]
Dopesheet: Keyframe size can be adjusted as part of theme settings

This commit introduces a scale factor setting for scaling all keyframe indicators
in the Dopesheet Editor up/down, in order to make them easier to select. It is perhaps
most useful for keyframe types which are usually indicated using smaller keyframes
(e.g. breakdown), which may get tricky to quickly select.

4 years agoNLA: Indicate position of action-local markers on strips
Joshua Leung [Tue, 28 Jun 2016 15:16:07 +0000 (03:16 +1200)]
NLA: Indicate position of action-local markers on strips

To make it easier to synchronise timing across multiple strips, if you add
markers locally to an action, these will show up in the NLA strip in the
NLA Editor. These markings can then be used to line up the start/end of
another strip, or even to make sure that the markers from two different
strips end up lining up.

By default, this is turned on, but it can be disabled (via the View menu)
if it adds too much visual noise.

4 years agoFix (unreported) crash when remapping armatures.
Bastien Montagne [Thu, 7 Jul 2016 12:52:39 +0000 (14:52 +0200)]
Fix (unreported) crash when remapping armatures.

Objects' Pose holds references to the armature bones, so we have to force POSE_RECALC in those cases...

4 years agoOutliner: Match search length w/ id name length
Campbell Barton [Thu, 7 Jul 2016 06:36:25 +0000 (16:36 +1000)]
Outliner: Match search length w/ id name length

4 years agowritefile: call undo flush after writing the windowmanager
Campbell Barton [Thu, 7 Jul 2016 06:27:33 +0000 (16:27 +1000)]
writefile: call undo flush after writing the windowmanager

Data here is constantly changing, avoids outliner data being included in those changes for undo.

4 years agoCleanup: move write flush into its own function
Campbell Barton [Thu, 7 Jul 2016 06:02:45 +0000 (16:02 +1000)]
Cleanup: move write flush into its own function

No point passing dummy args to existing function, split out logic instead.

Also add flush after writing mesh data too.

4 years agoFix memory leak switching sculpt mode + dyntopo
Campbell Barton [Thu, 7 Jul 2016 05:48:25 +0000 (15:48 +1000)]
Fix memory leak switching sculpt mode + dyntopo

Auto-enabling dyntopo w/ mode switching leaked memory when undo was used.

4 years agoTransform Snap: fix vert & edit object in ortho view
Germano Cavalcante [Thu, 7 Jul 2016 05:16:27 +0000 (15:16 +1000)]
Transform Snap: fix vert & edit object in ortho view

The callback used in `BLI_bvhtree_find_nearest_to_ray` was wrong and could result in crash.

Also de-duplicate vert/edge logic.

4 years agoFix failing script_load_addons test after recent code cleanup.
Brecht Van Lommel [Wed, 6 Jul 2016 19:43:55 +0000 (21:43 +0200)]
Fix failing script_load_addons test after recent code cleanup.

4 years agoCycles tests: Don't create fail file on idiff warning
Sergey Sharybin [Wed, 6 Jul 2016 15:39:09 +0000 (17:39 +0200)]
Cycles tests: Don't create fail file on idiff warning

4 years agoRevert rB961ebfa8c40b9909 - do not set Main's versions directly in do_versions().
Bastien Montagne [Wed, 6 Jul 2016 15:12:35 +0000 (17:12 +0200)]
Revert rB961ebfa8c40b9909 - do not set Main's versions directly in do_versions().

This breaks any post-versionning (like IPO conversion, python handler, etc.).

rB961ebfa8c40b9909 mentions some Main being do_versionned several times (which is not desired for sure),
will try to reproduce again and find another fix.

4 years agoFix Python API error message (do_unlink, instead of unlink)
Dalai Felinto [Wed, 6 Jul 2016 14:32:46 +0000 (11:32 -0300)]
Fix Python API error message (do_unlink, instead of unlink)

4 years agowritefile: add flushes
Campbell Barton [Wed, 6 Jul 2016 13:27:22 +0000 (23:27 +1000)]
writefile: add flushes

Flush on grease pencil and data with image preview or packed data.

4 years agowritefile: avoid adding SDNA to every undo step
Campbell Barton [Wed, 6 Jul 2016 12:23:50 +0000 (22:23 +1000)]
writefile: avoid adding SDNA to every undo step

Since SDNA was allocated for each undo step,
the new address meant it was considered different and included again.

Add an option not to duplicate the DNA string when calling DNA_sdna_from_data,
as well as avoiding a redundant copy, it writes the same address each time.

4 years agoFix memleak with recent Outliner writefile changes.
Bastien Montagne [Wed, 6 Jul 2016 12:45:06 +0000 (14:45 +0200)]
Fix memleak with recent Outliner writefile changes.

4 years agoCleanup/simplify/fixes BKE_object_is_libdata and BKE_object_obdata_is_libdata.
Bastien Montagne [Wed, 6 Jul 2016 12:37:03 +0000 (14:37 +0200)]
Cleanup/simplify/fixes BKE_object_is_libdata and BKE_object_obdata_is_libdata.

Removed checks for ob->proxy from the equation, you can totally have proxy objects
linked into another .blend file!

4 years agoReplace of (id->lib != NULL) check by meaningful macro.
Bastien Montagne [Wed, 6 Jul 2016 12:11:01 +0000 (14:11 +0200)]
Replace of (id->lib != NULL) check by meaningful macro.

Idea is to replace hard-to-track (id->lib != NULL) 'is linked datablock' check everywhere in Blender
by a macro doing the same thing. This will allow to easily spot those checks in future, and more importantly,
to easily change it (see work done in asset-engine branch).

Note: did not touch to readfile.c, since there most of the time 'id->lib' check actually concerns the pointer,
and not a check whether ID is linked or not. Will have a closer look at it later.

Reviewers: campbellbarton, brecht, sergey

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

4 years agowritefile: simplify outliner treestore workaround
Campbell Barton [Wed, 6 Jul 2016 11:58:47 +0000 (21:58 +1000)]
writefile: simplify outliner treestore workaround

Instead of keeping a list of allocations, write to unique addresses
based on the BLI_mempool address since we know this is unique.

4 years agoCleanup: redundant 4th index in sculpt PBVH
Campbell Barton [Wed, 6 Jul 2016 09:15:47 +0000 (19:15 +1000)]
Cleanup: redundant 4th index in sculpt PBVH

Since moving to MLoopTri this is no longer needed.

4 years agoDyntopo: optimize edge collapsing
Campbell Barton [Wed, 6 Jul 2016 06:33:47 +0000 (16:33 +1000)]
Dyntopo: optimize edge collapsing

Checking if faces exist was a bottleneck,
use a simpler version of this function for triangles.

Gives approx 1.6x overall speedup (when many edges are being collapsed).

4 years agoCleanup: group dyntopo utility functions
Campbell Barton [Wed, 6 Jul 2016 06:32:17 +0000 (16:32 +1000)]
Cleanup: group dyntopo utility functions

4 years agoTransform Snap: Replace pixel limit w/ 'dist_to_ray_sq'
Germano Cavalcante [Wed, 6 Jul 2016 01:34:28 +0000 (11:34 +1000)]
Transform Snap: Replace pixel limit w/ 'dist_to_ray_sq'

When snapping to edge/vert, check the distance to the ray
instead of the screen-space pixel projection.

This also corrects the conversion of `dist_to_ray_sq` to `dist_px` which was being done incorrectly.

While this change was planned, it fixes T48791, caused by error in b01a56ee.

4 years agoCode cleanup: for Cycles compatible panels, use exclusion rather than inclusion list.
Brecht Van Lommel [Tue, 5 Jul 2016 20:26:15 +0000 (22:26 +0200)]
Code cleanup: for Cycles compatible panels, use exclusion rather than inclusion list.

This shortens the list, and Blender render specific panels are added less often
than other panels anyway, so less chance to miss things.

4 years agoRender border: don't disable when drawing around the entire camera.
Brecht Van Lommel [Mon, 4 Jul 2016 23:40:20 +0000 (01:40 +0200)]
Render border: don't disable when drawing around the entire camera.

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

4 years agoRender border: skip unnecessary uncropping if the border covers the entire image.
Brecht Van Lommel [Mon, 4 Jul 2016 23:39:13 +0000 (01:39 +0200)]
Render border: skip unnecessary uncropping if the border covers the entire image.

4 years agoRender border: make it work together with with cache result / save buffers / full...
Brecht Van Lommel [Sat, 2 Jul 2016 12:22:25 +0000 (14:22 +0200)]
Render border: make it work together with with cache result / save buffers / full sample.

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

4 years agoDyntopo: missing PBVH update collapsing an edge
Campbell Barton [Tue, 5 Jul 2016 08:45:16 +0000 (18:45 +1000)]
Dyntopo: missing PBVH update collapsing an edge

PBVH-nodes attached to the vertex to be deleted were updated,
but not nodes attached to the other vertex in the edge.

4 years agoDyntopo: avoid redundant vector copy
Campbell Barton [Tue, 5 Jul 2016 08:55:06 +0000 (18:55 +1000)]
Dyntopo: avoid redundant vector copy

4 years agoDyntopo: inline lookups, remove type check
Campbell Barton [Tue, 5 Jul 2016 08:43:16 +0000 (18:43 +1000)]
Dyntopo: inline lookups, remove type check

This was checking vert/face for every lookup,
so far the type is always known, do a direct lookup instead.

4 years agoDyntopo: use inline iterators
Campbell Barton [Tue, 5 Jul 2016 07:23:03 +0000 (17:23 +1000)]
Dyntopo: use inline iterators

Gives small performance boost.

4 years agoDyntopo: compare masks when collapsing
Campbell Barton [Tue, 5 Jul 2016 06:21:58 +0000 (16:21 +1000)]
Dyntopo: compare masks when collapsing

Was just checking the value of the first

4 years agoDyntopo: verify had over zealous asserts
Campbell Barton [Tue, 5 Jul 2016 06:19:19 +0000 (16:19 +1000)]
Dyntopo: verify had over zealous asserts

4 years agoCycles: remove extended precision hacks, no longer needed with SSE2 requirement.
Brecht Van Lommel [Mon, 4 Jul 2016 14:43:32 +0000 (16:43 +0200)]
Cycles: remove extended precision hacks, no longer needed with SSE2 requirement.

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

4 years agoFix a few compiler warnings on OS X / clang.
Brecht Van Lommel [Mon, 4 Jul 2016 15:30:05 +0000 (17:30 +0200)]
Fix a few compiler warnings on OS X / clang.

Two were actual bugs, though they existed only in unused code:
* In Freestyle it was unintentionally copying a scene rather than referencing it.
* In BLI_array_store_is_valid there was use of uninitialized memory.

4 years agoFix use of uninitialized variable introduced in fix for T48755.
Brecht Van Lommel [Mon, 4 Jul 2016 15:29:52 +0000 (17:29 +0200)]
Fix use of uninitialized variable introduced in fix for T48755.

4 years agoAnd one more fix to particle distribution!
Bastien Montagne [Mon, 4 Jul 2016 14:10:40 +0000 (16:10 +0200)]
And one more fix to particle distribution!

As pointed by Brecht, previous fix in rB61b49de44940 was actually incomplete,
we could still hit float rounding issue and hence same value in more than one consecutive
items of element_sum.

New solution is a bit different, we remove the 'minimal weight' check, and rather simply
ignores an item when the sum of its normalized weight to previous item's sum does not add
anything. Shall be safe and 100% effective this time!

4 years agoFix bmesh test after recent refactor.
Bastien Montagne [Sat, 2 Jul 2016 17:11:13 +0000 (19:11 +0200)]
Fix bmesh test after recent refactor.

4 years agoBI Viewport(GLSL): support for envmap in Texture node
Alexander Romanov [Mon, 4 Jul 2016 08:19:13 +0000 (11:19 +0300)]
BI Viewport(GLSL): support for envmap in Texture node

This patch is another step to achieve BI and it's Viewport consistency for cubemap textures.
{F318879}

To test world_space_shading flag D2072 is required.

Alexander (Blend4Web Team)

Reviewers: campbellbarton, brecht

Subscribers: homyachetser, Evgeny_Rodygin, AlexKowel, yurikovelenov

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

4 years agoFix input for Texture node (envmap+world_space_shading)
Alexander Romanov [Mon, 4 Jul 2016 08:08:48 +0000 (11:08 +0300)]
Fix input for Texture node (envmap+world_space_shading)

This patch fixes shortcoming of D2046.
The original behavior without world_space_shading flag is that Texture node expects the reflected vector in view space. But with world_space_shading it should be in world space.

In attached file you will see a simple material setup and a node material analogue.

Simple material must have the same behavior regardless world_space_shading flag.

{F318866}

Alexander (Blend4Web Team)

Reviewers: brecht

Reviewed By: brecht

Subscribers: campbellbarton, homyachetser, Evgeny_Rodygin, AlexKowel, yurikovelenov

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

4 years agoEnvironment lighting for the GLSL mode
Alexander Romanov [Mon, 4 Jul 2016 08:01:32 +0000 (11:01 +0300)]
Environment lighting for the GLSL mode

Environment lighting (aka ambient) is a key component of any renderer.
It's implemented like the Environment lighting of BI render for Approximate Gather mode. It support "Sky Color" and "White" Environment lighting modes.

It would be great if the user could see actual lighting conditions right in the Blender viewport instead of waiting for the renderer to complete the final image, exporting for external renderer or for a game engine.

Before:
{F113921}

After:
{F113922}

Example file: {F319013}

Original author: valentin_b4w

Alexander (Blend4Web Team)

Reviewers: valentin_b4w, campbellbarton, merwin, brecht

Reviewed By: brecht

Subscribers: panzergame, youle, duarteframos, AlexKowel, yurikovelenov, dingto, Evgeny_Rodygin

Projects: #rendering, #opengl_gfx

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

4 years agoQuiet warnings w/ USE_VERIFY define
Campbell Barton [Mon, 4 Jul 2016 04:55:29 +0000 (14:55 +1000)]
Quiet warnings w/ USE_VERIFY define

4 years agoCurve: utility to evaluate entire curve
Campbell Barton [Sun, 3 Jul 2016 13:20:53 +0000 (23:20 +1000)]
Curve: utility to evaluate entire curve

4 years agoUpdate pacman pkgbuild
Campbell Barton [Sun, 3 Jul 2016 11:13:43 +0000 (21:13 +1000)]
Update pacman pkgbuild

4 years agoFix T48783: OSL render errors after recent refactoring.
Brecht Van Lommel [Sun, 3 Jul 2016 11:08:21 +0000 (13:08 +0200)]
Fix T48783: OSL render errors after recent refactoring.

4 years agoFix use of uninitialized variable in Cycles OpenCL image textures.
Brecht Van Lommel [Sat, 2 Jul 2016 12:11:11 +0000 (14:11 +0200)]
Fix use of uninitialized variable in Cycles OpenCL image textures.

4 years agoFix typo in bgl.Buffer report function
Thomas Szepe [Sat, 2 Jul 2016 16:38:05 +0000 (18:38 +0200)]
Fix typo in bgl.Buffer report function

A GL_INT buffer was reported as GL_BYTE.

4 years agoInstall Deps: Use OSL 1.7.3, latest bugfix release.
Thomas Dinges [Sat, 2 Jul 2016 16:07:20 +0000 (18:07 +0200)]
Install Deps: Use OSL 1.7.3, latest bugfix release.

4 years agoCorrection for MSVC
Campbell Barton [Sat, 2 Jul 2016 10:21:39 +0000 (20:21 +1000)]
Correction for MSVC

4 years agoBMesh: utility function to resize bmesh elements
Campbell Barton [Sat, 2 Jul 2016 08:07:58 +0000 (18:07 +1000)]
BMesh: utility function to resize bmesh elements

This can be used to re-allocate bmesh data with/without tool flags.
Needed for Symmetrize since it uses bmesh operators from dyntopo.

4 years agoCleanup: comment blocks
Campbell Barton [Sat, 2 Jul 2016 00:02:04 +0000 (10:02 +1000)]
Cleanup: comment blocks

4 years agoCleanup: style
Campbell Barton [Sat, 2 Jul 2016 00:00:30 +0000 (10:00 +1000)]
Cleanup: style

4 years agoFix Cycles OpenCL not taking Extend and Clip extension types into account.
Thomas Dinges [Fri, 1 Jul 2016 21:48:31 +0000 (23:48 +0200)]
Fix Cycles OpenCL not taking Extend and Clip extension types into account.

(See T48720).

4 years ago"Fix" crash when deleting linked object which has indirect usages.
Bastien Montagne [Fri, 1 Jul 2016 15:51:08 +0000 (17:51 +0200)]
"Fix" crash when deleting linked object which has indirect usages.

This is in fact very hairy situation here... Objects are only refcounted by scenes,
any other usage is 'free', which means once all object instanciations are gone Blender
considers it can delete it.

There is a trap here though: indirect usages. Typically, we should never modify linked data
(because it is essencially useless, changes would be ignored and ost on next reload or
even undo/redo). This means indirect usages are not affected by default 'safe' remapping/unlinking.

For unlinking preceeding deletion however, this is not acceptable - we are likely to end with
a zero-user ID (aka deletable one) which is still actually used by other linked data.

Solution choosen here is double:
I) From 'user-space' (i.e. outliner, operators...), we check for cases where deleting datablocks
should not be allowed (indirect data or indirectly used data), and abort (with report) if needed.
II) From 'lower' level (BKE_library_remap and RNA), we also unlink from linked data,
which makes actual deletion possible and safe.

Note that with previous behavior (2.77 one), linked object would be deleted, including from linked data -
but then, once file is saved and reloaded, indirect usage would link back the deleted object,
without any instanciation in scene, which made it somehow virtual and unreachable...

With new behavior, this is no more possible, but on the other hand it means that in situations of dependency cycles
(two linked objects using each other), linked objects become impossible to delete (from user space).

Not sure what's best here, behavior with those corner cases of library linking is very poorly defined... :(

4 years agoOutliner: pass operator's reports to all operation callbacks.
Bastien Montagne [Fri, 1 Jul 2016 15:16:39 +0000 (17:16 +0200)]
Outliner: pass operator's reports to all operation callbacks.

Also define single callback func typedef, cleaner this way!

Note: maybe we want to do that for the other callbacks too (data, etc.), but will be enough for now.

4 years agoFix T48666: Segfault on boolean operation when exiting edit mode of instanced operand
Sergey Sharybin [Fri, 1 Jul 2016 12:19:47 +0000 (14:19 +0200)]
Fix T48666: Segfault on boolean operation when exiting edit mode of instanced operand

This is quite tricky situation which combined:

- Boolean modifier which accesses other object's derived mesh
  (in fact, it's nothing to do with boolean modifier, any other
  modifier which uses other's DM will have same bug).

- Dependency cycles in the scene which is rather russian-roulette
  from the cycle solver point of view.

- Multiple instanced objects used as boolean operand.

With all this things combined boolean modifier was accessing operand's derived
mesh which was referencing data from Mesh datablock. The issue is that those
references are becoming invalid after EDBM_mesh_load().

This function already had code to make sure object itself does not end up with
dangling pointers from derived mesh. Make it now so no possible instanced objects
are left with dangling pointers.

And who said it's a good idea to reference something from derived mesh..

4 years agoUI: take zoom into account w/ curves widget
Alexander Gavrilov [Fri, 1 Jul 2016 12:11:43 +0000 (22:11 +1000)]
UI: take zoom into account w/ curves widget

The Curves widget has buttons to zoom in on the curve. However the
click detection code doesn't take it into account, and at full zoom
in click on curve is detected very far from the actual visible curve.

Change it to compare the position to the actual line segments
in the UI coordinate space, i.e. with curve zoom applied.

4 years agoAdd wait cursor toggling dyntopo
Campbell Barton [Fri, 1 Jul 2016 11:50:53 +0000 (21:50 +1000)]
Add wait cursor toggling dyntopo

4 years agoUI: move dyntopo button to header
Campbell Barton [Fri, 1 Jul 2016 11:40:59 +0000 (21:40 +1000)]
UI: move dyntopo button to header

This looks a bit odd, but being able to see if dyntopo is enabled
when the panel is collapsed is handy.

4 years agoSculpt: skip normal calculation entering dyntopo
Campbell Barton [Fri, 1 Jul 2016 11:13:12 +0000 (21:13 +1000)]
Sculpt: skip normal calculation entering dyntopo

When no triangulation runs we can skip re-calculating normals.

4 years agoBGE: Display Hardware infos only in standalone.
Ulysse Martin [Fri, 1 Jul 2016 11:53:09 +0000 (11:53 +0000)]
BGE: Display Hardware infos only in standalone.

This patch moves the PrintHardwareInfo() function in standalone only, not in embedded. Why? Because you can need this infos for debugging
purpose in "compiled" blender files but it was boring to have it displayed each time you launched embedded. So you can have this infos when you
click standalone or when you run your executable app from a console.

Reviewers: moguri, kupoman, panzergame.

4 years agoEnable dyntopo re-entering sculpt mode
Campbell Barton [Fri, 1 Jul 2016 09:47:00 +0000 (19:47 +1000)]
Enable dyntopo re-entering sculpt mode

4 years agoBMesh: make toolflags optional
Campbell Barton [Fri, 1 Jul 2016 09:07:11 +0000 (19:07 +1000)]
BMesh: make toolflags optional

Saves 8 bytes per vert/edge/face.
Gives overall ~20-25% memory saving for dyntopo sculpting
and modifiers that use BMesh.

4 years agoFix T48757: Broken in D1120 normal baking
Alexander Romanov [Thu, 30 Jun 2016 09:40:10 +0000 (12:40 +0300)]
Fix T48757: Broken in D1120 normal baking

4 years agoFix T48728, part 2: Vertex colors not shown in texture mode
Sergey Sharybin [Thu, 30 Jun 2016 09:20:20 +0000 (14:20 +0500)]
Fix T48728, part 2: Vertex colors not shown in texture mode

4 years agoTransform Snap: Optimize edge-snap using BVH tree
Germano Cavalcante [Thu, 30 Jun 2016 05:43:47 +0000 (15:43 +1000)]
Transform Snap: Optimize edge-snap using BVH tree

changes in BLI_kdopbvh:

- `BLI_bvhtree_find_nearest_to_ray` now takes is_ray_normalized and scale argument.
- `BLI_bvhtree_find_nearest_to_ray_angle` has been added (use for perspective view).

changes in BLI_bvhutils:

- `bvhtree_from_editmesh_edges_ex` was added.

changes in math_geom:

- `dist_squared_ray_to_seg_v3` was added.

other changes:

- `do_ray_start_correction` is no longer necessary to snap to verts.
- the way in which the test of depth was done before is being simulated in callbacks.

4 years agoCMake: list buildinfo.h as buildinfo.cmake's output
Campbell Barton [Wed, 29 Jun 2016 22:49:50 +0000 (08:49 +1000)]
CMake: list buildinfo.h as buildinfo.cmake's output

Keep the fake header to ensure we always run.

4 years agoCorrect fix for MSVC
Campbell Barton [Wed, 29 Jun 2016 22:10:49 +0000 (08:10 +1000)]
Correct fix for MSVC

4 years agoFix bplayer (c)
Bastien Montagne [Wed, 29 Jun 2016 15:57:41 +0000 (17:57 +0200)]
Fix bplayer (c)

4 years agoCleanup: use const
Campbell Barton [Wed, 29 Jun 2016 13:22:54 +0000 (23:22 +1000)]
Cleanup: use const

4 years agoCleanup: spelling, indentation
Campbell Barton [Wed, 29 Jun 2016 10:37:54 +0000 (20:37 +1000)]
Cleanup: spelling, indentation

4 years agoFix T48695: Slowdown w/ edit-mesh & shrinkwrap
Germano Cavalcante [Wed, 29 Jun 2016 09:31:57 +0000 (19:31 +1000)]
Fix T48695: Slowdown w/ edit-mesh & shrinkwrap

0b5a0d84 caused regression since edit-mesh BVH wasn't cached,
each shrink-wrap modifier created its own BVH.

4 years agoCorrection to previous commit: Only skip colors for texture paint
Sergey Sharybin [Wed, 29 Jun 2016 08:30:58 +0000 (13:30 +0500)]
Correction to previous commit: Only skip colors for texture paint

This way we avoid regression of sculpt mode shading.

Hopefully now it's all fine.

4 years agoCleanup: endian tests
Campbell Barton [Wed, 29 Jun 2016 08:12:59 +0000 (18:12 +1000)]
Cleanup: endian tests

4 years agoFix T48728: Vertex colors not shown in texture mode
Sergey Sharybin [Wed, 29 Jun 2016 08:08:12 +0000 (13:08 +0500)]
Fix T48728: Vertex colors not shown in texture mode

Regression caused by own changes to make texture paint more efficient
from workflow point of view.

Now the idea is to use vertex color outside of paint mode, so we don't
break any compatibility here.

4 years agoCleanup: warning
Campbell Barton [Wed, 29 Jun 2016 07:12:22 +0000 (17:12 +1000)]
Cleanup: warning

4 years agoBMesh Intersect: use flags to keep track of verts
Campbell Barton [Wed, 29 Jun 2016 06:09:58 +0000 (16:09 +1000)]
BMesh Intersect: use flags to keep track of verts

For simple cases bitmasks were OK, but didnt work for vert/edge, vert/edge tests.

Tag verts instead, makes logic easier to follow and gives minor speedup.

4 years agoUI: prevent softrange from becoming nan
Campbell Barton [Wed, 29 Jun 2016 02:00:17 +0000 (12:00 +1000)]
UI: prevent softrange from becoming nan

Quiets assert

4 years agoFix T48755: Crash UV unwrapping
Campbell Barton [Wed, 29 Jun 2016 01:48:50 +0000 (11:48 +1000)]
Fix T48755: Crash UV unwrapping

4 years agoUsual i18n/UI messages cleanup & fixes.
Bastien Montagne [Tue, 28 Jun 2016 19:34:18 +0000 (21:34 +0200)]
Usual i18n/UI messages cleanup & fixes.

4 years ago[msvc2015/OpenEXR] Linker hackery is no longer required in vc2015
Martijn Berger [Tue, 28 Jun 2016 14:02:12 +0000 (16:02 +0200)]
[msvc2015/OpenEXR] Linker hackery is no longer required in vc2015

Reviewers: juicyfruit

Reviewed By: juicyfruit

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

4 years agoFix T48732: New GGX breaks OpenCL kernel
Sergey Sharybin [Tue, 28 Jun 2016 12:11:17 +0000 (17:11 +0500)]
Fix T48732: New GGX breaks OpenCL kernel

Make sure we don't perform any implicit address space conversion.

A bit annoying, but less intrusive approaches (like using temp private
variable in .cl kernel) do not work correct here.

Using generic address space will help from code side here, but will
be somewhat slower due to extra things happening as far as i know.

4 years agoCleanup: use bool for writefile
Campbell Barton [Tue, 28 Jun 2016 11:00:00 +0000 (21:00 +1000)]
Cleanup: use bool for writefile

4 years agowritefile: replace most struct lookups /w constants
Campbell Barton [Tue, 28 Jun 2016 10:05:42 +0000 (20:05 +1000)]
writefile: replace most struct lookups /w constants

Removes many hash lookups per file-save and undo-step.

4 years agoCleanup: code-style
Campbell Barton [Tue, 28 Jun 2016 07:35:35 +0000 (17:35 +1000)]
Cleanup: code-style

Other changes here planned which touch many lines, so run cleanup first.

4 years agoFix T48753: VSE must restart for international fonts
Campbell Barton [Tue, 28 Jun 2016 06:18:17 +0000 (16:18 +1000)]
Fix T48753: VSE must restart for international fonts

4 years agoGHOST/X11: Hotplug support for xinput
Campbell Barton [Tue, 28 Jun 2016 03:34:53 +0000 (13:34 +1000)]
GHOST/X11: Hotplug support for xinput

Allows to plug/unplug different tablets while Blender is running.

Also fixes crash unplugging tablet while Blender runs (T48750).

4 years agoRNA: resolve assert w/ no languages available
Campbell Barton [Tue, 28 Jun 2016 02:36:21 +0000 (12:36 +1000)]
RNA: resolve assert w/ no languages available

4 years agoRNA: perform reverse search on operators
Campbell Barton [Tue, 28 Jun 2016 02:11:34 +0000 (12:11 +1000)]
RNA: perform reverse search on operators

In most the last added operator is being handles.

4 years agoCleanup: Python imports
Campbell Barton [Tue, 28 Jun 2016 01:58:38 +0000 (11:58 +1000)]
Cleanup: Python imports

4 years agoFix MSVC error, co_return now a reserved word
Campbell Barton [Mon, 27 Jun 2016 22:31:52 +0000 (08:31 +1000)]
Fix MSVC error, co_return now a reserved word

D2073 by @LazyDodo

4 years agoFix (unreported) wrong ID type check in Text editor's ID remap callback.
Bastien Montagne [Mon, 27 Jun 2016 15:40:08 +0000 (17:40 +0200)]
Fix (unreported) wrong ID type check in Text editor's ID remap callback.

4 years agoBendy Bones Instability Fix - Second Attempt
Joshua Leung [Mon, 27 Jun 2016 14:52:20 +0000 (02:52 +1200)]
Bendy Bones Instability Fix - Second Attempt

So the error seems to be in cubic_tangent_factor_circle_v3(),
which was introduced with D2001.

I've tweaked the most obvious culprit here - the epsilon factor.
It used to be 10^-7, but I've reduced it down to 10^-5 now,
and it's looking a lot more stable now :)

---------

BTW, about the derivation of the magic 0.390464 factor I briefly subbed back
as a workaround for this bug, see:
    http://www.whizkidtech.redprince.net/bezier/circle/

4 years agoBendy Bones: Temporary workaround for instability caused by D2001 when using custom...
Joshua Leung [Mon, 27 Jun 2016 14:20:25 +0000 (02:20 +1200)]
Bendy Bones: Temporary workaround for instability caused by D2001 when using custom handle bones

It's probably some numeric precision issue, but until we figure out exactly what's
going wrong here, let's just revert back to the hardcoded value that was used here
successfully for years without issues.

4 years agoFix T48740: User could remap indirect libdata usages from outliner.
Bastien Montagne [Mon, 27 Jun 2016 13:43:04 +0000 (15:43 +0200)]
Fix T48740: User could remap indirect libdata usages from outliner.

Remapping indirect usage of IDs is forbidden from user space, this is calling for
nice nightmare with libraries handling (and undo crash, among other things).

Not sure why I was 'laxist' about indirect usage cases detection like that,
for now just consider any ID used by another linked datablock as indirect usage case!

Also, added some error/warning reports to Outliner's remap code.

4 years agoFCurve Auto Colours: "XYZ to RGB" works for Quaternions too now
Joshua Leung [Mon, 27 Jun 2016 12:25:48 +0000 (00:25 +1200)]
FCurve Auto Colours: "XYZ to RGB" works for Quaternions too now

The "W" channel will get a yellowish colour (i.e. a blend between the X/R and
Y/G axis colours), while the XYZ will behave as they do for other transforms.

4 years agoPartial fix for T48734
Joshua Leung [Mon, 27 Jun 2016 07:01:25 +0000 (19:01 +1200)]
Partial fix for T48734

The create drivers operator should not use the "Transform Channel" variable type
when driving one transform with another on the same object/bone. Otherwise, you
end up with a situation which technically results in a bit of a pseudo-dependency
cycle.

4 years agoCode Cleanup: Use bools not shorts
Joshua Leung [Mon, 27 Jun 2016 03:47:44 +0000 (15:47 +1200)]
Code Cleanup: Use bools not shorts

4 years agoCtrl-Shift-C: Made it easier to add constraints between bones in different armatures
Joshua Leung [Mon, 27 Jun 2016 03:42:06 +0000 (15:42 +1200)]
Ctrl-Shift-C: Made it easier to add constraints between bones in different armatures

The Ctrl-Shift-C operator to add constraints between a pair of selected items,
for example, between two objects, or between two bones (in the same armature).

This commit makes it possible to use this operator to add a constraint where the
target is a bone from another object - e.g. to make a deform bone follow the control
bone in another armature, or to make an object use a bone as a tracking target.

Usage:
1) Ensure you are in Pose Mode, then select the bone to use as the target
2) Shift-Select the other object and/or the bone that's going to get the constraint
3) Ctrl-Shift-C

4 years agoFix (unreported) potential buffer overflow with BLO_library_path_explode() usage.
Bastien Montagne [Mon, 27 Jun 2016 10:38:12 +0000 (12:38 +0200)]
Fix (unreported) potential buffer overflow with BLO_library_path_explode() usage.

Also added warning to func doc, let's try to avoid this in future (for until we
pass string length systematically...).

4 years agoFix T48741: File browser back button doesn't work from inside Blend (library) file.
Bastien Montagne [Mon, 27 Jun 2016 08:54:17 +0000 (10:54 +0200)]
Fix T48741: File browser back button doesn't work from inside Blend (library) file.

Problem was in fact slightly wider, File space was nearly not taking into account
library navigation case and its 'virtual' directoris, except in a few places.

Add a wrapper around BLI_is_dir that also check for lib paths, and used it in
ED_file_change_dir(), such that we now always check path is a
valid directory - in the filebrowser context, not filesytem context. ;)