Commit Graph

51188 Commits

Author SHA1 Message Date
Campbell Barton
0f22eb8564 3D Text: delete selection before pasting 2013-12-08 16:39:11 +11:00
Antony Riakiotakis
6d8f76cfab Minor addition for completeness (unlikely to happen), make sure new
sculpt struct has at least dyntopo subdivision turned on.
2013-12-08 01:57:44 +02:00
Antony Riakiotakis
9f1ace2469 Add themable colors for edges in UV editor. Reuse WIRE_EDIT for outlines
and EDGE_SELECT theme colors for selected edges.
2013-12-08 01:37:19 +02:00
Brecht Van Lommel
51263c6637 Fix T37731: some window manager operators unnecessarily required a window to be active. 2013-12-08 00:00:51 +01:00
Antony Riakiotakis
8e5b02359b Fix T37326 inversion of image channels did not do an undo push. Now only do an undo if we are in image paint mode and use the paint undo stack. Also added missing GPU update.: 2013-12-08 00:29:13 +02:00
Jens Verwiebe
31871c763f OSX/scons: forgot Intel CC ( ‘icc’ ) in detection
Todo: perhaps unify this for all OS, but keep in mind:
Apple compiler versions may have other capabilities
than std gcc, llvm, clang ( other versioning also )
2013-12-07 18:05:27 +01:00
Geoffroy Krantz
9174f22b3c Particles: change material picking from index number in UI to menu with materials.
Also fix material slot index not being properly initialized to 1, this got clamped
from zero only on drawing the UI.

Reviewed By: brecht

Differential Revision: http://developer.blender.org/D55
2013-12-07 12:26:58 +01:00
Martijn Berger
85a0c5d4e1 Cycles: network render code updated for latest changes and improved
This actually works somewhat now, although viewport rendering is broken and any
kind of network error or connection failure will kill Blender.

* Experimental WITH_CYCLES_NETWORK cmake option
* Networked Device is shown as an option next to CPU and GPU Compute
* Various updates to work with the latest Cycles code
* Locks and thread safety for RPC calls and tiles
* Refactored pointer mapping code
* Fix error in CPU brand string retrieval code

This includes work by Doug Gale, Martijn Berger and Brecht Van Lommel.

Reviewers: brecht

Differential Revision: http://developer.blender.org/D36
2013-12-07 12:26:58 +01:00
Thomas Laroche
5c07f62fab Cycles: show remaining render time in render info text
It's a simple estimate, not very precise but that isn't really possible always.
For progressive render it will become more accurate the longer you render.

Reviewed By: brecht

