blender.git
5 years agoUI: multi word filtering in search menu
Campbell Barton [Wed, 23 Mar 2016 07:45:32 +0000 (18:45 +1100)]
UI: multi word filtering in search menu

D1080 by @rockets, with own improvements to tests

5 years agoCleanup: style
Campbell Barton [Tue, 22 Mar 2016 17:47:16 +0000 (04:47 +1100)]
Cleanup: style

5 years agoCleanup: style (80-width)
Campbell Barton [Tue, 22 Mar 2016 17:25:08 +0000 (04:25 +1100)]
Cleanup: style (80-width)

5 years agoFix incorrect strncat use
Campbell Barton [Tue, 22 Mar 2016 16:54:04 +0000 (03:54 +1100)]
Fix incorrect strncat use

5 years agoFix T47830: Multi-edit w/ ui-list wont highlight
Campbell Barton [Tue, 22 Mar 2016 16:37:23 +0000 (03:37 +1100)]
Fix T47830: Multi-edit w/ ui-list wont highlight

Regression from 4d6b892.

5 years agoWeight Paint: support accumulate for blur brush
Campbell Barton [Tue, 22 Mar 2016 14:22:26 +0000 (01:22 +1100)]
Weight Paint: support accumulate for blur brush

This re-applies smoothing based on the previous update.

Can smooth more but harder to get such even distribution.

5 years agoFix for crash of point density textures due to undefined `point_data` on loading.
Lukas Tönne [Tue, 22 Mar 2016 14:07:56 +0000 (15:07 +0100)]
Fix for crash of point density textures due to undefined `point_data` on loading.

5 years agoWeight Paint: blur now smooths connected weights
Campbell Barton [Tue, 22 Mar 2016 11:14:26 +0000 (22:14 +1100)]
Weight Paint: blur now smooths connected weights

Previously it would average all points under the brush, giving an off feedback loop that often depended on the
direction of the brush stroke, giving not-very-useful smearing effect.

Now blend brush smooths between connected edges.

5 years agoMesh API: add BKE_mesh_vert_edge_vert_map_create
Campbell Barton [Tue, 22 Mar 2016 11:07:45 +0000 (22:07 +1100)]
Mesh API: add BKE_mesh_vert_edge_vert_map_create

Handy when you need to reference connected verts directly.

5 years agoFix T47882: startup camera not upright
Campbell Barton [Tue, 22 Mar 2016 06:22:41 +0000 (17:22 +1100)]
Fix T47882: startup camera not upright

5 years agoCleanup: reduce scope for versioning vars
Campbell Barton [Tue, 22 Mar 2016 06:18:35 +0000 (17:18 +1100)]
Cleanup: reduce scope for versioning vars

5 years agoFix add mesh template
Bassam Kurdali [Mon, 21 Mar 2016 16:51:48 +0000 (03:51 +1100)]
Fix add mesh template

5 years agoGPU compositing:
Antony Riakiotakis [Sun, 20 Mar 2016 23:53:48 +0000 (00:53 +0100)]
GPU compositing:

Minor optimization: Store the uniform interface of shaders instead of
re-querying every frame.

5 years agoFix T47842: UV sculpt brush widgets are available when not in uv sculpt mode.
Philipp Oeser [Mon, 21 Mar 2016 14:45:16 +0000 (15:45 +0100)]
Fix T47842: UV sculpt brush widgets are available when not in uv sculpt mode.

rB5b3af3dd made the poll function here slightly too laxist.

To be backported to 2.77 should we make an 'a' release.

Reviewed By: mont29

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

5 years agoMirror influence of environment texture in Blender viewport
Alexander Romanov [Mon, 21 Mar 2016 11:36:33 +0000 (14:36 +0300)]
Mirror influence of environment texture in Blender viewport

This patch implements Mirror influence for environment textures. Approach matches the one from BI.
{F281871}
See the video https://youtu.be/BskgCv6dcIE
Example: {F281876}
Alexander (Blend4Web Team)

