8 years agoFix #34700: orthographic camera DOF was still not working correct.
Brecht Van Lommel [Wed, 3 Apr 2013 17:32:30 +0000 (17:32 +0000)]
Fix #34700: orthographic camera DOF was still not working correct.

8 years agoApparently zoom in clip editor was broken
Sergey Sharybin [Wed, 3 Apr 2013 16:21:14 +0000 (16:21 +0000)]
Apparently zoom in clip editor was broken

Also silenced some warnings in glutil.

8 years agoFix #34852: multilayer SSS material rendering different in progressive and
Brecht Van Lommel [Wed, 3 Apr 2013 16:12:13 +0000 (16:12 +0000)]
Fix #34852: multilayer SSS material rendering different in progressive and
non-progressive integrator.

8 years agoBunch of fixes for GLSL display transform
Sergey Sharybin [Wed, 3 Apr 2013 15:59:54 +0000 (15:59 +0000)]
Bunch of fixes for GLSL display transform

- GLSL shader wasn't aware of alpha predivide option,
  always assuming alpha is straight. Gave wrong results
  when displaying transparent float buffers.

- GLSL display wasn't aware of float buffers with number
  of channels different from 4, crashing when trying to
  display image with different number of channels.

  This required a bit larger changes, namely now it's
  possible to pass format (GL_RGB, GL_RGBAm GL_LUMINANCE)
  to glaDrawPixelsTex, This also implied adding format to
  glaDrawPixelsAuto and modifying all places where this
  functions are called.

  Now GLSL will handle both 3 and 4 channels buffers,
  single channel images are handled by CPU.

- Replaced hack for render result displaying with a bit
  different hack.

  Namely CPU conversion will happen only during render,
  once render is done GLSL would be used for displaying
  render result on a screen.

  This is so because of the way renderer updates parts
  of the image -- it happens without respect to active
  render layer in image user. This is harmless because
  only display buffer is modifying, but this is tricky
  because we don't have original buffer opened during

  One more related fix here was about when rendering
  multiple layers, wrong image would be displaying when
  rendering is done. Added a signal to invalidate
  display buffer once rendering is done (only happens
  when using multiple layers). This solves issue with
  wrong buffer stuck on the display when using regular
  CPU display space transform and if GLSL is available
  it'll make image displayed with a GLSL shader.

- As an additional change, byte buffers now also uses
  GLSL display transform.

  So now only dutehr and RGB curves are stoppers for
  using GLSL for all kind of display transforms.

8 years agocode cleanup: unused functions
Campbell Barton [Wed, 3 Apr 2013 15:04:24 +0000 (15:04 +0000)]
code cleanup: unused functions

8 years agoFix #34856: crash passing an object rather than a mesh to,
Brecht Van Lommel [Wed, 3 Apr 2013 13:43:12 +0000 (13:43 +0000)]
Fix #34856: crash passing an object rather than a mesh to,
this should give an error message but it didn't.

8 years agoFix for old compatibility issue: 2.59.2 do_versions was not handling all local node...
Lukas Toenne [Wed, 3 Apr 2013 11:36:48 +0000 (11:36 +0000)]
Fix for old compatibility issue: 2.59.2 do_versions was not handling all local node trees (world and lamp missing).

8 years agocode cleanup: use more (blender) conventional naming for group functions.
Campbell Barton [Wed, 3 Apr 2013 11:28:42 +0000 (11:28 +0000)]
code cleanup: use more (blender) conventional naming for group functions.
also change to dump by default.

8 years agonew ruler option to be able to interactively measure surface thichness as you drag...
Campbell Barton [Wed, 3 Apr 2013 10:45:13 +0000 (10:45 +0000)]
new ruler option to be able to interactively measure surface thichness as you drag the ruler about.
Request from Bart Veldhuizen.

Access with Shift+Drag

8 years agopass snap arguments so the ruler doesn't have to temp overwrite scene vars.
Campbell Barton [Wed, 3 Apr 2013 09:48:21 +0000 (09:48 +0000)]
pass snap arguments so the ruler doesn't have to temp overwrite scene vars.
also expose snapObjectsRayEx() for more convenient ray-casting about the scene.

8 years agoFix #33628, Segmentation fault after pasting a closed group of nodes into an open...
Lukas Toenne [Wed, 3 Apr 2013 09:10:29 +0000 (09:10 +0000)]
Fix #33628, Segmentation fault after pasting a closed group of nodes into an open group. Finally now there is a proper check for pasting nodes into groups. It uses the poll_instance callback of node types to determine if a node can be added into a specific node tree. Currently this is only implemented for group nodes and does a recursive check to avoid pasting a node group into itself (on any level, also nested groups).