Differential Revision: http://developer.blender.org/D67
2013-12-07 12:26:58 +01:00
Campbell Barton
1ed822202f Code Cleanup: pass rectangles as const in insterface files 2013-12-07 15:47:57 +11:00
Campbell Barton
f64b3732be Util Macros: reduce multiple access & conversion for CLAMP/CLAMPIS/ABS 2013-12-07 14:29:27 +11:00
Campbell Barton
69065b5b2c Compiler warnings: quiet warnings for gcc4.7x
patch from Sergey
2013-12-07 13:21:59 +11:00
Joshua Leung
9b932c12c8 Fix T37722 - Can't undo deleting a screen layout
Operations on screen and UI stuff is not actually saved in the undo
files/buffers. Therefore, these shouldn't have the flags set for
getting included for undo and in the last operator settings.
2013-12-07 13:23:51 +13:00
Thomas Dinges
c94d907367 Cycles / OSL Templates: Add Simplex and Gabor noise templates and remove ones which are available as regular nodes. 2013-12-06 18:48:17 +01:00
Jens Verwiebe
c167d7b79a OSX/scons: Introduce a new env var 'MACOSX_COMPILER'
This is needed to resolve the real used compiler from the compatibility shim’S or symlinks.
Also set the real CCVERSION as scons CCVERSION would only read the default one, which
is not useful for OSX
2013-12-06 17:06:51 +01:00
Sergey Sharybin
967b12060c Alpha channel of a plane track image works fine in MCE now 2013-12-06 20:08:37 +06:00
Campbell Barton
75212f4677 BMesh Py API: add bmesh.geometry.intersect_face_point()
patch originally by mont29 with some edits.
2013-12-06 21:15:56 +11:00
Campbell Barton
72d950ba49 Rectangle API: add single axis intersection check 2013-12-06 18:48:55 +11:00
Campbell Barton
d74d6c7c1d Fix T37710: Missing bounds check for active UI list item could crash. 2013-12-06 10:53:41 +11:00
Antony Riakiotakis
4b9fb83e67 Appease grumpy ole gcc 4.7 of MinGW64 (possibly gcc 4.6 of MinGW32 too?)
that cannot convert float to char without false warnings that are turned
into errors with strict flags. I expect that any real conversion
warnings can be caught on linux.
2013-12-05 23:32:59 +02:00
Tamito Kajiyama
8a5b07c46e Removed unused Freestyle env_map images. 2013-12-06 08:20:34 +09:00
Antony Riakiotakis
39fd299498 Forgot to theme-ify color of shadow UVs (color used to draw uvs during
image painting)
2013-12-05 23:12:32 +02:00
Sergey Sharybin
3f82e829e5 Correction to fix of T37688
rB68d39a262c90 didn't check correct file for doing
versioning code. It shall check userprefs.blend not
startup.blend.
2013-12-06 01:12:13 +06:00
Campbell Barton
07ceb99213 Code Cleanup: use strict flags for math lib, add inline declarations 2013-12-06 03:57:17 +11:00
Campbell Barton
fac8e84632 Fix for own error in recent tessellation update. 2013-12-06 01:32:18 +11:00
Lukas Tönne
193dd134da Fix T37698: Crash from invalid context access when freeing custom
python nodes on Blender exit.

The nodeFreeNode function is calling a customizable freefunc callback,
which can be implemented by python. However, the context is invalid when
using this callback while the node tree data block is freed on exit.
Luckily it is also not necessary: When freeing the bNodeTree data blocks
all that is needed is freeing of the DNA data, no other side effects
should happen. So now disable the api callbacks when freeing nodes in
the ntreeFreeTree function.

Also some minor cleanup: checking node->typeinfo is not necessary, all
nodes will always have a valid typeinfo pointer - if a node type is
unknown this will be a stub bNodeType to avoid the need for such checks.
2013-12-05 15:09:42 +01:00
Sergey Sharybin
68d39a262c Fix T37688: User Preferences do not load correctly
Issue was caused by from_memory=true passing to wm_homefile_read
in case there's a configuration folder for current blender.

But the thing is, we still might fallback to reading home file
from memory (i.e. in cases there's no startup.blend in config
folder).

In this case we still need to run versioning code for userprefs.
2013-12-05 19:32:48 +06:00
Sergey Sharybin
4838a60b0c Fix T37703: Shadow pass output image is mangled.
Was a mistake in own optimization commit.
2013-12-05 17:31:53 +06:00
IRIE Shinsuke
c17266ff54 Blender Internal: Fix for rendered view crash that happens when changing screen or area type
This crash is very similar to T36936.  If changing screen or area type
buried the rendered view, popping up it again may cause the crash by
corrupted render database.
2013-12-05 16:08:10 +09:00
Campbell Barton
6976866d5a User Interface: Ctrl+C over a menu copies the py command
also use bools rather then ints
2013-12-05 17:26:03 +11:00
Campbell Barton
8003f0606d Compiler warnings: quiet float/double conversion warning 2013-12-05 10:34:30 +11:00
Jens Verwiebe
df2f604af2 OSX/scons: fix misdesigned version detection of compiler ( todo: do with submodule ), fix a compiler warning with clang < 5” 2013-12-04 23:15:29 +01:00
Sergey Sharybin
c6f425c875 Fix T37189: Inconsistent icons for Force field
There's still an issue with Curve Guide force field
which you can not so easily change type from/to.

