Commit Graph

63572 Commits

Author SHA1 Message Date
Sergey Sharybin
7ab2e73494 Fix T47724: VSE crops video if horizontal resolution isn't divisible by 8
In fact, some areas in FFmpeg might require alignment up to 32, so now we
make temporary conversion in an aligned frame. We only do this if width is
not aligned to 32.
2016-03-15 13:19:49 +05:00
Sergey Sharybin
9ddd83cec2 Fix T47724: VSE crops video if horizontal resolution isn't divisible by 8
Revert "Fix T47724: VSE crops video if horizontal resolution isn't divisible by 8"

This reverts commit 606f6b79eabca236b933dd76e5425162e26ba105.
2016-03-15 12:32:27 +05:00
Campbell Barton
0bf34bbb88 Fix T47759: Mesh 'Select less', leaves isolated verts
Select less in mesh edit-mode would leave selected vertices/edges
in edge/face mode which don't support selecting these elements.
2016-03-15 14:17:54 +11:00
Campbell Barton
ca22dbe2a2 CMake: remove unused libpath's
Also add note that these should be deprecated in favor of absolute libs.
2016-03-15 13:15:26 +11:00
Campbell Barton
7db79ae57a PyAPI: Double performance of Mesh.from_pydata
D1853 by @JacquesLucke

The speedup is mainly possible by using the `foreach_set` method for polygon data.
2016-03-15 10:45:34 +11:00
Bastien Montagne
a078fe3539 Fix T47750: Edited hair: disconnect (and connect!) operator do not support redo.
As suggested by Sergey, do not register those anymore, this way we keep undo step,
but user cannot 'redo' them (does not work, since cached DM in particle modifier data
is not yet re-created by depsgraph update after undo when operator is redone).

UI now has two buttons, one to (dic)connect current psys, the other to (dis)connect all.

Also fixed similar issue with Connect Hair op.
2016-03-14 21:04:30 +01:00
Bastien Montagne
00166ff62e Better fix for T47787 - remove extra user due to 'user_one' as soon as we increase 'real' user count.
This has several benefits:
* User count remains coherent, regardless of the order in which you use 'user_one' & real refcounting users
  (i.e. if you add to group, and then link in scene, or the reverse, you now always get same final user count).
* Avoids the need to check for potential 'user_one' extra user in count in several places in code (e.g. when
  making IDs single users...).
* Users won't wonder why they cannot make 'single user' and ID even though its user count shows '2'!
* readfile.c now always uses code from BKE's library.c when modifying id->us. Which means we can consider
  (asside from assignment during initialization) that id->us is read-only outside of library.c context.

Note that this commit reverts previous one (rB6b1d77a8052b) - please **do not** backport this one in 2.77.
2016-03-14 15:05:52 +01:00
Bastien Montagne
6b1d77a805 Fix T47787: When performing operation 'Make single user' -> 'obj&data', object could be removed from group.
Similar cause as in T47482, we used to have poor handling of 'user_one' cases of ID usage,
leading to inconsistent behavior depending on order of operations e.g.

Here, was object used by a group but not linked in any scene - once linked in scene,
their usercount would be 2, leading to 'making single copy', when it's actually not needed.
We now have better control here, so let's use it!

Note that other ID 'make single user' code will likely need similar fix (Images, etc.).

Safe to be backported to 2.77.
2016-03-14 14:50:16 +01:00
Campbell Barton
2a9bc888d0 Fix T47784: BMesh.from_object broken keyword args 2016-03-15 00:38:33 +11:00
Campbell Barton
a12d42712b Fix T47772: Randomize stroke has direction bias 2016-03-14 21:29:24 +11:00
Sergey Sharybin
e509e911a3 Fix T47785: Rendering Crash, Node Connector Crash, Changing Editors Crash
Regressions after 2.76, to be backported to 2.77.
2016-03-14 14:16:04 +05:00
Campbell Barton
a686aa3477 Support mdisps for Mesh.flip_normals() 2016-03-14 15:34:03 +11:00
Campbell Barton
b9ae96dc12 Cleanup: move MDisps flipping to own function 2016-03-14 15:33:54 +11:00
Campbell Barton
66043cc6c1 Fix T47788: Symmetrize flips multi-res data
Symmetrize was unusable with multi-res data,
add an option for the bmesh operator not to flip the multi-res depth.
2016-03-14 14:21:16 +11:00
Campbell Barton
0024768f88 Cleanup: style/spelling 2016-03-14 13:21:13 +11:00
Bastien Montagne
34fe03c7f2 Fix T47773: Particle System with Boids Crash.
Problem was, during initialization of boids particles in `dynamics_step()`,
psys of target objects was not obtained with generic `psys_get_target_system()`
as later in code, which could lead to some uninitialized `psys->tree` usage...

Think it's safe enough for 2.77, though not a regression.
2016-03-13 18:21:30 +01:00
Bastien Montagne
ed28134f71 Fix bplayer (c) 2016-03-13 15:44:27 +01:00
Joshua Leung
9779d1558a Default Keyframe Type: Some UI tweaks
* Don't show name of keyframe type in timeline header. It's getting a bit too crowded
  for that, so just show the keyframe icon. Hopefully that will be enough.