Reviewers: campbellbarton, merwin, brecht

Reviewed By: brecht

Subscribers: TwisterGE, blueprintrandom, youle, Evgeny_Rodygin, AlexKowel, yurikovelenov

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

5 years agoFix T47862: VSE hard cut fails
Campbell Barton [Mon, 21 Mar 2016 08:22:39 +0000 (19:22 +1100)]
Fix T47862: VSE hard cut fails

Regression caused by changing how video length is calculated,
however similar problems could be caused by strip length changing on-disk.

5 years agoFix T47848: Fix regression in sequencer GL render
Campbell Barton [Mon, 21 Mar 2016 05:36:20 +0000 (16:36 +1100)]
Fix T47848: Fix regression in sequencer GL render

Own changes in 2.77 broke off-screen render with scene render size doesn't match output.

5 years agoGPU: avoid redundant logic for non-spot lamps
Campbell Barton [Mon, 21 Mar 2016 05:06:04 +0000 (16:06 +1100)]
GPU: avoid redundant logic for non-spot lamps

5 years agoFix for non spot lamps calculating spot values
Campbell Barton [Mon, 21 Mar 2016 05:01:26 +0000 (16:01 +1100)]
Fix for non spot lamps calculating spot values

Logical error in D1378, also incorrectly used lamp type as a flag.

5 years agoCorrect strange icon scaling in preferences
Campbell Barton [Mon, 21 Mar 2016 04:33:59 +0000 (15:33 +1100)]
Correct strange icon scaling in preferences

5 years agoFix T47868: Check Box shape doesn't scale
Campbell Barton [Mon, 21 Mar 2016 04:16:43 +0000 (15:16 +1100)]
Fix T47868: Check Box shape doesn't scale

5 years agoDocs: add missing bmesh.ops descriptions
Campbell Barton [Sun, 20 Mar 2016 08:40:03 +0000 (19:40 +1100)]
Docs: add missing bmesh.ops descriptions

5 years agoFix T47837: Filtering UIList broken with recent master.
Bastien Montagne [Sat, 19 Mar 2016 16:06:32 +0000 (17:06 +0100)]
Fix T47837: Filtering UIList broken with recent 

Using 32nd bit of integer with our int RNA prop is not a good idea, it does not
really support unsigned int even with PROP_UNSIGNED type...

Most likely this has been unveiled by recent work over property clamping in RNA.

Not critical, but should be backported should we make an 'a' release.

5 years agomathutils.bvhtree: Add find_nearest_range API call
Campbell Barton [Sat, 19 Mar 2016 07:29:47 +0000 (18:29 +1100)]
mathutils.bvhtree: Add find_nearest_range API call

Returns all elements within a radius.
Similar to kdtree.find_range

5 years agoBLI_kdopbvh: Pass center to to range callback
Campbell Barton [Sat, 19 Mar 2016 06:16:50 +0000 (17:16 +1100)]
BLI_kdopbvh: Pass center to to range callback

Useful when BLI_bvhtree_range_query callback calculates a new position to measure from.

5 years agoFix: "pchan_name" field in SDNA for names of bone targets for drivers was too short
Joshua Leung [Sat, 19 Mar 2016 04:48:29 +0000 (17:48 +1300)]
Fix: "pchan_name" field in SDNA for names of bone targets for drivers was too short

When all the names in Blender were updated to go from having 32 characters to 64,
the "pchan_name" field in the DriverTarget struct was missed. This meant that if you
had a bone with a suitably long name, it would have been impossible to use values from this
bone in a driver.

The only reason this probably hasn't been discovered yet is because the standard/old depsgraph
doesn't work that well for bones in the same armatures, so setups where this may have
occurred are not that common.

To prevent this problem from happening in future, I've added the standard "MAX_ID_NAME-2"
comment to the comments on each line likely to be impacted by such changes, making it
easier for whoever does a search and replace in future :)

