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).
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... :(
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.
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..
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.
Campbell Barton [Fri, 1 Jul 2016 11:50:53 +0000 (21:50 +1000)]
Add wait cursor toggling dyntopo
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.
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.
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.
Campbell Barton [Fri, 1 Jul 2016 09:47:00 +0000 (19:47 +1000)]
Enable dyntopo re-entering sculpt mode
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.
Alexander Romanov [Thu, 30 Jun 2016 09:40:10 +0000 (12:40 +0300)]
Fix T48757: Broken in D1120 normal baking
Sergey Sharybin [Thu, 30 Jun 2016 09:20:20 +0000 (14:20 +0500)]
Fix T48728, part 2: Vertex colors not shown in texture mode
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.
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.
Campbell Barton [Wed, 29 Jun 2016 22:10:49 +0000 (08:10 +1000)]
Correct fix for MSVC
Bastien Montagne [Wed, 29 Jun 2016 15:57:41 +0000 (17:57 +0200)]
Fix bplayer (c)
Campbell Barton [Wed, 29 Jun 2016 13:22:54 +0000 (23:22 +1000)]
Cleanup: use const
Campbell Barton [Wed, 29 Jun 2016 10:37:54 +0000 (20:37 +1000)]
Cleanup: spelling, indentation
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.
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.
Campbell Barton [Wed, 29 Jun 2016 08:12:59 +0000 (18:12 +1000)]
Cleanup: endian tests
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.
Campbell Barton [Wed, 29 Jun 2016 07:12:22 +0000 (17:12 +1000)]
Cleanup: warning
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.
Campbell Barton [Wed, 29 Jun 2016 02:00:17 +0000 (12:00 +1000)]
UI: prevent softrange from becoming nan
Quiets assert
Campbell Barton [Wed, 29 Jun 2016 01:48:50 +0000 (11:48 +1000)]
Fix T48755: Crash UV unwrapping
Bastien Montagne [Tue, 28 Jun 2016 19:34:18 +0000 (21:34 +0200)]
Usual i18n/UI messages cleanup & fixes.
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
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.
Campbell Barton [Tue, 28 Jun 2016 11:00:00 +0000 (21:00 +1000)]
Cleanup: use bool for writefile
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.
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.
Campbell Barton [Tue, 28 Jun 2016 06:18:17 +0000 (16:18 +1000)]
Fix T48753: VSE must restart for international fonts
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).
Campbell Barton [Tue, 28 Jun 2016 02:36:21 +0000 (12:36 +1000)]
RNA: resolve assert w/ no languages available
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.
Campbell Barton [Tue, 28 Jun 2016 01:58:38 +0000 (11:58 +1000)]
Cleanup: Python imports
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
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.
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/
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.
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.
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.
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.
Joshua Leung [Mon, 27 Jun 2016 03:47:44 +0000 (15:47 +1200)]
Code Cleanup: Use bools not shorts
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
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...).
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. ;)
Sergey Sharybin [Mon, 27 Jun 2016 08:49:25 +0000 (13:49 +0500)]
Cycles: Fix corner case of human readable number returning empty string
Campbell Barton [Mon, 27 Jun 2016 07:09:52 +0000 (17:09 +1000)]
Fix T48717: Modal operators called from Py omit reports from the UI
Campbell Barton [Mon, 27 Jun 2016 06:04:59 +0000 (16:04 +1000)]
Rename script stub
Was clear from name this is to run external scripts.
Campbell Barton [Mon, 27 Jun 2016 05:32:52 +0000 (15:32 +1000)]
Fix T48733: World background fails in 3d-view
Missing from fix for T48555.
Unfortunately duplicates code.
Campbell Barton [Mon, 27 Jun 2016 04:08:36 +0000 (14:08 +1000)]
Fix T48743: Broken menu key accelerators
Regression caused by
fc96110b
Campbell Barton [Mon, 27 Jun 2016 02:54:56 +0000 (12:54 +1000)]
Cleanup: unnecessary NULL check
Campbell Barton [Mon, 27 Jun 2016 03:20:56 +0000 (13:20 +1000)]
Docs: arg names
Campbell Barton [Mon, 27 Jun 2016 01:21:03 +0000 (11:21 +1000)]
Docs: minor edits to writefile comments
Lukas Stockner [Sat, 25 Jun 2016 22:46:27 +0000 (00:46 +0200)]
Fix T48732 v2: New GGX breaks OpenCL kernel
As far as I can see, the second issue there was that the functions receive a pointer to a member variable of the
ShaderData, which is stored in global memory. However, this means that the pointer points to global memory as well,
therefore OpenCL requires the ccl_addr_space "keyword" in front of the pointer.
With this commit, the OpenCL kernels build on Linux with the Intel CPU OpenCL runtime - however, they already did
without the change and I don't have an AMD card, so I can't really test whether the AMD runtime is happy as well now.
Bastien Montagne [Sat, 25 Jun 2016 16:35:54 +0000 (18:35 +0200)]
Cleanup: Get rid of remaining 'BKE_<id>_unlink()' functions, no more used anyway.
Bastien Montagne [Sat, 25 Jun 2016 16:12:23 +0000 (18:12 +0200)]
Cleanup: get rid of BKE_text_unlink(), replace by usage of generic BKE_libblock_... API.
Bastien Montagne [Sat, 25 Jun 2016 15:09:26 +0000 (17:09 +0200)]
Cleanup: remove RNA's `ID.destroy()` function.
We already have Main's ID lists' `remove()` function, better not do the same thing
in two different places!
Bastien Montagne [Sat, 25 Jun 2016 15:01:36 +0000 (17:01 +0200)]
Cleanup/refactor RNA IDs' `remove` functions.
Those (one per ID type!) were uselessly duplicated, and badly inconsistent
(some types were actually unlinking before deletion, others were only working if already unlinked!).
Now we use same func and same API for all types, by default deletion is performed only if ID is no more used,
set `do_unlink` parameter to True to always delete ID even if still in use.
Only exception now is with Scene, since we always want to keep at least one!
Note that this will change default behavior of some types (since unlinking is never done anymore by default).
Campbell Barton [Sat, 25 Jun 2016 11:57:54 +0000 (21:57 +1000)]
CMake: exclude gitignore & arcconfig for addons
These files were included in releases
Campbell Barton [Sat, 25 Jun 2016 11:10:30 +0000 (21:10 +1000)]
Cleanup: remove bad-level call
Campbell Barton [Sat, 25 Jun 2016 10:16:33 +0000 (20:16 +1000)]
GPU: move select index code out of WM
This avoids bad-level calls.
Jens Verwiebe [Sat, 25 Jun 2016 10:39:47 +0000 (12:39 +0200)]
Exclude obsolete static pythonlibs from install
Thomas Dinges [Sat, 25 Jun 2016 09:14:06 +0000 (11:14 +0200)]
Fix T48732, OpenCL compile failure after Multiscatter GGX commit.
Use OpenCL "all" builtin type for conversion, according to OpenCL 1.1 spec 6.3e.
Campbell Barton [Sat, 25 Jun 2016 03:57:35 +0000 (13:57 +1000)]
Fix T48723: Curve bevel creates invalid geometry
Campbell Barton [Sat, 25 Jun 2016 01:24:25 +0000 (11:24 +1000)]
Cleanup: use BLI_bitmap for bevel-split
Bastien Montagne [Fri, 24 Jun 2016 09:00:19 +0000 (11:00 +0200)]
Fix T48725: UI message typo.
Campbell Barton [Fri, 24 Jun 2016 08:59:02 +0000 (18:59 +1000)]
BMesh: avoid redundant calculations comparing angles
Campbell Barton [Fri, 24 Jun 2016 08:58:42 +0000 (18:58 +1000)]
Fix T48716: Knife cut creates inverted normals
In the case of having 3+ boundary edges, we need to find the best.
Campbell Barton [Fri, 24 Jun 2016 00:05:23 +0000 (10:05 +1000)]
Avoid memory leaks on exit during argument parsing
Exiting Blender during argument parsing would leak memory
(tests, documentation generation, utilities).
While harmless, it hides real leaks which should be resolved.
Campbell Barton [Fri, 24 Jun 2016 00:05:18 +0000 (10:05 +1000)]
BKE_blender: Add own atexit functions
Runs before guarded-alloc leaks print.
Campbell Barton [Fri, 24 Jun 2016 00:05:09 +0000 (10:05 +1000)]
Cleanup: use return argument prefix
Lukas Stockner [Thu, 23 Jun 2016 20:56:43 +0000 (22:56 +0200)]
Cycles: Add multi-scattering, energy-conserving GGX as an option to the Glossy, Anisotropic and Glass BSDFs
This commit adds a new distribution to the Glossy, Anisotropic and Glass BSDFs that implements the
multiple-scattering microfacet model described in the paper "Multiple-Scattering Microfacet BSDFs with the Smith Model".
Essentially, the improvement is that unlike classical GGX, which only models single scattering and assumes
the contribution of multiple bounces to be zero, this new model performs a random walk on the microsurface until
the ray leaves it again, which ensures perfect energy conservation.
In practise, this means that the "darkening problem" - GGX materials becoming darker with increasing
roughness - is solved in a physically correct and efficient way.
The downside of this model is that it has no (known) analytic expression for evalation. However, it can be
evaluated stochastically, and although the correct PDF isn't known either, the properties of MIS and the
balance heuristic guarantee an unbiased result at the cost of slightly higher noise.
Reviewers: dingto, #cycles, brecht
Reviewed By: dingto, #cycles, brecht
Subscribers: bliblubli, ace_dragon, gregzaal, brecht, harvester, dingto, marcog, swerner, jtheninja, Blendify, nutel
Differential Revision: https://developer.blender.org/D2002
Joshua Leung [Thu, 23 Jun 2016 15:33:31 +0000 (03:33 +1200)]
GPencil: Eraser respects "Selection Mask" when in EditMode
Joshua Leung [Thu, 23 Jun 2016 15:15:55 +0000 (03:15 +1200)]
Fix minor typo - Was m[3][4] instead of m[4][4] for a 4x4 matrix
Joshua Leung [Thu, 23 Jun 2016 15:07:45 +0000 (03:07 +1200)]
ChildOf Constraint: Hide the Loc/Rot/Scale toggles
The RNA properties are still there (in case you really need them), except now
they will not be shown in the UI anymore, as this constraint really didn't
work well/at all when any of those was disabled. Most people shouldn't really
need to worry about this change.
If anyone wants a matrix-math challenge, they're welcome to try getting those
working for real, so that we can show these toggles again.
Joshua Leung [Thu, 23 Jun 2016 14:57:03 +0000 (02:57 +1200)]
DopeSheet Mask Mode: Circle/Lasso support
Adapted from the code for Grease Pencil (just like the whole mode was)
Joshua Leung [Thu, 23 Jun 2016 14:52:13 +0000 (02:52 +1200)]
DopeSheet: GPencil-Mode supports Circle and Lasso Select
To get this working the least effort, I've had to expose the helper functions
used by the lasso and circle select keyframe-test callbacks (which are generic)
and expose them for use by the GP keyframe editing code too. Hopefully in time
we clean this all up and just write the code once to operate on "keyframes"
Joshua Leung [Thu, 23 Jun 2016 11:16:14 +0000 (23:16 +1200)]
Dopesheet: Lasso and Circle Select tools work for selecting keyframes
This only works in the Action and Dopesheet modes (which operate on FCurve keyframes).
Support for Grease Pencil and Mask Keyframes though is still pending.
Joshua Leung [Thu, 23 Jun 2016 07:36:24 +0000 (19:36 +1200)]
Code Cleanup - Circle/Lasso select in the Graph Editor
Joshua Leung [Sat, 18 Jun 2016 04:52:21 +0000 (16:52 +1200)]
GPencil UI: Streamline toolbar options a bit
As suggested by mendiobox:
* Don't show "enable editing" in the 3D view. You can already do this by switching
into stroke editing mode here, so no need for the duplication. (In other editors
though, this can't be done yet, so we don't do it)
* Make the "Convert" button into a dropdown so that you don't need to deal with a
a separate popup menu
* In the 3D view, don't show the selection + transform operators that can be easily
found in the menus too (as well as having commonly used shortcuts)
Joshua Leung [Sat, 18 Jun 2016 00:58:26 +0000 (12:58 +1200)]
GPencil: Added a new version of the "delete active frame" operator which deletes on all editable layers
This new operator will delete any GP frame it finds on the current frame, regardless
of whether it's on the active layer or not. It will only remove the frames if the
layer is editable, but otherwise, it will just go for it.
The existing operator is great for use in the panel (where it only applies to the active
frame), but it was not so good for all the other places where tools can be invoked
(e.g. D-X, or Delete) as you're typically thinking about the whole scene more holisticaly
than just caring about a particular layer.
Bastien Montagne [Thu, 23 Jun 2016 14:43:12 +0000 (16:43 +0200)]
Fix T48689: Transform proportional size was not seriously clamped.
Now use same, reasonable min/max values, to avoid getting inf or zero values when
using shortcuts during transform operation...
Campbell Barton [Thu, 23 Jun 2016 11:44:22 +0000 (21:44 +1000)]
Fix T48707: Edit-mesh intersect crash
In rare cases intersect would attempt to add edges with the same vertex twice
from edge-vert / edge-edge intersections.
Solve by checking for duplicates when creating vertex-array for these types of intersections
(always under 3x comparisons, so not much overhead).
Campbell Barton [Thu, 23 Jun 2016 12:19:09 +0000 (22:19 +1000)]
Correct recent change to edge-net
Need account for cases where vertex connects a single edge.
Bastien Montagne [Thu, 23 Jun 2016 11:09:32 +0000 (13:09 +0200)]
Fix T48710: 'velocity' particle settings were incorrectly using 'speed' in their tooltips.
Not the same thing, velocity is a vector conveying both speed *and* direction...
Campbell Barton [Thu, 23 Jun 2016 08:43:36 +0000 (18:43 +1000)]
Use hard min/max for view clipping
In rare cases its useful to have far clip below 1.
Campbell Barton [Thu, 23 Jun 2016 02:26:26 +0000 (12:26 +1000)]
Correct assert
Campbell Barton [Thu, 23 Jun 2016 01:52:22 +0000 (11:52 +1000)]
RNA: Expose hook inverse matrix
Needed so scripts don't need to use operators to adjust hook modifiers.
Campbell Barton [Thu, 23 Jun 2016 01:23:31 +0000 (11:23 +1000)]
BLI_array_utils: add BLI_array_rfindindex
Array search from back to front.
Lukas Stockner [Thu, 23 Jun 2016 00:41:46 +0000 (02:41 +0200)]
Cycles: Fix the Convert Node type registration
The function that assigns names to socket types missed an entry, therefore all entries after it were mapped to the wrong name.
Long-term, it might be a better solution to use a map to avoid issues like these, but for now this fix works.
Campbell Barton [Wed, 22 Jun 2016 21:53:49 +0000 (07:53 +1000)]
Fix T48658: Cycles render & render preview corrupts particles
Replaces `G.is_rendering` with `use_render_params` argument.
This is needed for Cycles, which attempts to restore render-preview settings from particles,
after it gets its own particle data, but fails to restore because
`G.is_rendering` was being checked in psys_cache_paths (and other places).
Bastien Montagne [Wed, 22 Jun 2016 16:05:55 +0000 (18:05 +0200)]
ID-Remap, step two: add some user-level tools.
This commit adds operators and Outliner menu entries to reload or relocate a library,
and to delete or replace a datablock.
RNA ID API is also extended to allow ID deletion and remapping from python.
Review task: D2027 (https://developer.blender.org/D2027).
Reviewed by campbellbarton, thanks a bunch.
Bastien Montagne [Wed, 22 Jun 2016 16:04:04 +0000 (18:04 +0200)]
Cleanup: use proper RNA struct type for ListBase type
(otherwise all code using RNA has to link DNA_listbase.h, not clean at all!).
Bastien Montagne [Wed, 22 Jun 2016 15:29:38 +0000 (17:29 +0200)]
ID-Remap - Step one: core work (cleanup and rework of generic ID datablock handling).
This commit changes a lot of how IDs are handled internally, especially the unlinking/freeing
processes. So far, this was very fuzy, to summarize cleanly deleting or replacing a datablock
was pretty much impossible, except for a few special cases.
Also, unlinking was handled by each datatype, in a rather messy and prone-to-errors way (quite
a few ID usages were missed or wrongly handled that way).
One of the main goal of id-remap branch was to cleanup this, and fatorize ID links handling
by using library_query utils to allow generic handling of those, which is now the case
(now, generic ID links handling is only "knwon" from readfile.c and library_query.c).
This commit also adds backends to allow live replacement and deletion of datablocks in Blender
(so-called 'remapping' process, where we replace all usages of a given ID pointer by a new one,
or NULL one in case of unlinking).
This will allow nice new features, like ability to easily reload or relocate libraries, real immediate
deletion of datablocks in blender, replacement of one datablock by another, etc.
Some of those are for next commits.
A word of warning: this commit is highly risky, because it affects potentially a lot in Blender core.
Though it was tested rather deeply, being totally impossible to check all possible ID usage cases,
it's likely there are some remaining issues and bugs in new code... Please report them! ;)
Review task: D2027 (https://developer.blender.org/D2027).
Reviewed by campbellbarton, thanks a bunch.
Lukas Stockner [Wed, 22 Jun 2016 14:10:10 +0000 (16:10 +0200)]
Cycles: Fix crash with Environment Texture and OSL
In the OSL node compilation code for the Environment Texture, is_linear was used as a socket.
However, there was no socket for it, which caused Blender to crash.
Adding a socket doesn't really make sense since it's an internal value and not a parameter
of the node, so it now just uses the variable directly.
Campbell Barton [Wed, 22 Jun 2016 11:20:09 +0000 (21:20 +1000)]
EditMesh: Avoid creating deform-vert layer every redraw
Getting a new edit-derived-bmesh was always creating a deform-vert array, even when it wasn't needed.
Since this was called on redraw, in many cases it was doing it unnecessarily.
Now pass in a custom-data mask and only fill in deform-verts when needed.
Gives noticeable drawing speedup (~10-30% here).