Commit Graph

43612 Commits

Author SHA1 Message Date
Antony Riakiotakis
03bd418d16 Fix T39517,
Issue here is that "show diffuse" option does not respect its intended
purpose which is to be used only for masking.

There are a couple of caveats here:

Dyntopo and multires -always- have mask data enabled, and thus as soon
as one goes to dyntopo mode or adds a multires modifier he would get the
default grey color instead.

Matcaps would break when nodes asked for a diffuse material color (this
was broken before too). Solved by adding global material state for when
matcaps are enabled. Also matcaps don't always played well with VBOs
off.

Added a few more missing updates for mask operators to notify
show_diffuse property as changed. This was also needed on rebuilding
dyntopo pbvh.

Also make zero mask color duller again after artist feedback.
2014-04-03 00:39:42 +03:00
Antony Riakiotakis
8c730b1059 Fix T39520, show diffuse not working in dyntopo.
Was marked as a todo in the code.

This does not yet take care of correct display for multi material
meshes, since it would need correct separation of faces during pbvh
creation. Instead we just take material of first face in node and assume
that the rest faces have the same. This will create some funky effects
if one attempts to sculpt in this way.

Note: This does not yet address T39517
2014-04-02 18:56:19 +03:00
Antony Riakiotakis
6785e45951 Undoing masks in dyntopo leaked memory 2014-04-02 18:25:03 +03:00
Antony Riakiotakis
965e5039f5 Refactor to recent matcap built-ins to not use the built in system.
Those variables would get declared on fragment shader level and since we
use reserved opengl variables, some compilers would throw an error
(NVIDIA allows, some ATI compilers may break). Instead, use a separate
opengl built-in category especially for them. This works on NVIDIA, and
will wait for tests of this commit from ATI users.
2014-04-02 15:08:04 +03:00
Sergey Sharybin
26b2645d62 Implement fame sliding from IE's cache line 2014-04-02 17:59:10 +06:00
Bastien Montagne
9caf702941 UI: Tweak last commit for UIList and image scopes' grip size.
Sorry, forgot the --hold arg to last arc land, wanted to check this before pushing... :/
2014-04-02 13:22:12 +02:00
Bastien Montagne
9b3bd5582b Replace resize code of image scopes by use of new GRIP button.
This deduplicates/simplifies some code. Also cleanup up a bit scopes UI code!

Use new GRIP button for uiList grab-resize.

This allows us to greatly simplifies the code, and get rid of a few hacks in uiList event handling!

Note autosize mode of uiList is now trigered by any value of list_grip below a given threshold, rather than the fixed zero value...

Reviewers: brecht

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D343
2014-04-02 13:09:43 +02:00
Bastien Montagne
4faef1e10c Add drag-resize to uiTemplatePreview (mat/tex/etc. preview widget).
This is done by adding a new button type, GRIP, similar to other numbuttons
(scroll, slider, ...), which here controls the preview height.

Then, we add a new DNA struct to be able to save that height in Blend files
(note I choose not to use Panel struct for this, because we would then have the
same limitation we used to have with uiLists, only one preview per panel
and no preview outside panel).

This implies a change to template_preview UI RNA/py API (each preview needs an ID),
but this is backward compatible, as by default datablock type will be used if no ID is
given (which means e.g. all material previews with no ID will have same height).

Reviewers: brecht

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D342
2014-04-02 13:03:11 +02:00
Sergey Sharybin
11ee2d8b97 implement cache line for image editor
It works exactly the same as a cache line in movie clip editor.
2014-04-02 16:54:30 +06:00
Bastien Montagne
6cd717e0a3 Fix T39521: Render with two Blender processes on same computer: compression issues?
We need to salt temp exr filenames with pid, else several instances of Blender rendering
the same scene on same machine and using "Save Buffers" option would use the same files!
2014-04-02 11:59:43 +02:00
Bastien Montagne
35747ee3d5 Rename "BLI_cpu.h" to "BLI_system.h" and add to it BLI_getpid() helper.
There is not much sense to have a whole BLI file just to check SSE2 on CPUs...
So idea is to rename it to more generic "BLI_system", and add to it more system-related
utils, like e.g. an include helper for getpid(), which allows to hide unix/windows
internals from rest of the code...

Reviewers: campbellbarton

Reviewed By: campbellbarton

Differential Revision: https://developer.blender.org/D439
2014-04-02 11:59:43 +02:00
Kevin Dietrich
cb7cfd3ab6 Cycles: add dedicated UV Map node, easier to find and has convenient auto complete.
Fixes T37954.

