Commit Graph

51300 Commits

Author SHA1 Message Date
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
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
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
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
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
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
Mitchell Stokes
11e4558313 BGE: Fix animations when using VBOs 2016-03-10 19:41:45 -08:00
Campbell Barton
0bcbbb1ee3 Fix T47749: Crash subdividing wire edge w/ mdisps 2016-03-11 10:32:56 +11:00
Campbell Barton
033b0789c8 Text Editor: Auto indent for backspace/delete
Editing with spaces + auto-indent didn't delete indentation as expected.
2016-03-11 00:06:09 +11:00
Dalai Felinto
de7a8af793 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
2016-03-10 09:28:29 -03:00
Campbell Barton
1bae9c6a5b Remove OpenGL render alpha world-bg exception
Just follow setting and don't take world-background into account.
2016-03-10 22:47:18 +11:00
Campbell Barton
95128c5eb9 Report error when render fails
Was printing to console, but UI didn't show error message.
2016-03-10 19:37:39 +11:00
Sergey Sharybin
606f6b79ea Fix T47724: VSE crops video if horizontal resolution isn't divisible by 8
This is a bit annoying, but FFmpeg can't deal with unaligned arrays in some
cases. There seems to be an easy workaround with using SWS_ACCURATE_RND flag
which should be harmless since we don't really scaling frames, but only
using sws_scale to change color space.

Additionally, this is what VLC is also using.
2016-03-10 13:22:09 +05:00
Sergey Sharybin
9b3b0a5873 Skip scopes update for render result during rendering 2016-03-10 11:29:45 +05:00
Julian Eisel
2f3e39869a Fix T47729: Linking node sockets using shortcut fails
Could also have swapped nodes to assign instead of swapping after assigning, but this way it's easier to see whats going on.
2016-03-09 11:23:56 +01:00
Campbell Barton
5704ba7f9b Cleanup: style, spelling 2016-03-09 19:34:26 +11:00
Campbell Barton
6a5b636b56 Cleanup: remove button flag for forced tool-tips 2016-03-09 19:15:41 +11:00
Campbell Barton
01d3afaf3d Fix/workaround T47685: Drag keymap slider fails
This is a special case where the UI update function re-creases the keymap we're currently editing.
Making it so dragging values fails.
2016-03-09 17:41:43 +11:00
Campbell Barton
d36dbe8a6d RNA: remove redundant update callback
No need to update keymap toggling expand.
2016-03-09 16:10:33 +11:00
Campbell Barton
95448e851b Fix minor glitch w/ edit-bone center
Don't include the same point multiple times when calculating center with connected bones.
2016-03-09 16:09:58 +11:00
Campbell Barton
1f386cce5f Fix T47723: Custom shape not copied w/ edit-bone 2016-03-09 12:25:35 +11:00
Campbell Barton
4e66981964 Add missing custom-scale when copying bones 2016-03-09 11:13:40 +11:00
Campbell Barton
f4e1c1d135 Correct recent RNA array slicing commit
Broke slice assignment when used on an item from a multi-dimensional array,
eg: `array[i][:] = data`
2016-03-08 21:19:35 +11:00
Sergey Sharybin
c324c4d575 Fix T47701: Image not fully updated after setting .pixels
The set callback was missing couple of things:

- Mipmaps should be updated after pixels changes
- GPU texture is invalid after setting pixels
2016-03-08 14:59:05 +05:00
Campbell Barton
ad98f00d1f PyAPI: Support multi-dimensional RNA slice assignment
This was already supported for getting slices.
2016-03-08 19:36:12 +11:00
Campbell Barton
846080e6bc Fix Py API array assignment not clamping values 2016-03-08 15:33:28 +11:00
Campbell Barton
02cabdac5a Fix crash loading some library blend files
Blend files with screen but no scene would crash.
2016-03-08 06:56:42 +11:00
Campbell Barton
95983baa09 Fix missing weight invert w/ shrink-wrap modifier 2016-03-08 06:18:46 +11:00
Campbell Barton
27d160f6ca Correct docstrings 2016-03-07 21:54:17 +11:00
Julian Eisel
9fe977dbf0 Fix T47706: 'CTRL ALT Left Mouse' clicking on the dope sheet summary line crashes Blender
Simple NULL-check seems fine here, working as it should now. Most likely caused by rBc4dc14b079d81.
2016-03-07 11:21:01 +01:00
Campbell Barton
19ec1bfa89 Fix T47691: Missing redraw w/ pop-up dialogs
Search buttons would overwrite existing callbacks, even when they weren't needed.
Causing missing updates for search buttons in pop-ups.
2016-03-07 16:38:22 +11:00
Campbell Barton
431a5b623e Fix T47688: Regression in gl_load
Error caused by 771f73b6
2016-03-07 14:31:45 +11:00
Campbell Barton
42e8660272 Simple Deform modifier: invert vgroup option
D1839 from @Orgold
2016-03-07 11:28:21 +11:00
Campbell Barton
d086f6aa5c Shrink Wrap modifier: invert vgroup option
D1839 from @Orgold
2016-03-07 11:24:03 +11:00
Campbell Barton
5fd0c1ed3f BMesh: avoid assert dissolving degenerate faces
For dissolving 2-sided faces, theres no need to check they are valid before removal.
2016-03-06 17:25:56 +11:00
6bfd88acd9 Fix T47670: cycles GLSL incorrect normal map node. 2016-03-06 06:55:20 +01:00
002deb29cb Fix T47670: cycles GLSL incorrect layer weight / fresnel.
World space and view space normals were mixed up, we should only convert from
world to view space if a custom normal is connected, otherwise it is already in
view space.
2016-03-05 14:33:41 +01:00
Campbell Barton
40b748d40f Fix for missing update changing VFont.filepath
Changing the filepath wouldn't reload the font even after calling scene.update().
2016-03-05 17:40:33 +11:00
Campbell Barton
4e500101a7 Cleanup: quiet -Wcomma, cast to void where needed 2016-03-05 09:16:12 +11:00
Campbell Barton
fea07c1a63 Cleanup: unnecessary comma use
Also use SWAP macro
2016-03-05 09:13:16 +11:00
Campbell Barton
acebfbb666 Cleanup: unnecessary comma use 2016-03-05 09:12:07 +11:00
Campbell Barton
5513762946 Alternate fix for virtual-pixel update not working
On changing, clear drawable window to force update.
2016-03-05 06:37:56 +11:00
Campbell Barton
f33e44151e Revert "Fix changing virtual pixelsize having no affect if only main window is open"
This reverts commit fe7bab13439fe6f0181f6661fbf7bb7ae18f5310.

Setting correct context is important,
but this is setting DPI and widget unit on *every* mouse move.
2016-03-05 06:31:40 +11:00
Julian Eisel
fe7bab1343 Fix changing virtual pixelsize having no affect if only main window is open
Changing virtual pixelsize only had an affect when a second window was open. (Was also possible to trigger update by opening another window.)

Steps to reproduce:
* Change any editor into user preferences *in main window*
* Change virtual pixel size -> nothing happens
2016-03-04 18:13:01 +01:00