blender.git
4 years agoThis commit makes it possible to select the sort mode whenever we invoke an operator.
Thomas Beck [Sun, 23 Aug 2015 10:40:21 +0000 (12:40 +0200)]
This commit makes it possible to select the sort mode whenever we invoke an operator.

It's needed especially for the menu entry "recover auto save" where you'd like to have the files sorted by date most of the time but it could be useful in other places too.
There should be no functional change in other areas, I just added the missing parameter (FILE_SORT_ALPHA).

Was a request from @sebastian_k at #BCon13, so at least one guy needs it ;)

Reviewers: mont29

Reviewed By: mont29

Subscribers: sebastian_k

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

4 years agoFix T45633 - Animated modifiers don't update in new depsgraph
Joshua Leung [Sun, 23 Aug 2015 10:12:25 +0000 (22:12 +1200)]
Fix T45633 - Animated modifiers don't update in new depsgraph

* Resolved some todo's where FModifier paths were getting identified using the
  wrong pattern.
* Added the missing animation -> modifier link. The "hacky" part here is just
  to do with how we check if that link is needed; the link though should exist
  in the graph.

4 years agoMath Lib: Use same logic for 2d/3d functions
Campbell Barton [Sun, 23 Aug 2015 09:10:37 +0000 (19:10 +1000)]
Math Lib: Use same logic for 2d/3d functions

dist_squared_to_line_v2, dist_to_line_v2

4 years agoMath Lib: minor optimization interp_weights_poly
Campbell Barton [Sun, 23 Aug 2015 07:07:35 +0000 (17:07 +1000)]
Math Lib: minor optimization interp_weights_poly

4 years agoCleanup: spelling
Campbell Barton [Sat, 22 Aug 2015 11:17:32 +0000 (21:17 +1000)]
Cleanup: spelling

4 years agoUse epsilon for line-intersect collinear test
Campbell Barton [Sat, 22 Aug 2015 11:03:12 +0000 (21:03 +1000)]
Use epsilon for line-intersect collinear test

Also remove 2x vector normalize since other parts of the code already check this.

Fixes T45849

4 years agoFileBrowser: Tweak display of size/time of entries.
Bastien Montagne [Sat, 22 Aug 2015 09:02:12 +0000 (11:02 +0200)]
FileBrowser: Tweak display of size/time of entries.

We have no size for blenlib entries, nor do we have time for those and 'parent' entry.

Thanks to Sergey for notifying this on IRC.

4 years agooutliner: tweak GPLayer color button overlap
Campbell Barton [Sat, 22 Aug 2015 06:48:41 +0000 (16:48 +1000)]
outliner: tweak GPLayer color button overlap

4 years agoFix outliner grease pencil color button
Campbell Barton [Sat, 22 Aug 2015 06:37:35 +0000 (16:37 +1000)]
Fix outliner grease pencil color button

4 years agoFix T45689: Pose Libraries cannot be used when using lib-linked actions as poselibs
Joshua Leung [Sat, 22 Aug 2015 06:16:55 +0000 (18:16 +1200)]
Fix T45689: Pose Libraries cannot be used when using lib-linked actions as poselibs

This commit makes some tweaks that make it at least possible to use lib-linked
actions as Pose Libraries. Specifically:
* The apply poses button is no longer greyed out

* It is possible to select different poses from the list of poses

* All pose library operators which edit the poses stored in the poselib
  now have improved poll callbacks which perform extra checks for lib-linked
  actions (which cannot be edited, as all those changes will be lost)