* Tweaked the tooltip and label to make it clearer what the setting is for
2016-03-14 01:04:39 +13:00
Joshua Leung
0e1b4e10a2 Fixed some type mismatch errors, missed earlier
(CMake MSVC's output makes it really difficult to spot errors when they occur!)
2016-03-14 01:01:43 +13:00
Joshua Leung
6bf9aa3f8e Fancy procedural icons for Keyframe Types
The new "default keyframe type" dropdown on the timeline header
(and also the "Keyframe Type" operator/properties in other places)
now has procedurally generated icons which reflect what that keyframe
type will look like when rendered in the Dope Sheet.

This was achieved using the ancient "VICON" (vector icon) stuff
that's lurking around in the dark parts of UI code. From memory,
the only other things that use (or used to use) this stuff included
some of the triangle icons for some dropdown buttons, or something
like that.

Notes:
* Theme colour changes are reflected immediately by these icons.
  This is possible because they are all drawn procedurally
* These icons scale with the DPI setting. I manually guessed the size of
  these icons. They can be adjusted further if needed.
* I've documented the steps for adding voodoo icons like this on the wiki
  (http://wiki.blender.org/index.php/Dev:2.7/Source/Checklists/Vector_Icon)
* It's true that the rendering of these keyframes doesn't quite fit the rest
  of the icons in the UI. However, since we're just leveraging the standard
  keyframe drawing methods (to avoid discreptancies between the two), we'll
  leave it as such for now. Maybe later we can consider blending in a bit of
  the glossy keyframe icons in the Icon Sheet?
2016-03-14 00:56:52 +13:00
Joshua Leung
81e7f6b8a0 More compile fixes - Game Engine 2016-03-13 23:34:42 +13:00
Joshua Leung
6ba8eb17f5 Compile fix for Linux 2016-03-13 23:22:15 +13:00
Philipp Oeser
8d91864242 Fix T47760: Toggling GPencil's "Selection Mask" via Python does not update UI
Add rna updates to greasepencil sculpt properties

D1849 by @lichtwerk, reviewed by @aligorith
2016-03-13 19:14:24 +13:00
Joshua Leung
570fbba3f3 Keyframing: Added ToolSetting for choosing default keyframe type
To make it easier for animators working in a multipass pose-to-pose workflow
when inserting breakdown keyframes and so forth, it is now possible to specify
the "type" of keyframe being created (i.e. the colour of the keyframe, when drawn
in the Dope Sheet).

Usage:
1) Choose the type of keyframe ("Keyframe", "Breakdown", "Extreme", etc.) from
   the new dropdown located between the AutoKeying and KeyingSet widgets on the
   timeline header.
2) Insert keyframes
3) Rejoyce that your newly created keyframes have now been coloured for you already
   in the DopeSheet.

Todo:
* Look into a way of using the actual keyframe colours (from the theme) for the icons
  of these types.
2016-03-13 18:28:30 +13:00
Campbell Barton
b10e3cc997 Cleanup: warning 2016-03-13 15:15:38 +11:00
Campbell Barton
d5253aaf9d CMake: use CXX for C++ in var name
Follow convention cmake uses.
2016-03-13 15:03:04 +11:00
Jack Andersen
861616bf69 Full Inverse-Quadratic-Equation Lamp Falloff
This patch adds a new `falloff_type` ('Inverse Coefficients') for Lamps in
Blender-Internal and GLSL.

The current falloff modes use a formula like this inverse-square one:

`I = E × (D^2 / (D^2 + Q × r^2))`

While such a formula is simple for 3D-artists to use, it's algebraically
cumbersome to work with. Game-designers authoring their own shaders
could benefit much more by having direct control of falloff-coefficients:

`I = E × (1.0 / (coefC + coefL × r + coefQ × r^2))`

In this mode, the `distance` parameter is unused (except for 'Sphere'
mode); instead relying on the designer to mathematically-model the
falloff-behavior.

The UI has been patched like so:
{F153843}

Reviewers: brecht, psy-fi

Reviewed By: psy-fi

Subscribers: brita_, antidote, campbellbarton, psy-fi

Differential Revision: https://developer.blender.org/D1194
2016-03-13 02:05:36 +01:00
Julian Eisel
989b0e472e Increase node max width to 700px
Opened and collapsed nodes now have a max width of 700px. Animation nodes add-on needs this.
2016-03-12 19:12:32 +01:00
Bastien Montagne
681becb359 Fix related to T47750: Particle disconnect operator: 'all hair' disabled would not work correctly after first op execution.
This is side issue, main one remains and does not look easy to fix, see report for details.
2016-03-12 18:55:49 +01:00
Sergey Sharybin
b20f12d835 Cycles: Some typo fixes 2016-03-12 15:01:20 +05:00
Sergey Sharybin
d652833a17 Cycles: Support parallel convergence mode for spherical stereo 2016-03-12 15:01:20 +05:00
Sergey Sharybin
7d82de9e84 Fix bad UI range of convergence distance which was above the hard limit
That was rather confusing to slide the value.