8 years agoFix/Workaround #34854: render buffer update writes to wrong layer
Sergey Sharybin [Wed, 3 Apr 2013 09:08:02 +0000 (09:08 +0000)]
Fix/Workaround #34854: render buffer update writes to wrong layer

Was caused by recent change in image_buffer_rect_update which
was writing data to ibuf-rect_float. Apparently, this buffer
could point to different render layer than came from RenderResult.

Made quick fix for this, which ends up in skipping float buffer
update in image_buffer_rect_update and skipping GLSL when image
has both byte and float buffers.

This will bring speed down a bit, but slower blender is better
than broken blender.

Proper fix will arrive later this week.

8 years agoFix #34838, Can not append mesh from 2.5 (Crash in Nodes). The compatibility code...
Lukas Toenne [Wed, 3 Apr 2013 08:25:29 +0000 (08:25 +0000)]
Fix #34838, Can not append mesh from 2.5 (Crash in Nodes). The compatibility code for node group socket indices was assuming the new group node types even for 2.56.2 files, before these node groups had actually been converted ... Needs to use old way of identifying node group links (fromnode/tonode == NULL) instead of input/output node types.

8 years agoFix for missing integer 'type' of the virtual extension socket in group nodes. This...
Lukas Toenne [Wed, 3 Apr 2013 07:56:36 +0000 (07:56 +0000)]
Fix for missing integer 'type' of the virtual extension socket in group nodes. This could lead to crash in node groups when trying to undefined stack values of the extension socket. type just needs to be set to SOCK_CUSTOM==-1, so the BI execution knows not to look for a stack entry.

8 years agoCleanup outliner_dropzone code
Dan Eicher [Wed, 3 Apr 2013 07:42:56 +0000 (07:42 +0000)]
Cleanup outliner_dropzone code

 * deduplicated a bunch of code and moved it into outliner_dropzone_find()
 * moved all the per-dropzone checks into the poll functions
 * one functional change, disable drop parenting on self & self->parent

The basic assumption: if poll() == true then outliner_dropzone_find() will return a valid TreeElement

8 years agouse floats for transform snapping distance comparisons
Campbell Barton [Wed, 3 Apr 2013 07:36:37 +0000 (07:36 +0000)]
use floats for transform snapping distance comparisons