Reviewed By: brecht, dingto

Differential Revision: https://developer.blender.org/D230
2014-04-02 11:53:44 +02:00
Lukas Tönne
288147334c Fix T39547: Toggling render passes on active scene does not update
render layer nodes in a pinned tree from different scene.

The way these updates work is a nasty legacy hack:
https://developer.blender.org/diffusion/B/browse/master/source/blender/nodes/composite/node_composite_tree.c$277

This function is called //very frequently// by the get_from_context
method. However, this does not get called for pinned node trees, so
when showing a different scene's compositing nodes in the editor they
may not get updated correctly.

Now moved this update call out of get_from_context so it happens in any
case. Will be called no more frequently than before (on every redraw).
Eventually the depsgraph should handle this more precisely, it's just a
simple ID dependency anyway ...
2014-04-02 11:04:09 +02:00
Sergey Sharybin
eed3974d11 Fix T39545: "Track selected markers", does not stop at end of video
Issue was cauzed by some weird clamping of current frame. Not sure
why it was here at the first point -- it's from the day0 of movie
clip datablock.
2014-04-02 14:11:35 +06:00
Campbell Barton
def5999f9b UI: support for dragging popups title area 2014-04-02 18:43:53 +11:00
Campbell Barton
442f2df736 Code cleanup: avoid redundant lookups for subwindows 2014-04-02 17:33:20 +11:00
Campbell Barton
1d9e0c373d Fix for BLI_rng_shuffle_array noted by mont29 2014-04-02 10:09:48 +11:00
Campbell Barton
da4b90a331 Code cleanup: use uint64_t for BLI_rand 2014-04-02 09:58:27 +11:00
Antony Riakiotakis
e60b18d51d Dyntopo: Delete OpenGL buffers of nodes that do not have any more
triangles.

It is possible to end up with such nodes using brushes in aggressive
collapse mode. Those nodes should normally be cleaned up, since they can
never be actually reused (adding more geometry to a node requires the
node having some geometry to begin with) but until we support dynamic
nodes, better delete those to avoid binding graphics driver resources.

If such zero elements buffers were used, GL error out of memory would be
reported.
2014-04-02 01:41:14 +03:00
Campbell Barton
0a112efcf7 Fix for building with MSVC2008 2014-04-02 09:16:47 +11:00
Antony Riakiotakis
7c513f5913 Fix some redrawing and possibly other issues in dyntopo:
When node face gets deleted, added or exchanged, the nodes should update
their draw buffers, normals and bounding boxes. This was not being done
before so there were graphical glitches apparent, especially in collapse
mode.
2014-04-02 00:57:33 +03:00
Campbell Barton
747ba571a1 Fix T39550: polygons.active has bad default 2014-04-02 06:40:39 +11:00
Antony Riakiotakis
bfe29e0ef7 Revert 7955cb78d it causes GPU_pbvh_buffers_diffuse_changed to always
return false, causing update of all pbvh nodes all the time.
2014-04-01 20:17:23 +03:00
Antony Riakiotakis
3ed49a810d Make matcaps suck less
This commit does various changes for matcaps:

One is taking advantage of drawing with pbvh (which would only happen
with dyntopo previously) and drawing with partial redraw during
sculpting.

The second one is support for masks. To make this work in the special
case of multires, which uses flat shading, I use the only available flat
shaded builtins in OpenGL 2.0 which are color and secondary color.

Abusing colors in that way is also essential for flat shading to work if
we are to use pbvh draw in multires, since it is the color that is being
interpolated flatly, not the normal (which can only interpolated
smoothly). The pbvh drawing code for multires used last triangle
element's normal to compute the shading which would only produce smooth
results. This could change if we did the shading in the vertex shader
for flat shaded primitives, but this is more complex and makes it harder
to have one shader to rule the mole.

Also increased the brightness of the default diffuse color for
sculpting. This should be useful since artists like to tweak the
lighting settings and it will give them the full dynamic range of the
lights, but also it helps with correct brightness of sculpted matcaps.

Reviewers: brecht

Differential Revision: https://developer.blender.org/D435
2014-04-01 19:27:13 +03:00
Harshit Mehta
ad7980a51a Image and clip editor: change zoom step to end up at powers of two.
When you press zoom 3 times you will now get 2:1, 4:1, 8:1, etc. Fixes T36916.

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D409
2014-04-01 18:00:14 +02:00
Grigory Revzin
420da872a6 Fix T39378: Revert, Recover Last Session and Load Factory Settings have no prompt.
Now they do, to make it harder to accidentally press them and lose work.