Caveats:
* Due to the way the UI list template works, it doesn't seem to be possible to
  make it not grey out the items in the list. (While the double-click to rename
  thing shouldn't be allowed, items should at least look like they can be clicked on)

* The difference between clickable vs not-clickable isn't too great, making it hard
  to tell that that while the Add/Remove/Sanitise toggles are not usable,
  the Apply Poses is actually functional. But, this is a more of a  UI-toolbox
  level issue

4 years agoTypo fix
Joshua Leung [Fri, 21 Aug 2015 15:30:09 +0000 (03:30 +1200)]
Typo fix

4 years agoBGE: Fix constraint free crash in RemoveConstraint.
Porteries Tristan [Fri, 21 Aug 2015 20:17:35 +0000 (22:17 +0200)]
BGE: Fix constraint free crash in RemoveConstraint.

Fix silly error getRigidBodyA() instead of getRigidBodyB()

4 years agoFix T45658: linked library object loses particle settings.
Bastien Montagne [Fri, 21 Aug 2015 16:27:14 +0000 (18:27 +0200)]
Fix T45658: linked library object loses particle settings.

Simply make ParticleSettings datablock linkable, see absolutely no reason why those
were the only 'real data' ID type not linkable so far...

4 years agoAnim Editors: All keyframe selection operators now perform undo pushes
Joshua Leung [Fri, 21 Aug 2015 14:47:32 +0000 (02:47 +1200)]
Anim Editors: All keyframe selection operators now perform undo pushes

This brings them into line with other editing tools (e.g. object/mesh selection),
and should help fix bugs like T45374 and T45846

4 years agoFix T45864: Wrong NLA Control Curves keyed when using the Graph Editor sliders
Joshua Leung [Fri, 21 Aug 2015 14:33:31 +0000 (02:33 +1200)]
Fix T45864: Wrong NLA Control Curves keyed when using the Graph Editor sliders

This commit simplifies the logic for finding the control curves for NLA strips,
thus eliminating a whole bunch of weird errors that were happening here. It should
also fix a number of other related issues here.

4 years agoFix T45865: Auto Blend is not recalculated when adjusting start/end/scale etc. of...
Bastien Montagne [Fri, 21 Aug 2015 14:18:20 +0000 (16:18 +0200)]
Fix T45865: Auto Blend is not recalculated when adjusting start/end/scale etc. of strip through RNA.

4 years agoBVH-raycast: Use watertight intersections
Campbell Barton [Fri, 21 Aug 2015 07:46:23 +0000 (17:46 +1000)]
BVH-raycast: Use watertight intersections

By default watertight intersections are used,
For callbacks where its not needed,
BLI_bvhtree_ray_cast_ex can be called without the BVH_RAYCAST_WATERTIGHT flag.

Fixes T45286

4 years agoMath Lib: watertight intersection function
Campbell Barton [Fri, 21 Aug 2015 07:45:04 +0000 (17:45 +1000)]
Math Lib: watertight intersection function

From Cycles with some very minor differences.

4 years agoMath Lib: Add float/int conversion functions
Campbell Barton [Fri, 21 Aug 2015 07:42:40 +0000 (17:42 +1000)]
Math Lib: Add float/int conversion functions

4 years agoBVH-raycast: ensure input direction is unit-length
Campbell Barton [Fri, 21 Aug 2015 07:05:48 +0000 (17:05 +1000)]
BVH-raycast: ensure input direction is unit-length

This was already the case for most users of ray-cast.
Doing this avoids 2x normalize calls per ray-cast in many places.

4 years agoFix uninitialized var use
Campbell Barton [Fri, 21 Aug 2015 04:46:30 +0000 (14:46 +1000)]
Fix uninitialized var use

4 years agoDocs: correct some comments
Campbell Barton [Thu, 20 Aug 2015 23:07:52 +0000 (09:07 +1000)]
Docs: correct some comments

4 years agoFix ATI part of T45708, crash when enabling opensubdiv.
Antony Riakiotakis [Thu, 20 Aug 2015 13:23:33 +0000 (16:23 +0300)]
Fix ATI part of T45708, crash when enabling opensubdiv.

In fact exit was getting called because we
had an error in shader compilation:

Uniform buffer objects are in fact required.

Since it looks like original intent was to
write the shader against older GLSL version,
I will be adding an extension here instead
of a version.

Thanks to Anshu Arya for letting me borrow his machine through
VPN to do the debugging :)

4 years agoFix T45491 not all GPUs support those extensions, use check for
Antony Riakiotakis [Thu, 20 Aug 2015 13:05:24 +0000 (16:05 +0300)]
Fix T45491 not all GPUs support those extensions, use check for
opensubdiv to enable.