8 years agofix [#34825] Transparent background of Empty Images clips objects behind them away...
Campbell Barton [Wed, 3 Apr 2013 05:16:15 +0000 (05:16 +0000)]
fix [#34825] Transparent background of Empty Images clips objects behind them away when Empty is not selected

allow 'Transparency' option to be used on empty-images.

8 years agofix [#34850] "x" to clear ID prop fields is too close to the right border
Campbell Barton [Wed, 3 Apr 2013 05:02:33 +0000 (05:02 +0000)]
fix [#34850] "x" to clear ID prop fields is too close to the right border

8 years agofix [#34847] Box selecting shape keys of a mask causes crash
Campbell Barton [Wed, 3 Apr 2013 03:25:26 +0000 (03:25 +0000)]
fix [#34847] Box selecting shape keys of a mask causes crash

8 years agostyle cleanup
Campbell Barton [Wed, 3 Apr 2013 01:36:00 +0000 (01:36 +0000)]
style cleanup

8 years agoremove workaround for [#34346], checked on applying this workaround for armatures...
Campbell Barton [Wed, 3 Apr 2013 01:35:24 +0000 (01:35 +0000)]
remove workaround for [#34346], checked on applying this workaround for armatures too but it happens in more cases then I originally thought.
for now users of opensource Nouveau and ATI drivers can't use multiple windows, the bug needs to be fixed in the driver.

8 years agoFix incorrect OS X warning message in console when using multisample antialiasing
Brecht Van Lommel [Tue, 2 Apr 2013 19:18:38 +0000 (19:18 +0000)]
Fix incorrect OS X warning message in console when using multisample antialiasing
about number of samples not matching the requested number.

8 years agoFix #34759: cycles texture influence for particles not shown correct when switching
Brecht Van Lommel [Tue, 2 Apr 2013 18:19:37 +0000 (18:19 +0000)]
Fix #34759: cycles texture influence for particles not shown correct when switching
to a different texture slot.

8 years agoFix #34849: crash in operator search menu, due to brush stencil poll
Brecht Van Lommel [Tue, 2 Apr 2013 18:19:35 +0000 (18:19 +0000)]
Fix #34849: crash in operator search menu, due to brush stencil poll
function not checking NULL pointer.

8 years agoTweak allocation vars for linear space so black is converted
Sergey Sharybin [Tue, 2 Apr 2013 18:19:16 +0000 (18:19 +0000)]
Tweak allocation vars for linear space so black is converted
to black when using GLSL display transform.

8 years agoBox and Ellipse mask nodes will now output shape
Sergey Sharybin [Tue, 2 Apr 2013 17:56:41 +0000 (17:56 +0000)]
Box and Ellipse mask nodes will now output shape
even if nothing is attached to input.

They'll use black image with render resolution
as a background if nothing is attached to mask input.

Was a request from 4K ToS project.

8 years agoFix #34803: blender internal SSS rendering black/nan with negative texture colors.
Brecht Van Lommel [Tue, 2 Apr 2013 17:49:31 +0000 (17:49 +0000)]
Fix #34803: blender internal SSS rendering black/nan with negative texture colors.

8 years agoFix for potential missing draw-update when building without OCIO
Sergey Sharybin [Tue, 2 Apr 2013 17:39:34 +0000 (17:39 +0000)]
Fix for potential missing draw-update when building without OCIO

8 years agoMore usage of GLSL for color managed image drawing
Sergey Sharybin [Tue, 2 Apr 2013 17:28:37 +0000 (17:28 +0000)]
More usage of GLSL for color managed image drawing

Uses GLSL for drawing image in Image Editor space.

This requires change in image_buffer_rect_update, so
original float buffer is being updated as well. This
is unlikely be something bad, but will keep an eye
on this change.

Also no byte buffer allocation happens there, this
is so because byte buffer used for display only
and in case of GLSL display such allocation and
partial update is just waste of time.

Also switched OpenGL render from using CPU color
space linearization to GLSL color space transform.
Makes OpenGL rendering pretty much faster (but
still slower than in 2.60).

internal changes:

- Added functions to setup GLSL shader for color
  space conversion in colormanagement.c. Currently
  conversion form a colorspace defined by a role to
  linear space is implemented. Easy to extend to
  other cases.

- Added helper functions to glutil.c which does
  smarter image buffer draw (calling all needed OCIO
  stuff, editors now could draw image buffer with a
  single function call -- all the checks are done in

- Also added helper function for buffer linearization
  from a given role to glutil.c. Everyone now able to
  linearize buffer with a single call.

  This function will do nothing is GLSL routines fails
  or not supported.

  And one last this: this function uses offscreen
  drawing, could potentially give issues on some
  cards, also will keep an eye on this.

8 years agoFixes for recent GLSL display space conversions
Sergey Sharybin [Tue, 2 Apr 2013 17:28:29 +0000 (17:28 +0000)]
Fixes for recent GLSL display space conversions

- Building without OCIO will give correct results again
- If GLSL failed to compile, fallback to glaDrawPixelsAuto
  will happen.

8 years agoMore Histogram fixes:
Ton Roosendaal [Tue, 2 Apr 2013 17:12:21 +0000 (17:12 +0000)]
More Histogram fixes:

Sequencer histogram was calculating still badly, now it uses a per-color
component counter to calculate the levels (instead of counter for all)

8 years agoFix #34711: matcap option not showing when switching from cycles material/rendered
Brecht Van Lommel [Tue, 2 Apr 2013 16:51:23 +0000 (16:51 +0000)]
Fix #34711: matcap option not showing when switching from cycles material/rendered
draw mode to blender internal.

8 years agoFix #34788, #34744: GLSL error, #version line needs to be at the top of the shader
Brecht Van Lommel [Tue, 2 Apr 2013 16:37:31 +0000 (16:37 +0000)]
Fix #34788, #34744: GLSL error, #version line needs to be at the top of the shader
and this wasn't the case anymore after recent changes.

8 years agoCycles: small code cleanup + fix SSS closure mixed with other closures doing
Brecht Van Lommel [Tue, 2 Apr 2013 16:37:28 +0000 (16:37 +0000)]
Cycles: small code cleanup + fix SSS closure mixed with other closures doing
a bit too much work.

8 years agoFix 34831: SSS issue with non-progressive render, due to error in closure merging...
Brecht Van Lommel [Tue, 2 Apr 2013 15:53:24 +0000 (15:53 +0000)]
Fix 34831: SSS issue with non-progressive render, due to error in closure merging code.

8 years agoBugfix for [#34845] FFmpeg: .wav file playback crashes Blender since r55693
Joerg Mueller [Tue, 2 Apr 2013 15:48:09 +0000 (15:48 +0000)]
Bugfix for [#34845] FFmpeg: .wav file playback crashes Blender since r55693

8 years agoFix #34832: SSS render freeze with object instances.
Brecht Van Lommel [Tue, 2 Apr 2013 14:19:05 +0000 (14:19 +0000)]
Fix #34832: SSS render freeze with object instances.

8 years agoFix #34833: crash using SSS node on windows, invalid memory access when building...
Brecht Van Lommel [Tue, 2 Apr 2013 13:34:50 +0000 (13:34 +0000)]
Fix #34833: crash using SSS node on windows, invalid memory access when building lookup table.

8 years agoRemoved leftover debug print.
Ton Roosendaal [Tue, 2 Apr 2013 13:15:12 +0000 (13:15 +0000)]
Removed leftover debug print.

8 years agoFix compilation on MinGW(64/32)
Antony Riakiotakis [Tue, 2 Apr 2013 13:07:01 +0000 (13:07 +0000)]
Fix compilation on MinGW(64/32)

Also, add appropriate lib paths for recent OpenCollada for mingw32 (coming soon to an svn server near you)

8 years agoMissing GLEW path in CMake, fixes compile error in OS X.
Ton Roosendaal [Tue, 2 Apr 2013 12:54:47 +0000 (12:54 +0000)]
Missing GLEW path in CMake, fixes compile error in OS X.

8 years agoUsability fix, for color grading.
Ton Roosendaal [Tue, 2 Apr 2013 12:41:11 +0000 (12:41 +0000)]
Usability fix, for color grading.

The Scopes and Histogram (Image editor, Sequencer) were not updating on
changes in color or display settings.

- Missing notifiers for refreshing
- Missing code to draw correct for managed byte buffers.

8 years agoKey mapping conflict for 'find node' versus 'add socket link' (noodle).
Ton Roosendaal [Tue, 2 Apr 2013 12:38:05 +0000 (12:38 +0000)]
Key mapping conflict for 'find node' versus 'add socket link' (noodle).

Historically, F shortcut was for 'add edge/face' in Blender.
In Node editor, F makes a noodle, ctrl+f made a noodle replace too.

To keep ALT+F work for "Unattach from frame", the solution I now propose
is to make CTRL+F for finding nodes, and SHIFT+F for 'add noodle with replace'.

8 years agoFix for #34756 and #34810, crashes when dropping nodes onto noodles and a related...
Lukas Toenne [Tue, 2 Apr 2013 11:59:27 +0000 (11:59 +0000)]
Fix for #34756 and #34810, crashes when dropping nodes onto noodles and a related forward compatibility bug.

Added a sanity check to the ED_node_link_insert function to ensure it exits gracefully if no suitable sockets can be found. This was the problem with custom pynodes, which don't define the 'type' DNA of old sockets. The operator will have to be generalized for future nodes, but for now just not crashing seems good enough.

Script node crashes in #34810 were caused by uninitialized 'type' integer as well. This is now done in the set_typeinfo function for sockets (like for trees and nodes too), to avoid any potential remaining issues of this kind. Note that new files need to be loaded and saved again once to be forward compatible again.

8 years agodraw helper lines for inset and bevel operators, the mouse distance from the selectio...
Campbell Barton [Tue, 2 Apr 2013 10:48:11 +0000 (10:48 +0000)]
draw helper lines for inset and bevel operators, the mouse distance from the selection center was used, but often it was hard to tell where this was and you'd have to guess.
adds ED_region_draw_mouse_line_cb() generic draw callback for mouse helper lines.

8 years agoUsual typo fixing...
Bastien Montagne [Tue, 2 Apr 2013 07:27:39 +0000 (07:27 +0000)]
Usual typo fixing...

8 years agoCompile fix: size_t (required by BLI_string.h) was undefined
Joshua Leung [Tue, 2 Apr 2013 03:51:42 +0000 (03:51 +0000)]
Compile fix: size_t (required by BLI_string.h) was undefined

8 years agoFix build for MinGW without opencollada (updated libs coming soon), MinGW64 now build...
Antony Riakiotakis [Tue, 2 Apr 2013 02:05:03 +0000 (02:05 +0000)]
Fix build for MinGW without opencollada (updated libs coming soon), MinGW64 now builds with opencollada

8 years agoFix FFMPEG build error with older versions after planar formats commit.
Brecht Van Lommel [Mon, 1 Apr 2013 20:51:52 +0000 (20:51 +0000)]
Fix FFMPEG build error with older versions after planar formats commit.

8 years agoCycles: initial subsurface multiple scattering support. It's not working as
Brecht Van Lommel [Mon, 1 Apr 2013 20:26:52 +0000 (20:26 +0000)]
Cycles: initial subsurface multiple scattering support. It's not working as
well as I would like, but it works, just add a subsurface scattering node and
you can use it like any other BSDF.

It is using fully raytraced sampling compatible with progressive rendering
and other more advanced rendering algorithms we might used in the future, and
it uses no extra memory so it's suitable for complex scenes.

Disadvantage is that it can be quite noisy and slow. Two limitations that will
be solved are that it does not work with bump mapping yet, and that the falloff
function used is a simple cubic function, it's not using the real BSSRDF
falloff function yet.

The node has a color input, along with a scattering radius for each RGB color
channel along with an overall scale factor for the radii.

There is also no GPU support yet, will test if I can get that working later.

Node Documentation:

Implementation notes:

8 years agoCycles: code refactoring to add generic lookup table memory.
Brecht Van Lommel [Mon, 1 Apr 2013 20:26:43 +0000 (20:26 +0000)]
Cycles: code refactoring to add generic lookup table memory.

8 years agoFFMPEG: adding support for ffmpeg planar formats also to writeffmpeg.c.
Joerg Mueller [Mon, 1 Apr 2013 15:31:27 +0000 (15:31 +0000)]
FFMPEG: adding support for ffmpeg planar formats also to writeffmpeg.c.

8 years agoNode editing feature:
Ton Roosendaal [Mon, 1 Apr 2013 15:07:22 +0000 (15:07 +0000)]
Node editing feature:

New operator "Find Node".
Opens search menu, and allows to find a node based on name or label.

On selecting name, menu selects/activates the node and moves the view to it.

Shortcut: ALT+F
Menu: Node editor, "Select"

8 years agoEpic fail in original GLSL display transform commit
Sergey Sharybin [Mon, 1 Apr 2013 13:41:45 +0000 (13:41 +0000)]
Epic fail in original GLSL display transform commit

Apparently C== allowed to have implementations of
OCIOImpl::setupGLSLDraw, OCIOImpl::finishGLSLDraw and
OCIOImpl::freeGLState in two different files.


8 years agoFix for recent changes in IMB_display_buffer_acquire
Sergey Sharybin [Mon, 1 Apr 2013 12:22:52 +0000 (12:22 +0000)]
Fix for recent changes in IMB_display_buffer_acquire

Do early out when ibuf has 4 channels only, allocate
4-channels display buffer.

So now we could always assume byte buffer is always
in RGBA format.

8 years agoFix for GLSL display: NULL view_settings are allowed now
Sergey Sharybin [Mon, 1 Apr 2013 12:08:43 +0000 (12:08 +0000)]
Fix for GLSL display: NULL view_settings are allowed now

Currently no functional changes for users, but this change
is crucial for further GLSL images display.

8 years agocode cleanup: includes
Campbell Barton [Mon, 1 Apr 2013 11:27:47 +0000 (11:27 +0000)]
code cleanup: includes

8 years agoHopefully compilation with FFmpeg 0.10 works fine now.
Sergey Sharybin [Mon, 1 Apr 2013 10:53:29 +0000 (10:53 +0000)]
Hopefully compilation with FFmpeg 0.10 works fine now.

8 years agoremove duplicate defines in makesrna.c
Campbell Barton [Mon, 1 Apr 2013 10:26:16 +0000 (10:26 +0000)]
remove duplicate defines in makesrna.c

8 years agocode cleanup: split editmesh_tools.c, into inset, bevel (both modal operators) and...
Campbell Barton [Mon, 1 Apr 2013 10:18:01 +0000 (10:18 +0000)]
code cleanup: split editmesh_tools.c, into inset, bevel (both modal operators) and moved extrude operators into their own file.
also move some selection operators from editmesh_tools.c into editmesh_select.c

8 years agoFix #34813: smooth brush used on a shape key messes up the topology - part2
Sergey Sharybin [Mon, 1 Apr 2013 09:55:37 +0000 (09:55 +0000)]
Fix #34813: smooth brush used on a shape key messes up the topology - part2

This reverts rev55642 and fixes issue in a different way.

The thing here is: isolated vertices are for sure not in BVH
and updating keyblock could not only rely on idea that all
vertices are in BVH (no idea why it was noticed just now).

Solved in a way, that uses old keyblock coordinates as new
keyblock, and then refines it using coordinates from BVH.

Hopefully it'll cover all cases now :)

8 years agoAudaspace: adding support for ffmpeg planar formats, breaks support for older ffmpeg...
Joerg Mueller [Mon, 1 Apr 2013 09:46:35 +0000 (09:46 +0000)]
Audaspace: adding support for ffmpeg planar formats, breaks support for older ffmpeg versions.

8 years agoDraw checker backdrop for sequencer when in RGBA mode
Sergey Sharybin [Mon, 1 Apr 2013 09:15:37 +0000 (09:15 +0000)]
Draw checker backdrop for sequencer when in RGBA mode

8 years agocorrect too-big allocation in mesh beautify.
Campbell Barton [Mon, 1 Apr 2013 07:57:33 +0000 (07:57 +0000)]
correct too-big allocation in mesh beautify.

8 years agoFix #34819: Background image gets pixelated when zooming in
Sergey Sharybin [Mon, 1 Apr 2013 07:50:51 +0000 (07:50 +0000)]
Fix #34819: Background image gets pixelated when zooming in

Was a regression in glaDrawPixelsTex changes related on zoom filter.
For background image linear interpolation was used.

8 years agoDraw relationship lines for rigid body constraints
Sergej Reich [Sun, 31 Mar 2013 19:52:37 +0000 (19:52 +0000)]
Draw relationship lines for rigid body constraints

Makes it easier to see what's connected to what.

8 years agoFix for [#34821] Split Viewer node won't show the backdrop
Thomas Dinges [Sun, 31 Mar 2013 19:46:11 +0000 (19:46 +0000)]
Fix for [#34821] Split Viewer node won't show the backdrop
* Regression introduced in r55451

8 years agoFix typo in recent i18n changes
Sergej Reich [Sun, 31 Mar 2013 17:41:22 +0000 (17:41 +0000)]
Fix typo in recent i18n changes

Broke rigid body buttons in physics tab.

8 years agoChanges to Stencil control:
Antony Riakiotakis [Sun, 31 Mar 2013 16:17:18 +0000 (16:17 +0000)]
Changes to Stencil control:

* Add a poll function that only activates the operator when a stencil
brush is active
* Change shortcuts to RMouse - translate, Shift - RMouse Scale, Ctrl -
RMouse, rotate. MUCH faster and simpler workflow.
* Change shortcut of colour sampling to S. Sampling is important but not
as important as warranting the Right Mouse button.
* Add a notifier so that toolbar gets updated texture rotation when
rotating the stencil

* Slight rearrangement of options so that jittering is more accessible
(easily more often used than smooth stroke)

8 years agooptimize away reloading of brush texture when rotating the stencil
Antony Riakiotakis [Sun, 31 Mar 2013 11:20:30 +0000 (11:20 +0000)]
optimize away reloading of brush texture when rotating the stencil

8 years agoUI cleanup:
Antony Riakiotakis [Sun, 31 Mar 2013 11:04:13 +0000 (11:04 +0000)]
UI cleanup:

* Using masking is determined only by the presence of the texture,
remove extraneous DNA flag (might cause issues later but in practice
brush options are not harmful)
* Overlay and angle sliders are active during stencil mapped brushes
* Only draw the overlay if there's a texture.

8 years agostyle cleanup
Campbell Barton [Sun, 31 Mar 2013 03:28:46 +0000 (03:28 +0000)]
style cleanup

8 years agoCycles / Shader Graph optimization:
Thomas Dinges [Sun, 31 Mar 2013 01:18:10 +0000 (01:18 +0000)]
Cycles / Shader Graph optimization:
* Unnecessary shader inputs inside the Mix Shader are now ignored, in case the factor is 0.0 / 1.0 and not connected.
This way we save some render time for complex node graphs.

Check the Mix Shader at the end: In this case, Cycles will now avoid the complete huge shader tree, and only calculate the Diffuse Shader.
Rendertime decreased from 1:50 min to 1:20 min on CPU. GPU rendering benefits as well from this.

This only affects SVM, OSL was already doing these optimizations.

8 years agoWoot woot commit.
Antony Riakiotakis [Sun, 31 Mar 2013 00:38:50 +0000 (00:38 +0000)]
Woot woot commit.

Stencil style texture mapping. Ready for field testing and user feedback.

This commit adds stencil like brushes, like those that existed on old ptex branch.
(with the exception of clip colour)
To control the position of the stencil, you use

Q: translation
Shift - Q: scaling
Ctrl - Q: rotation

There's extra work that has been done to make this work:

* Support for coloured overlay in vertex/texture painting
* Also made A button do stroke mode selection like in sculpt mode,
when mask painting is inactive.

There are some TODOs to work on during bcon3:

* Support tiled and stencil mode in 2D painting. Support alpha textures also.
* Tidy up overlay code. There's some confusion there due
to the way we use the primary brush texture sometimes for alpha, other times
for colour control.

WIP design docs will be in

8 years agoElbeem fluid: Remove hardcoded 16GB RAM limit on 64bit systems
Daniel Genrich [Sat, 30 Mar 2013 20:50:28 +0000 (20:50 +0000)]
Elbeem fluid: Remove hardcoded 16GB RAM limit on 64bit systems

8 years agoTidy up stroke options and make them sexy, aka the paint option
Antony Riakiotakis [Sat, 30 Mar 2013 11:40:09 +0000 (11:40 +0000)]
Tidy up stroke options and make them sexy, aka the paint option
sculptification commit. We have a drop menu to select the stroke mode
now. Jitter controls appear under stroke panel under all modes (As they
should! They stroke control options). Also enable jittering for all
modes. I really fail to see why not.

8 years agoBeautify - use a heap for the edge rotation queue rather then checking to rotate...
Campbell Barton [Sat, 30 Mar 2013 11:05:57 +0000 (11:05 +0000)]
Beautify - use a heap for the edge rotation queue rather then checking to rotate all edges until none can be rotated.

this means the best edges to rotate are done first, also speeds up execution ~20% in my tests.

8 years agocode cleanup: move beauty fill calculation into its own function and some style cleanup
Campbell Barton [Sat, 30 Mar 2013 09:57:35 +0000 (09:57 +0000)]
code cleanup: move beauty fill calculation into its own function and some style cleanup

8 years agocode comments: bmesh operator doxy header descriptions.
Campbell Barton [Sat, 30 Mar 2013 08:54:50 +0000 (08:54 +0000)]
code comments: bmesh operator doxy header descriptions.

8 years agoCompile fix for recent OCIO commit, missing GLEW include.
Thomas Dinges [Fri, 29 Mar 2013 16:17:22 +0000 (16:17 +0000)]
Compile fix for recent OCIO commit, missing GLEW include.

8 years agoImplement GPU-side display transform for clip editor
Sergey Sharybin [Fri, 29 Mar 2013 16:02:27 +0000 (16:02 +0000)]
Implement GPU-side display transform for clip editor

Implemented using GLSL API from OpenColorIO library and
some general functions were added to it's c-api:

- OCIO_setupGLSLDraw prepares OpenGL context for GPU-based
  transformation for a giver processor.

  This function compiles and links shader, sets  up it's
  argument. After this transformation would be applied
  on an image displaying as a 2D texture.

  So, glaDrawPixelsTex called after OCIO_setupGLSLDraw will
  do a proper color space transform.

- OCIO_finishGLSLDraw restores OpenGL context after all
  color-managed display is over.

- OCIO_freeOGLState frees allocated state structure used
  for cacheing some GLSL-related stuff.

There're some utility functions in IMB_colormanagent which
are basically proxies to lower level OCIO functions but
which could be used from any place in blender.

Chacheing of movie clip frame on GPU is also removed now,
and either glaDrawPixelsTex or glaDrawPixelsAuto are used
for display now. This is so no code duplication happens
now and no large textures are lurking around in GPU memory.

Known issues:
- Texture buffer and GLSL are no longer checking for
  video card capabilities, possibly could lead to some
  artifacts on crappy drivers/cards.

- Only float buffers are displaying using GLSL, byte
  buffers will still use fallback display method.

  This is to be addressed later.

- If RGB curves are used as a part of display transform,
  GLSL display will also be disabled. This is also thing
  to be solved later.

Additional changes:

- glaDrawPixelsTexScaled will now use RGBA16F as an
  internal format of storing textures when it's used
  to draw float buffer. This is needed so LUT are
  applied without precision loss.

8 years agoSlight cleanup for 2d painting. Cache is always enabled (used one of the
Antony Riakiotakis [Fri, 29 Mar 2013 15:18:22 +0000 (15:18 +0000)]
Slight cleanup for 2d painting. Cache is always enabled (used one of the
bookkeeping variables from when the code was shared with texture
painting) Also texonly now is always zero, probably another leftover
from 2d/3d painting entanglement era.

8 years agoSupport for brush overlay in texture paint mode. For the image editor,
Antony Riakiotakis [Fri, 29 Mar 2013 14:02:28 +0000 (14:02 +0000)]
Support for brush overlay in texture paint mode. For the image editor,
the tiled overlay is still a bit off, investigating on how to better
correct this, though it may well be non trivial.

8 years agoremove unused GLUquadricObj in draw_manipulator_rotate()
Campbell Barton [Fri, 29 Mar 2013 11:44:52 +0000 (11:44 +0000)]
remove unused GLUquadricObj in draw_manipulator_rotate()

8 years agofix/workaround [#34346] Blender total crashes when File/User preferences twice and...
Campbell Barton [Fri, 29 Mar 2013 07:14:18 +0000 (07:14 +0000)]
fix/workaround [#34346] Blender total crashes when File/User preferences twice and go to System tab

8 years agomisc minor edits.
Campbell Barton [Fri, 29 Mar 2013 06:25:22 +0000 (06:25 +0000)]
misc minor edits.

- pass string size to BLI_timestr() to avoid possible buffer overrun.
- quiet warning for mingw.
- include guards for windows utf conversion funcs.
- fix for mistage in edge-angle-selection check.
- some style cleanup.

8 years agostyle cleanup
Campbell Barton [Fri, 29 Mar 2013 06:21:28 +0000 (06:21 +0000)]
style cleanup

8 years agominor improvement to edge-angle-drawing, when transforming verts draw the angle of...
Campbell Barton [Fri, 29 Mar 2013 04:38:10 +0000 (04:38 +0000)]
minor improvement to edge-angle-drawing, when transforming verts draw the angle of the opposite edge since this is the angle thats being changed.

8 years agoadd edge-angle drawing in editmode for manifold edges.
Campbell Barton [Fri, 29 Mar 2013 04:01:52 +0000 (04:01 +0000)]
add edge-angle drawing in editmode for manifold edges.

8 years agominor fix for annoyance with directory selection on windows.
Campbell Barton [Fri, 29 Mar 2013 01:34:04 +0000 (01:34 +0000)]
minor fix for annoyance with directory selection on windows.

selecting a relative directory through BUTTONS_OT_directory_browse would convert '//' into '//\'.

8 years agocode cleanup: quiet warnings building with mingw.
Campbell Barton [Fri, 29 Mar 2013 00:50:52 +0000 (00:50 +0000)]
code cleanup: quiet warnings building with mingw.

8 years agoCode cleanup / Sequencer:
Thomas Dinges [Thu, 28 Mar 2013 22:09:55 +0000 (22:09 +0000)]
Code cleanup / Sequencer:
* Remove "use_frame_blend" from RNA and UI file, not used anywhere in the code, also mark SEQ_SPEED_BLEND as deprecated.

8 years agofix [#34804] Only timeline_markers[0] is selectable if multiple markers at same frame
Campbell Barton [Thu, 28 Mar 2013 20:58:14 +0000 (20:58 +0000)]
fix [#34804] Only timeline_markers[0] is selectable if multiple markers at same frame

also add macros for looping on listbases as if they were circular lists which is handy for cycling over items.

8 years agodon't save select extend state for marker selection.
Campbell Barton [Thu, 28 Mar 2013 20:34:12 +0000 (20:34 +0000)]
don't save select extend state for marker selection.

8 years agoUse same opencollada rev as windows' libs.
Bastien Montagne [Thu, 28 Mar 2013 20:24:36 +0000 (20:24 +0000)]
Use same opencollada rev as windows' libs.

8 years agocode cleanup: python/pep8 and double-promotion warnings.
Campbell Barton [Thu, 28 Mar 2013 19:33:14 +0000 (19:33 +0000)]
code cleanup: python/pep8 and double-promotion warnings.

8 years agoscon update for new collada libraries
Gaia Clary [Thu, 28 Mar 2013 18:04:07 +0000 (18:04 +0000)]
scon update for new collada libraries

8 years agoUpdated Blender Collada module to newest opencollada API
Gaia Clary [Thu, 28 Mar 2013 18:03:01 +0000 (18:03 +0000)]
Updated Blender Collada module to newest opencollada API

8 years agomodified build system for updated opencollada libraries (windows only, other platform...
Gaia Clary [Thu, 28 Mar 2013 18:02:24 +0000 (18:02 +0000)]
modified build system for updated opencollada libraries (windows only, other platforms might want to update as well)

8 years agoI18n: various fixing.
Bastien Montagne [Thu, 28 Mar 2013 15:41:43 +0000 (15:41 +0000)]
I18n: various fixing.

* Reflect changes stated in prev commit about contexts in py code.

* Add a "Plural" context, to handle cases where english does not mark plural at all (e.g. shorten labels of only one adjective). Not so happy with that, but can't see any other way to do it, for now.

* Abuse "ID_CURVE" context for all falloff curves (this should solve some confusion issues, e.g. "sharp"...).