Reviewed By: brecht, carter2422

Differential Revision: https://developer.blender.org/D440
2014-04-01 18:00:07 +02:00
Sergey Sharybin
e21a7b32f9 Fix T39546: blender crash on open recent file, when tracking is still in progress 2014-04-01 18:43:49 +06:00
Campbell Barton
fb25a86f43 Fix T39537: Multi button editing is unreliable 2014-04-01 22:10:41 +11:00
Campbell Barton
77f815f67a RNA: clamp colors min to 0.0
any colors which need to be negative can explicitly pass in a range.
2014-04-01 21:50:09 +11:00
Sergey Sharybin
467596dd36 Fix T38860: Video preview in VSE shows a distorted and jagged appearance at scale 1:1
Issue was cauzed by the set zoom ratio optator which didn't really set pixel zoom to 1:1.
2014-04-01 16:41:48 +06:00
Jens Verwiebe
62dc18c717 Fix an unused function warning without openmp present, some typos 2014-04-01 11:23:28 +02:00
Sergey Sharybin
7955cb78d6 Fix for "Show Diffuse Color" was having affect on mesh without mask
Only happened with VBOs enabled.
2014-04-01 14:00:15 +06:00
Sergey Sharybin
9904127e33 Code cleanup: use bool instead of int 2014-04-01 13:55:25 +06:00
Sergey Sharybin
ee72cba008 Fix T39446: Blender Crashes when Camera Tracking
Issue is likely caused by thread-unsafe nature of IMB_freeImBuf
which might lead to race condition in some circumstances.

Now made it thread-safe and from Sebastian's tests seems crash is
gone now, so hopefully the root of the issue is finally nailed down.
2014-04-01 13:14:37 +06:00
Campbell Barton
e95fd79258 Correction for error in own recent commit (makesrna c++ api, un-init var) 2014-04-01 16:53:15 +11:00
Campbell Barton
617557b08e Code cleanup: remove TRUE/FALSE & WITH_BOOL_COMPAT define 2014-04-01 15:22:28 +11:00
Campbell Barton
2c00ecc738 Code cleanup: use macro to find vertex in face 2014-04-01 10:08:54 +11:00
Campbell Barton
3deaf7dfca Fix for leak in freestyle transformVertices 2014-04-01 09:45:09 +11:00
Campbell Barton
2c0e32f4e4 Fix for leak in freestyle FitCurve 2014-04-01 09:14:59 +11:00
Campbell Barton
90b94fdce5 Fix for leak in BKE_sequence_sound_init 2014-04-01 08:44:00 +11:00
Campbell Barton
d25ba1eccd Changes to openmp threads commit (UI and RNA)
- use same names as render threads
- remove OpenMP from UI
- remove details from tips
2014-04-01 08:30:24 +11:00
Bastien Montagne
42fca2f145 Usual UI messages fixes... 2014-03-31 21:15:56 +02:00
Bastien Montagne
f1186cb113 Fix T39524: Backface culling is always on in Textured view in BI.
Special case I did not think about in own previous culling fix (rB0f95149a7849).
2014-03-31 20:05:09 +02:00
Jens Verwiebe
6815a22110 Sculpt/dytopo: remove debug prints and add explanations 2014-03-31 19:11:52 +02:00
Antony Riakiotakis
fa3d9f4fbd Make dyntopo detail size maximum smaller (more than 40 pixels should not
be needed according to mapping in code) and change the property to
float.
2014-03-31 19:30:51 +03:00
Bastien Montagne
a5be03b270 Fix deffects reported by CoverityScan (nothing dramatic, but at least one was a (minor) bug). 2014-03-31 16:42:15 +02:00
Jens Verwiebe
2020a15153 Fix playercompile after boolifications 2014-03-31 14:58:22 +02:00
Joshua Leung
b37dc6a8bd Fix T39291: "Stepped" F-curve modifier does not work as expected when stacked after other modifiers
Evaluation of time-warping modifiers ("Stepped" is one of them) didn't actually
end up distorting the time to look up what values other modifiers in the stack
generate. This meant that when a "stepped" fmodifier was on top of a "generator",
the stepped fmodifier looked like it didn't have any effect.

(This fix requires a bit of testing still, so should be left for 2.71)
2014-04-01 01:54:40 +13:00
Jens Verwiebe
49ca3fdf16 Fix compile due forgot remove BKE_scene_omp_threads_update from patch 2014-03-31 14:53:30 +02:00
Campbell Barton
097a3756c0 Code cleanup: use bool 2014-03-31 23:39:08 +11:00