This i would consider TODO for later.
2013-12-05 01:24:05 +06:00
Sergey Sharybin
b98754836e Fix T37680: Texture image scale is not refreshing 2013-12-04 23:17:59 +06:00
Campbell Barton
c2a518461c Add alloca include for MSVC 2013-12-05 03:45:14 +11:00
Lukas Tönne
67134a7bf6 Fix for EWA (elliptical weighted average) sampling in the compositor.
EWA sampling is designed for downsampling images, i.e. scaling down the size of
input image pixels, which happens regularly in compositing. While the standard
sampling methods (linear, cubic) work reasonably well for linear
transformations, they don't yield good results in non-linear cases like
perspective projection or arbitrary displacement. EWA sampling is comparable to
mipmapping, but avoids problems with discontinuities.

To work correctly the EWA algorithm needs partial derivatives of the mapping
functions which convert output pixel coordinates back into the input image
space (2x2 Jacobian matrix). With these derivatives the EWA algorithm
projects ellipses into the input space and accumulates colors over their
area. This calculation was not done correctly in the compositor, only the
derivatives du/dx and dv/dy were calculation, basically this means it only
worked for non-rotated input images.

The patch introduces full derivative calculations du/dx, du/dy, dv/dx, dv/dy for
the 3 nodes which use EWA sampling currently: PlaneTrackWarp, MapUV and
Displace. In addition the calculation of ellipsis area and axis-aligned
bounding boxes has been fixed.

For the MapUV and Displace nodes the derivatives have to be estimated by
evaluating the UV/displacement inputs with 1-pixel offsets, which can still have
problems on discontinuities and sub-pixel variations. These potential problems
can only be alleviated by more radical design changes in the compositor
functions, which are out of scope for now. Basically the values passed to the
UV/Displacement inputs would need to be associated with their 1st order
derivatives, which requires a general approach to derivatives in all nodes.
2013-12-04 16:05:56 +01:00
Sergey Sharybin
04e434cd81 Fix T37690: UI does not immediatelly reflect new length of effect strip 2013-12-04 20:47:23 +06:00
Lukas Tönne
45fc80153a Fix for interpolation errors on lower-left borders in compositor image
inputs.

http://wiki.blender.org/uploads/4/4c/Compo_image_interpolation_borders.png

Problem is that all image buffer reader nodes (RenderLayer, Image,
MovieClip) were clipping pixel coordinates to 0..N range (N being width
or height respectively). Bilinear interpolation works ok then on the
upper-right borders (x, N) and (N, y), since the last (N-1) pixel fades
out to N (background). But the lower-left (x, 0) and (0, y) borders are
not correctly interpolated because the nodes cut off the negative pixels
before the interpolation function can calculate their value.