4 years agoMinor cleanup (BLI_cleanup_dir already adds trailing slash, and correct a false-posit...
Bastien Montagne [Thu, 20 Aug 2015 10:44:03 +0000 (12:44 +0200)]
Minor cleanup (BLI_cleanup_dir already adds trailing slash, and correct a false-positive assert).

4 years agoBGE: Fix T44557 GameLogic module memory leak.
Porteries Tristan [Thu, 20 Aug 2015 09:53:09 +0000 (11:53 +0200)]
BGE: Fix T44557 GameLogic module memory leak.

This reverts commit 7a28ca4398465be1d6d57079e4b27c3a03418745.

4 years agoFix T43654: Radial distance for force fields was computed using the `vec_to_point`
Lukas Tönne [Thu, 20 Aug 2015 09:57:03 +0000 (11:57 +0200)]
Fix T43654: Radial distance for force fields was computed using the `vec_to_point`
vector, which already has the radial component removed.

4 years agoResolve MSVC/OpenMP compat issue
Campbell Barton [Thu, 20 Aug 2015 09:22:09 +0000 (19:22 +1000)]
Resolve MSVC/OpenMP compat issue

4 years agoUse BVH-overlap for mesh self-intersection display
Campbell Barton [Thu, 20 Aug 2015 09:09:20 +0000 (19:09 +1000)]
Use BVH-overlap for mesh self-intersection display

Add BKE_bmbvh_overlap, remove BKE_bmbvh_find_face_segment

4 years agoHopefully fix mingw building after filebrowser rewrite.
Bastien Montagne [Thu, 20 Aug 2015 08:15:08 +0000 (10:15 +0200)]
Hopefully fix mingw building after filebrowser rewrite.

The mystery here is, how MSVC could not break on such error? :(

4 years agoBVH-overlap: add callback to BLI_bvhtree_overlap
Campbell Barton [Thu, 20 Aug 2015 07:32:25 +0000 (17:32 +1000)]
BVH-overlap: add callback to BLI_bvhtree_overlap

The callback checks if 2 nodes intersect (not just their AABB).

Advantages:
- theres no need to allocate overlaps which are later ignored.
- expensive intersection tests will run multi-threaded.

Currently only used for Python API.

4 years agoFix T45514 crash entering texpaint mode.
Antony Riakiotakis [Thu, 20 Aug 2015 07:35:14 +0000 (10:35 +0300)]
Fix T45514 crash entering texpaint mode.

In the file of the report, stencil and clone indices
have fallen out of synch with the uv/mtexpoly layers.

Looks like the file has a long history, coming from 2.49
even. Unfortunately reporter cannot recall exact steps
to reproduce, so "fix" is to patch mesh.validate to
fix those indices.

4 years agoBVH-overlap: use stack for overlap data array
Campbell Barton [Thu, 20 Aug 2015 05:56:33 +0000 (15:56 +1000)]
BVH-overlap: use stack for overlap data array

This is known to be <32, so no need to malloc every item.

4 years agoAvoid redundant normal calculation in heat-weight
Campbell Barton [Thu, 20 Aug 2015 05:09:25 +0000 (15:09 +1000)]
Avoid redundant normal calculation in heat-weight

4 years agoCleanup: de-duplicate ray-cast initialization
Campbell Barton [Thu, 20 Aug 2015 03:25:21 +0000 (13:25 +1000)]
Cleanup: de-duplicate ray-cast initialization

4 years agoCleanup: comment out isect_ray_tri_threshold_v3
Campbell Barton [Thu, 20 Aug 2015 02:36:21 +0000 (12:36 +1000)]
Cleanup: comment out isect_ray_tri_threshold_v3

Also define epsilon var for ray-cast functions.

4 years agoTransform: Use BVH for volume-snap (optimization)
Campbell Barton [Thu, 20 Aug 2015 02:14:02 +0000 (12:14 +1000)]
Transform: Use BVH for volume-snap (optimization)

Was performing ray-tri intersection checks on all faces.

Note, this isn't using isect_ray_tri_threshold_v3
which was used to prevent ray-casts slipping through between faces.

Instead we'll move to using watertight intersections by default.

4 years agoCleanup: remove unused BVH_ONQUAD flag
Campbell Barton [Thu, 20 Aug 2015 01:03:34 +0000 (11:03 +1000)]
Cleanup: remove unused BVH_ONQUAD flag

4 years agoFix drawing subsurf & auto-smooth
Campbell Barton [Wed, 19 Aug 2015 23:20:41 +0000 (09:20 +1000)]
Fix drawing subsurf & auto-smooth

Error caused by recent MFace removal from subsurf.

4 years agoCleanup: unused vars
Campbell Barton [Wed, 19 Aug 2015 23:19:50 +0000 (09:19 +1000)]
Cleanup: unused vars

4 years agoCleanup: whitespace
Campbell Barton [Wed, 19 Aug 2015 22:51:35 +0000 (08:51 +1000)]
Cleanup: whitespace

4 years agoFileBrowser: Fix some minor issue with fileentries creation.
Bastien Montagne [Wed, 19 Aug 2015 22:48:59 +0000 (00:48 +0200)]
FileBrowser: Fix some minor issue with fileentries creation.

An entry could already exist in misc cache, when creating it for block cache, leading to double-creation.
Issue was not that serious (no memleak or so), but nasty still. Thanks to Severin for notifying the assert.

4 years agoFix 32bit builds... :/
Bastien Montagne [Wed, 19 Aug 2015 21:54:49 +0000 (23:54 +0200)]
Fix 32bit builds... :/

4 years agoFinal 'FileBrowser First Stage' merge.
Bastien Montagne [Wed, 19 Aug 2015 20:41:39 +0000 (22:41 +0200)]
Final 'FileBrowser First Stage' merge.

It basically rewrites most of filelist.c, with some more limited changes in other areas of filebrowser.

From user perspective, it:
* Removes some info in 'long' drawing mode (owner, permissions) - OS-specific data that do not really matter in Blender!
* Makes short/long display 'fixed' size (among four choices, like thumbnails mode).
* Allows to list several layers of dirtree at once, in a flat way (inside .blend files and/or real directories).
* Consequently, adds datablocks types filtering.
* Uses way less RAM when listing big directories, especially in thumbnail mode (we are talking of several hundred of MiB spared).
* Generates thumbnails way faster.

From code perspective, it:
* Is ready for asset engine needs (on data structure level in filebrowser's listing).
* Simplifies and makes 'generic' file listing much lighter.
* Separates file listing in three different aspects:
** 'generic' filelisting (in BLI), which becomes a shallow wrapper around stat struct.
** 'filebrowser drawing' filelisting, which only contains current visible subset of the whole list (sliding window), with extra drawing data (strings for size, date/time, preview, etc.).
** 'asset-ready' filelisting, which is used for operations common to 'basic' filehandling and future asset-related one.
* Uses uuid's to handle file selection/state in the browser, instead of using flags in filelisting items.
* Uses much lighter BLI_task handling for previews, instead of heavy 'job' system (using the new 'notifier' timer to handle UI refresh, in similar way to jobs).
* Moves .blend datablocks preview handling to IMB_thumbnail (necessary to avoid storing all datablock previews at once, and gives better consistency and performances too).

Revision: https://developer.blender.org/D1316

Thanks to Campbell & Sergey for the reviews. :)

4 years agoFix T45847: Pie looses focus when mouse cursor passes through a pie button
Julian Eisel [Wed, 19 Aug 2015 18:53:16 +0000 (20:53 +0200)]
Fix T45847: Pie looses focus when mouse cursor passes through a pie button

4 years agoMore BLT/Windows fixes... :/
Bastien Montagne [Wed, 19 Aug 2015 09:01:52 +0000 (11:01 +0200)]
More BLT/Windows fixes... :/

4 years agoHopefully fix broken windows after recent i18n split.
Bastien Montagne [Wed, 19 Aug 2015 08:09:08 +0000 (10:09 +0200)]
Hopefully fix broken windows after recent i18n split.

We need to include BLI_utildefines.h when using __func__...

4 years agoFix for accessing looptri's from subsurf
Campbell Barton [Wed, 19 Aug 2015 07:24:08 +0000 (17:24 +1000)]
Fix for accessing looptri's from subsurf

Use poly count since tessfaces may be zero

4 years agoMulti-View: fix Multi-View camera suffix test
Dalai Felinto [Wed, 19 Aug 2015 06:37:58 +0000 (03:37 -0300)]
Multi-View: fix Multi-View camera suffix test

If we had ambiguity in the SceneRenderView > Suffix matching test, the
first match would be used. And this would happen everytime a
SceneRenderView had an empty camera suffix.

We now take the longest matching suffix instead.

4 years agoFix T45706: Axis aligned tri-tri intersection
Campbell Barton [Wed, 19 Aug 2015 02:18:58 +0000 (12:18 +1000)]
Fix T45706: Axis aligned tri-tri intersection

4 years agoCleanup: style + doxy
Campbell Barton [Tue, 18 Aug 2015 22:45:35 +0000 (08:45 +1000)]
Cleanup: style + doxy

4 years agoFix error in recent library API updates
Campbell Barton [Tue, 18 Aug 2015 22:48:38 +0000 (08:48 +1000)]
Fix error in recent library API updates

4 years agoIncrease Smooth_View limit to 10.000
Thomas Beck [Tue, 18 Aug 2015 18:41:21 +0000 (20:41 +0200)]
Increase Smooth_View limit to 10.000

Request from @zuggamasta: For turntable like view rotations a very slow and smooth turn is needed. This is now possible with the new limit.

4 years agoIMB_thumb: Allow blen-handling func to also load datablock previews from .blend file.
Bastien Montagne [Tue, 18 Aug 2015 12:32:13 +0000 (14:32 +0200)]
IMB_thumb: Allow blen-handling func to also load datablock previews from .blend file.

Notes:
* Not yet used, this is the last piece of 'side changes' before the big filebrowser commit.
* We can probably be more effective here (like e.g. reading and storing all previews for a given
  group in thumbnails cache at once, instead of re-opening and parsing the whole file each time),
  but will do this later.

4 years agoReplace 'BLO_is_a_library' by 'BLO_library_path_explode'.
Bastien Montagne [Tue, 18 Aug 2015 11:18:50 +0000 (13:18 +0200)]
Replace 'BLO_is_a_library' by 'BLO_library_path_explode'.

This new func will be fully used by upcomming code (it mostly adds
the extraction of library item name as well as library file and ID group).

4 years agoIMB_thumb: add thread locking API.
Bastien Montagne [Tue, 18 Aug 2015 10:35:43 +0000 (12:35 +0200)]
IMB_thumb: add thread locking API.

General idea is that, if several threads are handling thumbnails at the same time,
they can end working on the same file at some point, which will generate conflict.

To avoid this, threads can now lock a given filepath.

Note that locking data is allocated on a ref-count basis, to avoid keeping the GSet
in memory when not needed. Also, we are using global LOCK_IMAGE mutex for now.

Needed for upcomming filebrowser rework.

4 years agoBGE: Fix mesh not registered in scene libload.
Porteries Tristan [Tue, 18 Aug 2015 10:24:38 +0000 (12:24 +0200)]
BGE: Fix mesh not registered in scene libload.

4 years agoFix T45824: Pie's no longer show enum icons
Campbell Barton [Tue, 18 Aug 2015 09:18:16 +0000 (19:18 +1000)]
Fix T45824: Pie's no longer show enum icons

4 years agoUI: avoid property lookup w/ expanded enums
Campbell Barton [Tue, 18 Aug 2015 09:04:06 +0000 (19:04 +1000)]
UI: avoid property lookup w/ expanded enums

4 years agosystem-info.txt was quoting ffmpeg lib names
Campbell Barton [Tue, 18 Aug 2015 06:09:51 +0000 (16:09 +1000)]
system-info.txt was quoting ffmpeg lib names

4 years agoUI: avoid subtracting shadow from winrct
Campbell Barton [Tue, 18 Aug 2015 04:16:58 +0000 (14:16 +1000)]
UI: avoid subtracting shadow from winrct

For popup interactions we need to know if events are in the region or not,
however subtracting the shadow isn't so reliable, since its not always added to all sides of a popup.

Instead, get the winrct value from a popup using the block rect, otherwise the winrct as-is.

4 years agoReadfile: more efficient OldNewMap lookups
Campbell Barton [Tue, 18 Aug 2015 01:22:07 +0000 (11:22 +1000)]
Readfile: more efficient OldNewMap lookups

Even when lasthit can't be used to find the next address,
use it as a starting point for the full array search.
Gives approx 1/3 less array searching in own tests.

4 years agoDocs: function comments
Campbell Barton [Mon, 17 Aug 2015 21:10:01 +0000 (07:10 +1000)]
Docs: function comments

4 years agoRefactor translation code out of blenfont
Campbell Barton [Sun, 16 Aug 2015 07:32:01 +0000 (17:32 +1000)]
Refactor translation code out of blenfont

- Add blentranslation `BLT_*` module.
- moved & split `BLF_translation.h` into (`BLT_translation.h`, `BLT_lang.h`).
- moved `BLF_*_unifont` functions from `blf_translation.c` to new source file `blf_font_i18n.c`.

4 years agoLattice min_max: add a version of the func using lattice's final DispList,
Philipp Oeser [Mon, 17 Aug 2015 14:59:32 +0000 (16:59 +0200)]
Lattice min_max: add a version of the func using lattice's final DispList,
and use it for bbox computing.

Revision: https://developer.blender.org/D1462

4 years agoBGE: Fix T45817 Convert curve object in group instance.
Porteries Tristan [Mon, 17 Aug 2015 14:51:35 +0000 (16:51 +0200)]
BGE: Fix T45817 Convert curve object in group instance.

Now group instance conversion allow unconverted object like curve, meta ball ect…

4 years agoSubsurf: don't reserve MFace by default
Campbell Barton [Mon, 17 Aug 2015 07:24:34 +0000 (17:24 +1000)]
Subsurf: don't reserve MFace by default

Instead, the cache can be calculated only when its needed (fixes T45787).

4 years agoFix for Ghost/OSX w/ core profile
Campbell Barton [Mon, 17 Aug 2015 06:17:22 +0000 (16:17 +1000)]
Fix for Ghost/OSX w/ core profile

4 years agoFix T45802: View Lock w/ Curve-Parent fails
Campbell Barton [Mon, 17 Aug 2015 04:26:27 +0000 (14:26 +1000)]
Fix T45802: View Lock w/ Curve-Parent fails

4 years agoCleanup: remove unused Object.ipoflag
Campbell Barton [Mon, 17 Aug 2015 04:22:23 +0000 (14:22 +1000)]
Cleanup: remove unused Object.ipoflag

4 years agoSimplify thumbnail blend parser
Campbell Barton [Mon, 17 Aug 2015 02:37:38 +0000 (12:37 +1000)]
Simplify thumbnail blend parser

No need to convert the BHead code to an int, just compare the bytes.

4 years agoFix T39486, screwed object bevel made bevel amount go out of control.
Howard Trickey [Sun, 16 Aug 2015 19:15:13 +0000 (15:15 -0400)]
Fix T39486, screwed object bevel made bevel amount go out of control.

There is an adjustment pass in bevel that tries to make the bevel
widths at either end of a beveled edge as equal as possible.
When there are hundreds of beveled edges end-to-end, these adjustments
can accumulate out of control and result looks awful.
Yet the adjustment pass is sometimes needed to avoid equally awful
appearances in other cases (see the "Bent test" in the bevel regression
tests).
This change uses the 'Clamp overlap' flag of bevel (on by default in
the modifier, not in the tool) to limit the amount of adjustment to within
10% of the desired width. When the flag is off, there is no limit to the
adjustment.

4 years agoFix T45795, bevel treated one-edge-beveled case inconsistently.
Howard Trickey [Sun, 16 Aug 2015 15:10:35 +0000 (11:10 -0400)]
Fix T45795, bevel treated one-edge-beveled case inconsistently.

When one edge is beveled at a vertex among more than 1 other unbeveled
edges, the code makes a polygon around the vertex. The position of the
vertices on the non-adjacent-to-beveled-edge edges depended on the
ordering of edges, which leads to inconsistent-looking results in seeming
symmetrical situations.  Changed to use the bevel amount as slide
distance, which fixes this.

4 years agoFix for numpy with nmake and missing directory
Chad Fraleigh [Sun, 16 Aug 2015 12:32:14 +0000 (14:32 +0200)]
Fix for numpy with nmake and missing directory

When using the nmake generator from cmake, numpy fails to extract during build because the working directory doesn't exist yet.

Reviewers: juicyfruit

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

4 years agoBGE: Fix memory leak and crash with certain physic types
Thomas Szepe [Sun, 16 Aug 2015 09:38:25 +0000 (11:38 +0200)]
BGE: Fix memory leak and crash with certain physic types

Fixing crash if the physic type is set sensor or character. Caused by a790e172d0281e64.
Fixing memory leak, if the constraint is deleted with Python API removeConstraint().
Add RemoveConstraint() method to avoid code duplication.
Rename old RemoveConstraint() to RemoveConstraintById() which is more suitable name for this method.

4 years agoFix T45807: Instant crash adding any modifier to NLA track
Julian Eisel [Sat, 15 Aug 2015 12:47:25 +0000 (14:47 +0200)]
Fix T45807: Instant crash adding any modifier to NLA track

Caused by rBcbf936a3327282

4 years agoCleanup: Avoid calling function twice
Julian Eisel [Fri, 14 Aug 2015 20:19:14 +0000 (22:19 +0200)]
Cleanup: Avoid calling function twice

Own stupidness from rB17422124eca332

4 years agoRemove redundant workaround for T41548
Julian Eisel [Fri, 14 Aug 2015 20:16:04 +0000 (22:16 +0200)]
Remove redundant workaround for T41548

Reverts 7a026971dc3f93 which isn't needed anymore after b347f523cececdf

4 years agoFix T45750: Closing search menu by clicking root button doesn't work when clicking...
Julian Eisel [Fri, 14 Aug 2015 20:09:31 +0000 (22:09 +0200)]
Fix T45750: Closing search menu by clicking root button doesn't work when clicking on lower half

4 years agoFix T40070, Bevel didn't bend as expected sometimes.
Howard Trickey [Fri, 14 Aug 2015 19:48:29 +0000 (15:48 -0400)]
Fix T40070, Bevel didn't bend as expected sometimes.

Two problems fixed. One, the comparison of angles to
'almost straight' or 'almost zero' needed a bigger epsilon.
Two, using the corner normal instead of the average face normal
is usually the right thing to do, and what the code was doing,
but in some cases the corner normal could be very wrong.

4 years agoFix dyntopo not warning anymore when vertex colors or uvs are present.
Antony Riakiotakis [Fri, 14 Aug 2015 15:11:31 +0000 (17:11 +0200)]
Fix dyntopo not warning anymore when vertex colors or uvs are present.

We check against loop data now, not tessface data

4 years agoFix unnecessarily added undo steps when deleting only scene
Julian Eisel [Fri, 14 Aug 2015 13:49:14 +0000 (15:49 +0200)]
Fix unnecessarily added undo steps when deleting only scene

Steps to reproduce were: startup.blend, move any object, delete active scene (nothing happens), undo (nothing happens), second undo is needed to revert object transformation

4 years agoRemove already-ifdef'ed out PRE_275_ALGORITHM code from bevel.
Howard Trickey [Fri, 14 Aug 2015 13:45:29 +0000 (09:45 -0400)]
Remove already-ifdef'ed out PRE_275_ALGORITHM code from bevel.

The new algorithm has soaked enough that we are unlikely to go back now.

4 years agoOutliner: Context menu for scenes
Philipp Oeser [Fri, 14 Aug 2015 13:15:25 +0000 (15:15 +0200)]
Outliner: Context menu for scenes

Adds context menu for scenes in the outliner, for now, with only a 'Delete' entry.

D1448 by @lichtwerk, review by @aligorith and @Severin

4 years agoCleanup: style
Campbell Barton [Fri, 14 Aug 2015 07:46:26 +0000 (17:46 +1000)]
Cleanup: style

4 years agoDocs: comment BHead.code values
Campbell Barton [Fri, 14 Aug 2015 07:30:32 +0000 (17:30 +1000)]
Docs: comment BHead.code values

4 years agoAdd real boundbox support to lattice, and update armature one.
Philipp Oeser [Thu, 13 Aug 2015 16:12:08 +0000 (18:12 +0200)]
Add real boundbox support to lattice, and update armature one.

* draw lattice boundingboxes in 3dView [if "show_bounds" is used -- an option previously pretty useless for lattices]
* give proper values for lattice objects ".bound_box" in bpy
* give proper values for armature objects ".bound_box" in bpy
* lets users use "Dimensions" [in 3dView Transform panel] on lattices and armatures
* remove redundant calculations in "boundbox_armature()"

Armatures boundingboxes were already drawn in 3dView, if "show_bounds" was used.

Based on report T45735: Lattice's bounding_box doesn't update,
and a comment in code by @campbellbarton ("later we may want to add dimensions for lattice, armature etc too").

Revision: https://developer.blender.org/D1460

4 years agoFix T45783: Problem selecting all objects on a layer from a script if any 3d view...
Bastien Montagne [Thu, 13 Aug 2015 12:25:26 +0000 (14:25 +0200)]
Fix T45783: Problem selecting all objects on a layer from a script if any 3d view is in local mode.

Do not take into account lay bits used for local view, when doing exact match.

4 years agoFix T45782: bpy.ops.object.select_by_layer match='SHARED' option is not working.
Bastien Montagne [Thu, 13 Aug 2015 11:18:45 +0000 (13:18 +0200)]
Fix T45782: bpy.ops.object.select_by_layer match='SHARED' option is not working.

Looks like some half-done change from enum to bool (or vice-versa), that op was just broken!

4 years agoFix T45775: Bad 'Normal' transform space for edge of non-uniformed scaled object.
Bastien Montagne [Thu, 13 Aug 2015 10:45:13 +0000 (12:45 +0200)]
Fix T45775: Bad 'Normal' transform space for edge of non-uniformed scaled object.

Non-uniform scaled obmat will lead to transformation not preserving angles, so
we must ensure our normal is orthogonal to the edge **after** applying obmat.

4 years agoDisplace Modifier: add an option to displace along (averaged) custom normals, instead...
Bastien Montagne [Wed, 12 Aug 2015 16:21:41 +0000 (18:21 +0200)]
Displace Modifier: add an option to displace along (averaged) custom normals, instead of vertex normals.

User suggestion/request from 'boby'.

4 years agoFix T45739: Number slider precision handling inconsistent between unit systems.
Bastien Montagne [Wed, 12 Aug 2015 14:41:52 +0000 (16:41 +0200)]
Fix T45739: Number slider precision handling inconsistent between unit systems.

When using unit system, step was multiplied by 100, could really not find any good reason to that.
Easy to revert anyway if needed, but in this case please explain why in code. ;)

Investigated and patch by Thomas Radeke (ThomasR), thanks.

4 years agoFix T44049, edge bevel with sometimes breaks UVs.
Howard Trickey [Wed, 12 Aug 2015 14:18:58 +0000 (10:18 -0400)]
Fix T44049, edge bevel with sometimes breaks UVs.
Fairly large changes to bevel code to do a better job
of keeping UVs from crossing islands, etc.
Updated http://wiki.blender.org/index.php/Dev:2.5/Source/Modeling/Bevel
to explain algorithm used for maintaining UVs.
Updated the bevel_regression.blend tests in lib tests.

4 years agoFix 'hard crash' part of T45768 (when merging all vertices of a mesh, we have no...
Bastien Montagne [Wed, 12 Aug 2015 09:42:35 +0000 (11:42 +0200)]
Fix 'hard crash' part of T45768 (when merging all vertices of a mesh, we have no more edges to draw).

4 years agoUsual UI message cleanup/fixes.
Bastien Montagne [Tue, 11 Aug 2015 20:29:16 +0000 (22:29 +0200)]
Usual UI message cleanup/fixes.

4 years agoinstall_deps: fix broken force/skip-osd options.
Bastien Montagne [Tue, 11 Aug 2015 20:08:01 +0000 (22:08 +0200)]
install_deps: fix broken force/skip-osd options.

Bash scripts are such a PITA, having to redefine the options in three different places... :(

4 years agoBGE: Fix delete constraint for replicated physics controllers.
Porteries Tristan [Tue, 11 Aug 2015 19:48:06 +0000 (21:48 +0200)]
BGE: Fix delete constraint for replicated physics controllers.

Replicated controllers didn't free constraints list before.

4 years agoCycles: Enable some extra debug prints for OpenCL kernel loading
Sergey Sharybin [Tue, 11 Aug 2015 16:03:54 +0000 (18:03 +0200)]
Cycles: Enable some extra debug prints for OpenCL kernel loading

4 years agoBGE: Fix T38448: Bullet constraint memory leak.
Porteries Tristan [Tue, 11 Aug 2015 10:56:57 +0000 (12:56 +0200)]
BGE: Fix T38448: Bullet constraint memory leak.

4 years agoAdd WM_event_add/remove_timer_notifier() helpers.
Bastien Montagne [Tue, 11 Aug 2015 10:11:48 +0000 (12:11 +0200)]
Add WM_event_add/remove_timer_notifier() helpers.

This basically does the 'timer' part of Jobs system: it sends a given notifier on every timer step.

This is needed for background tasks (not full-fledged jobs, lighter BLI_tasks based) that want to update UI
(like for up-comming new thumbnail handling in filebrowser).