Perhaps makesrna can check cases like this?
2016-03-12 15:01:20 +05:00
Sergey Sharybin
6b91fb706d Cycles: Optimize derivatives calculation by using pre-calculated dx/dy
We've got pixel-wide world-space derivatives which we can use in the
perspective camera sampling. This allows to get rid of two calls to
transform_direction() function.

In theory we can save two transform_perspective() calls if we'll also
save pre-calculated camera-space dx/dy.
2016-03-12 15:01:20 +05:00
Sergey Sharybin
a8c87bad22 Cycles: Cleanup, spherical_stereo_direction will return normalized direction
Previously each call of this function was followed by a normaliztion, now it
is done in the function itself with an according note around the function.
2016-03-12 15:01:20 +05:00
Bastien Montagne
e327fb522a Fix T47763: 2.77 RC2 (Fluid) Particle Baking slower compared to 2.67b.
Static schedule was responsible here...

Also, made a minor optimization in case adaptative (auto) subframes are enabled,
gives a few percent of speedup here.
2016-03-12 09:14:30 +01:00
Thomas Dinges
93895420eb Cycles: Do no limit viewport samples to USHRT_MAX when value is at 0.
We don't limit manually setting higher values, this was probably overlooked here.

Found by @Blendify in IRC.
2016-03-11 21:36:07 +01:00
Bastien Montagne
1394369332 Fix crash adding EditNormals modifier to NURBS object (or other types but mesh).
Kinda stupid, but that eModifierTypeFlag_AcceptsCVs could really use a comment alongside
its definition!

Safe to be backported to 2.77.
2016-03-11 15:31:30 +01:00
Campbell Barton
da9f0a507c Minor improvement to last commit
Sign is known in this case, no need  to check for either direction.
2016-03-12 01:12:51 +11:00
Campbell Barton
8accc19d5d Math Lib: less complex convex quad check 2016-03-11 23:41:50 +11:00
Campbell Barton
59c47ecf90 Revert "Use render path as initial location when saving renders"
This reverts commit cd6442f7d4b56cb40102d86404fbaeae30dd2d32.

Broke workflow for incrementally saving versions of a render.
2016-03-11 22:14:45 +11:00
Sergey Sharybin
758b20b8ca Cycles: One more optimization fix, derivatives used to be calculated without aperture
At this point it's totally unclear why we're ignoring aperture and and rolling shutter
now for derivatives calculation but do not ignore direction change caused by stereo.
2016-03-11 15:23:31 +05:00
Sergey Sharybin
086de5b5e3 CMake: Warn when buildinfo is disabled due to missing Git 2016-03-11 14:49:23 +05:00
Sergey Sharybin
cc2138888a CMake: Avoid call of find_package(Git) for every compile with buildinfo enabled
This is a bit tricky, find_package(Git) was only used to check if git is installed
and actual git command was assumed to be in the PATH (while ideally it should have
been GIT_COMMAND variable).

This commit makes re-compile output cleaner, especially when using Ninja.

Adding proper GIT_COMMAND to buildinfo.cmake is also possible via argument.

Reviewers: campbellbarton

Reviewed By: campbellbarton

Differential Revision: https://developer.blender.org/D1847
2016-03-11 14:46:18 +05:00
Sergey Sharybin
e7eb91365b Cycles: Fix bug calculating dP for perspective camera
Was introduced by recent optimization. Not really sure derivatives are
intended to work like this, but better to stick to what Dalai had
originally for now.
2016-03-11 14:45:35 +05:00
Sergey Sharybin
ebe306b8d2 Cycles: Cleanup, redundant normalization 2016-03-11 14:45:35 +05:00
Campbell Barton
c149b6b7d7 Fix T47753: World equirectangular regression
D1729 fixed 'View' projection but broke 'Equirectangular'.

This commit also changes equirectangular projection to match Cycles and the viewport.
2016-03-11 20:36:59 +11:00
Martijn Berger
b5b269ac11 Fix compilation of cycles standalone and network device 2016-03-11 10:00:47 +01:00
Sergey Sharybin
0922b6d6de Cycles: Fix border render after spherical stereo commit
Buffer params needs to know camera's border, otherwise it'll create full buffer.

There might be some issues with stereo camera still, but in worst case it'll
only update camera twice as far as i can tell. Not ideal, but better than no
border render at all.
2016-03-11 12:58:28 +05:00
Sybren A. Stüvel
9f8311ee88 Include requests' cacert.pem file
This allows us to verify certificates of HTTPS connections, which is
mandatory for logins like on Blender ID.

Reviewers: campbellbarton

Differential Revision: https://developer.blender.org/D1845
2016-03-11 07:58:05 +01:00
Mitchell Stokes
4af287fc9c BGE: Fix memory leak in VBO code 2016-03-10 19:41:45 -08:00