5 years agoSequencer: expose GL preview alpha in scene UI
Campbell Barton [Fri, 18 Mar 2016 09:03:24 +0000 (20:03 +1100)]
Sequencer: expose GL preview alpha in scene UI

While this isn't essential, accessing this setting required navigating to each scene and using render menu.
Expose in sequencer UI for more convenient access.

5 years agoFix T47806: Blender animation player stop working correctly with XVID codec
Sergey Sharybin [Fri, 18 Mar 2016 06:50:06 +0000 (11:50 +0500)]
Fix T47806: Blender animation player stop working correctly with XVID codec

Something weird, seems some buffers _might_ be shared between codec context
and frame, which is quite weird. Could be a bug in FFmpeg or could be wrong
API usage somewhere else..

5 years agoFix T47827: Single Channel Preview Error
Campbell Barton [Thu, 17 Mar 2016 12:52:49 +0000 (23:52 +1100)]
Fix T47827: Single Channel Preview Error

Fix by @sergey with own fix for big endian.

5 years agoImBuf: Some tweaks to FFmpeg frame free policy
Sergey Sharybin [Thu, 17 Mar 2016 09:45:10 +0000 (14:45 +0500)]
ImBuf: Some tweaks to FFmpeg frame free policy

Th intention is to make sure we don't free buffers which were not allocated
by FFmpeg.

This is a possible fix for T47806.

5 years agoSequencer: add frame-jump to menu
Campbell Barton [Wed, 16 Mar 2016 23:57:40 +0000 (10:57 +1100)]
Sequencer: add frame-jump to menu

5 years agoFix missing 'anim_data' in RNA API of Freestyle's linestyle.
Bastien Montagne [Wed, 16 Mar 2016 19:19:57 +0000 (20:19 +0100)]
Fix missing 'anim_data' in RNA API of Freestyle's linestyle.

Reported by Manuel Rais on ML, thanks.

5 years agoSequencer: Alt-RMB select handle now always selects strip
Campbell Barton [Wed, 16 Mar 2016 13:26:50 +0000 (00:26 +1100)]
Sequencer: Alt-RMB select handle now always selects strip