To fix this, the interpolation functions are now entirely responsible
for handling "out of range" cases, i.e. setting (0,0,0,0) results for
invalid pixels, while also handling interpolation for borders.
Callers should not do pixel range checks themselves, which also makes
the code simpler. Should not have any real performance penalty,
the interpolation functions do this check anyway, so is probably even
slightly faster.
2013-12-04 12:09:13 +01:00
Sergey Sharybin
a698709d95 Code cleanup: remove unused color management functions 2013-12-04 15:57:54 +06:00
Campbell Barton
6a35b2d72a Compiler Warnings: disallow 'long' in DNA, its not reliably 64bit (gcc only) 2013-12-04 13:51:41 +11:00
Campbell Barton
a9b97dcf22 User interface: internal change, collect panels to draw before drawing.
avoids calling poll twice, in some cases
2013-12-04 11:57:19 +11:00
Bastien Montagne
4584caa133 Fix UI bug with 'socket menus' (used e.g. by cycles' Material panels).
Also tweaked a bit how nodes with more than one socket available are drawn:
* The node entry itself (a label) has no more any icon, so that it is aligned with the other single-socket nodes.
* The sub-entries (i.e. node's sockets) are more clearly indented (using a blank icon).

Details:
Another case of bad internal UI_HAS_ICON flag erasing by brutally assigning an uneeded value to but->flag.
Revealed by recent split of some button flags into but->drawflag.

Thanks to Thomas Dinge for noting the issue.
2013-12-04 00:09:12 +01:00
Campbell Barton
f3d13bec6d Code Cleanup: correct fabsf/fabs/abs use 2013-12-04 09:24:38 +11:00
Bastien Montagne
239f0dbcd2 Usual UI messages fixes & tweaks. 2013-12-03 22:42:58 +01:00
Bastien Montagne
46eef60d93 Cleanup: Internal degrees removal.
This patch changes most of the reamining degrees usage in internal code into radians.
I let a few which I know off asside, for reasons explained below - and I'm not sure to have found out all of them.

WARNING: this introduces forward incompatibility, which means files saved from this version won't open 100% correctly
         in previous versions (a few angle properties would use radians values as degrees...).

Details:
- Data:
-- Lamp.spotsize: Game engine exposed this setting in degrees, to not break the API here I kept it as such
                  (using getter/setter functions), still using radians internally.
-- Mesh.smoothresh: Didn't touch to this one, as we will hopefully replace it completely by loop normals currently in dev.

- Modifiers:
-- EdgeSplitModifierData.split_angle, BevelModifierData.bevel_angle: Done.

- Postprocessing:
-- WipeVars.angle (sequencer's effect), NodeBokehImage.angle, NodeBoxMask.rotation, NodeEllipseMask.rotation: Done.

- BGE:
-- bConstraintActuator: Orientation type done (the minloc[0] & maxloc[0] cases). Did not touch to 'limit location' type,
                        it can also limit rotation, but it exposes through RNA the same limit_min/limit_max, which hence
                        can be either distance or angle values, depending on the mode. Will leave this to BGE team.
-- bSoundActuator.cone_outer_angle_3d, bSoundActuator.cone_inner_angle_3d: Done (note I kept degrees in BGE itself,
                                                                           as it seems this is the expected value here...).
-- bRadarSensor.angle: Done.

Reviewers: brecht, campbellbarton, sergey, gaiaclary, dfelinto, moguri, jbakker, lukastoenne, howardt

Reviewed By: brecht, campbellbarton, sergey, gaiaclary, moguri, jbakker, lukastoenne, howardt
Thanks to all!

Differential Revision: http://developer.blender.org/D59
2013-12-03 20:35:45 +01:00
Sergey Sharybin
4627516884 Fix T37663: Black matcap when object located on a curve
Summary:
Issue was caused by GLSL samplers not valid anymore after
dupliobject was drawn into OpenGL displist.

Solution for now is to not use displist for active object
when matcap is used.

The same issue exists for regular GLSL viewport draw, and
this was solved by disabling diplist if draw_glsl_material
returns truth for current dupliobject.

Reviewers: brecht

Reviewed By: brecht

Maniphest Tasks: T37663

Differential Revision: http://developer.blender.org/D70
2013-12-03 22:14:16 +06:00
Sergey Sharybin
d3f3fb89cc Fix T37670: Paint mode + procedural map colours error
Summary:
Seems to be known TODO in the code, but no idea why it
was never solved, especially since tweak is so much easy.

It might be arguable that we need to support painting
color space, but it's still much better to convert to
sRGB space. It's gonna to cover 90% of cases anyway.

Reviewers: campbellbarton, brecht

Reviewed By: brecht

Maniphest Tasks: T37670

Differential Revision: http://developer.blender.org/D65
2013-12-03 22:13:15 +06:00
Campbell Barton
e63d5f2356 Keymap: add walk mode 2013-12-04 00:40:45 +11:00
Campbell Barton
f91187d3c3 Code cleanup: replace rectf_scale with BLI_rctf_scale
and add area arg to ui_handler_panel_region
2013-12-03 23:53:21 +11:00
Campbell Barton
35d89825c1 Code Cleanup: python import formatting 2013-12-03 23:46:28 +11:00