Was possible to do Alt-RMB on a strips handle - which only make the strip active (but didn't select).
This isn't really useful, so just select the strip and its handles in this case.

5 years agoFix T47818: GPencil Sculpt Brush settings update when adjusted using scrollwheel...
Joshua Leung [Wed, 16 Mar 2016 12:12:30 +0000 (01:12 +1300)]
Fix T47818: GPencil Sculpt Brush settings update when adjusted using scrollwheel while sculpting

5 years agoFix text on collapsed node not positioned correctly with high DPI
Julian Eisel [Wed, 16 Mar 2016 11:51:15 +0000 (12:51 +0100)]
Fix text on collapsed node not positioned correctly with high DPI

Reported by @JacquesLucke via IRC, thx!

5 years agoFix T47807: Toggle header shortcut doesn't work
Campbell Barton [Wed, 16 Mar 2016 00:33:32 +0000 (11:33 +1100)]
Fix T47807: Toggle header shortcut doesn't work

5 years agoCMake: only show py module install options when used
Campbell Barton [Tue, 15 Mar 2016 12:50:44 +0000 (23:50 +1100)]
CMake: only show py module install options when used

5 years agoFix T47734: Rest Position is not working with new Deps
Sergey Sharybin [Tue, 15 Mar 2016 11:13:00 +0000 (16:13 +0500)]
Fix T47734: Rest Position is not working with new Deps

5 years agoFix T47780: Icons don't update in floating panels
Campbell Barton [Tue, 15 Mar 2016 10:12:37 +0000 (21:12 +1100)]
Fix T47780: Icons don't update in floating panels

5 years agoFix T47577: Movie clip uses too much memory with still image sequences
Sergey Sharybin [Tue, 15 Mar 2016 10:07:18 +0000 (15:07 +0500)]
Fix T47577: Movie clip uses too much memory with still image sequences

5 years agomovieclip: Cleanup around cache
Sergey Sharybin [Tue, 15 Mar 2016 09:59:59 +0000 (14:59 +0500)]
movieclip: Cleanup around cache

Should be no functional changes.

5 years agoCleanup some warnings
Sergey Sharybin [Tue, 15 Mar 2016 09:16:16 +0000 (14:16 +0500)]
Cleanup some warnings

5 years agoImBuf: Use proper function to free FFmpeg frames
Sergey Sharybin [Tue, 15 Mar 2016 08:39:39 +0000 (13:39 +0500)]
ImBuf: Use proper function to free FFmpeg frames

5 years agoFix T47724: VSE crops video if horizontal resolution isn't divisible by 8
Sergey Sharybin [Tue, 15 Mar 2016 08:19:49 +0000 (13:19 +0500)]
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.

5 years agoFix T47724: VSE crops video if horizontal resolution isn't divisible by 8
Sergey Sharybin [Tue, 15 Mar 2016 07:32:27 +0000 (12:32 +0500)]
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.

5 years agoFix T47759: Mesh 'Select less', leaves isolated verts
Campbell Barton [Tue, 15 Mar 2016 03:17:54 +0000 (14:17 +1100)]
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.

5 years agoCMake: remove unused libpath's
Campbell Barton [Tue, 15 Mar 2016 02:15:26 +0000 (13:15 +1100)]
CMake: remove unused libpath's

Also add note that these should be deprecated in favor of absolute libs.

5 years agoPyAPI: Double performance of Mesh.from_pydata
Campbell Barton [Mon, 14 Mar 2016 23:41:36 +0000 (10:41 +1100)]
PyAPI: Double performance of Mesh.from_pydata

D1853 by @JacquesLucke

The speedup is mainly possible by using the `foreach_set` method for polygon data.

5 years agoFix T47750: Edited hair: disconnect (and connect!) operator do not support redo.
Bastien Montagne [Mon, 14 Mar 2016 20:04:30 +0000 (21:04 +0100)]
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.

5 years agoBetter fix for T47787 - remove extra user due to 'user_one' as soon as we increase...
Bastien Montagne [Mon, 14 Mar 2016 14:05:52 +0000 (15:05 +0100)]
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.

5 years agoFix T47787: When performing operation 'Make single user' -> 'obj&data', object could...
Bastien Montagne [Mon, 14 Mar 2016 13:44:11 +0000 (14:44 +0100)]
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.

5 years agoFix T47784: BMesh.from_object broken keyword args
Campbell Barton [Mon, 14 Mar 2016 13:38:33 +0000 (00:38 +1100)]
Fix T47784: BMesh.from_object broken keyword args

5 years agoFix T47772: Randomize stroke has direction bias
Campbell Barton [Mon, 14 Mar 2016 10:27:56 +0000 (21:27 +1100)]
Fix T47772: Randomize stroke has direction bias

5 years agoFix T47785: Rendering Crash, Node Connector Crash, Changing Editors Crash
Sergey Sharybin [Mon, 14 Mar 2016 09:16:04 +0000 (14:16 +0500)]
Fix T47785: Rendering Crash, Node Connector Crash, Changing Editors Crash

Regressions after 2.76, to be backported to 2.77.

5 years agoSupport mdisps for Mesh.flip_normals()
Campbell Barton [Mon, 14 Mar 2016 04:32:48 +0000 (15:32 +1100)]
Support mdisps for Mesh.flip_normals()

5 years agoCleanup: move MDisps flipping to own function
Campbell Barton [Mon, 14 Mar 2016 04:17:29 +0000 (15:17 +1100)]
Cleanup: move MDisps flipping to own function

5 years agoFix T47788: Symmetrize flips multi-res data
Campbell Barton [Mon, 14 Mar 2016 03:15:56 +0000 (14:15 +1100)]
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.

5 years agoCleanup: style/spelling
Campbell Barton [Mon, 14 Mar 2016 02:21:13 +0000 (13:21 +1100)]
Cleanup: style/spelling

5 years agoFix T47773: Particle System with Boids Crash.
Bastien Montagne [Sun, 13 Mar 2016 17:21:30 +0000 (18:21 +0100)]
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.

5 years agoFix bplayer (c)
Bastien Montagne [Sun, 13 Mar 2016 14:44:06 +0000 (15:44 +0100)]
Fix bplayer (c)

5 years agoDefault Keyframe Type: Some UI tweaks
Joshua Leung [Sun, 13 Mar 2016 12:04:39 +0000 (01:04 +1300)]
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

5 years agoFixed some type mismatch errors, missed earlier
Joshua Leung [Sun, 13 Mar 2016 12:01:43 +0000 (01:01 +1300)]
Fixed some type mismatch errors, missed earlier

(CMake MSVC's output makes it really difficult to spot errors when they occur!)

5 years agoFancy procedural icons for Keyframe Types
Joshua Leung [Sun, 13 Mar 2016 11:56:52 +0000 (00:56 +1300)]
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?

5 years agoMore compile fixes - Game Engine
Joshua Leung [Sun, 13 Mar 2016 10:34:42 +0000 (23:34 +1300)]
More compile fixes - Game Engine

5 years agoCompile fix for Linux
Joshua Leung [Sun, 13 Mar 2016 10:22:15 +0000 (23:22 +1300)]
Compile fix for Linux

5 years agoFix T47760: Toggling GPencil's "Selection Mask" via Python does not update UI
Philipp Oeser [Sun, 13 Mar 2016 06:13:50 +0000 (19:13 +1300)]
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

5 years agoKeyframing: Added ToolSetting for choosing default keyframe type
Joshua Leung [Sat, 12 Mar 2016 14:49:26 +0000 (03:49 +1300)]
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.

5 years agoCleanup: warning
Campbell Barton [Sun, 13 Mar 2016 04:15:38 +0000 (15:15 +1100)]
Cleanup: warning

5 years agoCMake: use CXX for C++ in var name
Campbell Barton [Sun, 13 Mar 2016 04:01:52 +0000 (15:01 +1100)]
CMake: use CXX for C++ in var name

Follow convention cmake uses.

5 years agoFull Inverse-Quadratic-Equation Lamp Falloff
Jack Andersen [Sun, 13 Mar 2016 01:00:12 +0000 (02:00 +0100)]
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

5 years agoIncrease node max width to 700px
Julian Eisel [Sat, 12 Mar 2016 18:10:36 +0000 (19:10 +0100)]
Increase node max width to 700px

Opened and collapsed nodes now have a max width of 700px. Animation nodes add-on needs this.

5 years agoFix related to T47750: Particle disconnect operator: 'all hair' disabled would not...
Bastien Montagne [Sat, 12 Mar 2016 17:55:49 +0000 (18:55 +0100)]
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.

5 years agoCycles: Some typo fixes
Sergey Sharybin [Sat, 12 Mar 2016 10:00:06 +0000 (15:00 +0500)]
Cycles: Some typo fixes

5 years agoCycles: Support parallel convergence mode for spherical stereo
Sergey Sharybin [Fri, 11 Mar 2016 16:58:47 +0000 (21:58 +0500)]
Cycles: Support parallel convergence mode for spherical stereo

5 years agoFix bad UI range of convergence distance which was above the hard limit
Sergey Sharybin [Fri, 11 Mar 2016 16:46:40 +0000 (21:46 +0500)]
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?

5 years agoCycles: Optimize derivatives calculation by using pre-calculated dx/dy
Sergey Sharybin [Fri, 11 Mar 2016 16:41:16 +0000 (21:41 +0500)]
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.

5 years agoCycles: Cleanup, spherical_stereo_direction will return normalized direction
Sergey Sharybin [Fri, 11 Mar 2016 16:22:19 +0000 (21:22 +0500)]
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.

5 years agoFix T47763: 2.77 RC2 (Fluid) Particle Baking slower compared to 2.67b.
Bastien Montagne [Sat, 12 Mar 2016 08:09:29 +0000 (09:09 +0100)]
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.

5 years agoCycles: Do no limit viewport samples to USHRT_MAX when value is at 0.
Thomas Dinges [Fri, 11 Mar 2016 20:33:56 +0000 (21:33 +0100)]
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.

5 years agoFix crash adding EditNormals modifier to NURBS object (or other types but mesh).
Bastien Montagne [Fri, 11 Mar 2016 14:30:04 +0000 (15:30 +0100)]
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.

5 years agoMinor improvement to last commit
Campbell Barton [Fri, 11 Mar 2016 14:12:51 +0000 (01:12 +1100)]
Minor improvement to last commit

Sign is known in this case, no need  to check for either direction.

5 years agoMath Lib: less complex convex quad check
Campbell Barton [Fri, 11 Mar 2016 12:41:50 +0000 (23:41 +1100)]
Math Lib: less complex convex quad check

5 years agoRevert "Use render path as initial location when saving renders"
Campbell Barton [Fri, 11 Mar 2016 11:13:28 +0000 (22:13 +1100)]
Revert "Use render path as initial location when saving renders"

This reverts commit cd6442f7d4b56cb40102d86404fbaeae30dd2d32.

Broke workflow for incrementally saving versions of a render.

5 years agoCycles: One more optimization fix, derivatives used to be calculated without aperture
Sergey Sharybin [Fri, 11 Mar 2016 10:23:31 +0000 (15:23 +0500)]
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.

5 years agoCMake: Warn when buildinfo is disabled due to missing Git
Sergey Sharybin [Fri, 11 Mar 2016 09:49:23 +0000 (14:49 +0500)]
CMake: Warn when buildinfo is disabled due to missing Git

5 years agoCMake: Avoid call of find_package(Git) for every compile with buildinfo enabled
Sergey Sharybin [Fri, 11 Mar 2016 08:05:44 +0000 (13:05 +0500)]
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

5 years agoCycles: Fix bug calculating dP for perspective camera
Sergey Sharybin [Fri, 11 Mar 2016 09:43:41 +0000 (14:43 +0500)]
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.

5 years agoCycles: Cleanup, redundant normalization
Sergey Sharybin [Fri, 11 Mar 2016 09:12:10 +0000 (14:12 +0500)]
Cycles: Cleanup, redundant normalization

5 years agoFix T47753: World equirectangular regression
Campbell Barton [Fri, 11 Mar 2016 09:30:26 +0000 (20:30 +1100)]
Fix T47753: World equirectangular regression

D1729 fixed 'View' projection but broke 'Equirectangular'.

This commit also changes equirectangular projection to match Cycles and the viewport.

5 years agoFix compilation of cycles standalone and network device
Martijn Berger [Fri, 11 Mar 2016 09:00:47 +0000 (10:00 +0100)]
Fix compilation of cycles standalone and network device

5 years agoCycles: Fix border render after spherical stereo commit
Sergey Sharybin [Fri, 11 Mar 2016 07:57:02 +0000 (12:57 +0500)]
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.

5 years agoInclude requests' cacert.pem file
Sybren A. Stüvel [Thu, 10 Mar 2016 15:58:09 +0000 (16:58 +0100)]
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

5 years agoBGE: Fix memory leak in VBO code
Mitchell Stokes [Fri, 11 Mar 2016 03:05:24 +0000 (19:05 -0800)]
BGE: Fix memory leak in VBO code

5 years agoBGE: Fix animations when using VBOs
Mitchell Stokes [Thu, 10 Mar 2016 04:44:14 +0000 (20:44 -0800)]
BGE: Fix animations when using VBOs

5 years agoFix T47749: Crash subdividing wire edge w/ mdisps
Campbell Barton [Thu, 10 Mar 2016 23:28:44 +0000 (10:28 +1100)]
Fix T47749: Crash subdividing wire edge w/ mdisps

5 years agoCycles: Optimize spherical stereo position when no spherical stereo is used
Sergey Sharybin [Thu, 10 Mar 2016 17:03:03 +0000 (22:03 +0500)]
Cycles: Optimize spherical stereo position when no spherical stereo is used

5 years agoCycles: Simplify perspective camera derivatives calculation
Sergey Sharybin [Thu, 10 Mar 2016 16:47:44 +0000 (21:47 +0500)]
Cycles: Simplify perspective camera derivatives calculation

Probably some further simplification is possible, will look into this later.
Alternatively will get rid of KernelCamera.{dx, dy}.

5 years agoText Editor: Auto indent for backspace/delete
Campbell Barton [Thu, 10 Mar 2016 13:04:13 +0000 (00:04 +1100)]
Text Editor: Auto indent for backspace/delete

Editing with spaces + auto-indent didn't delete indentation as expected.

5 years agoMulti-View: Cycles - Spherical Stereo support (VR Panoramas)
Dalai Felinto [Thu, 10 Mar 2016 12:28:29 +0000 (09:28 -0300)]
Multi-View: Cycles - Spherical Stereo support (VR Panoramas)

This is a new option for panorama cameras to render
stereo that can be used in virtual reality devices

The option is available under the camera panel when Multi-View is enabled (Views option in the Render Layers panel)

Known limitations:
------------------
* Parallel convergence is not supported (you need to set a convergence distance really high to simulate this effect).

* Pivot was not supposed to affect the render but it does, this has to be looked at, but for now set it to CENTER

* Derivatives in perspective camera need to be pre-computed or we shuld get rid of kcam->dx/dy (Sergey words, I don't fully grasp the implication shere)

* This works in perspective mode and in panorama mode. However, for fully benefit from this effect in perspective mode you need to render a cube map. (there is an addon for this, developed separately, perhaps we could include it in master).

* We have no support for "neck distance" at the moment. This is supposed to help with objects at short distances.

* We have no support to rotate the "Up Axis" of the stereo plane. Meaning, we hardcode 0,0,1 as UP, and create the stereo pair related to that. (although we could take the camera local UP when rendering panoramas, this wouldn't work for perspective cameras.

* We have no support for interocular distance attenuation based on the proximity of the poles  (which helps to reduce the pole rotation effect/artifact).

THIS NEEDS DOCS - both in 2.78 release log and the Blender manual.
Meanwhile you can read about it here: http://code.blender.org/2015/03/1451

This patch specifically dates from March 2015, as you can see in the code.blender.org post. Many thanks to all the reviewers, testers and minor sponsors who helped me maintain spherical-stereo for 1 year.

All that said, have fun with this. This feature was what got me started with Multi-View development (at the time what I was looking for was Fulldome stereo support, but the implementation is the same). In order to make this into Blender I had to make it aiming at a less-specic user-case  Thus Multi-View started. (this was December 2012, during Siggraph Asia and a chat I had with Paul Bourke during the conference). I don't have the original patch anymore, but you can find a re-based version of it from March 2013, right before I start with the Multi-View project https://developer.blender.org/P332

Reviewers: sergey, dingto

Subscribers: #cycles

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

5 years agoRemove OpenGL render alpha world-bg exception
Campbell Barton [Thu, 10 Mar 2016 11:47:18 +0000 (22:47 +1100)]
Remove OpenGL render alpha world-bg exception

Just follow setting and don't take world-background into account.