8 years agoCmake / Fluids:
Thomas Dinges [Mon, 20 May 2013 14:00:19 +0000 (14:00 +0000)]
Cmake / Fluids:
* Possible fix for Fluid threads UI not being shown with cmake builds.

8 years agocode cleanup: rename bmesh operator files to be more consistent
Campbell Barton [Mon, 20 May 2013 07:38:11 +0000 (07:38 +0000)]
code cleanup: rename bmesh operator files to be more consistent

8 years agofix [#35434] Segmentation fault switching screen layout from python
Campbell Barton [Mon, 20 May 2013 05:06:52 +0000 (05:06 +0000)]
fix [#35434] Segmentation fault switching screen layout from python

8 years agoCode Cleanup / Cycles:
Thomas Dinges [Mon, 20 May 2013 00:26:48 +0000 (00:26 +0000)]
Code Cleanup / Cycles:
* Remove an unused parameter from Checker texture and correct a typo in license header.

8 years agocode cleanup: remove unneeded elements in uv NearestHit.
Campbell Barton [Sun, 19 May 2013 18:05:34 +0000 (18:05 +0000)]
code cleanup: remove unneeded elements in uv NearestHit.

8 years agocode cleanup: bmesh/uv
Campbell Barton [Sun, 19 May 2013 17:45:42 +0000 (17:45 +0000)]
code cleanup: bmesh/uv
- uv_mouse_select() move from BLI_array to alloca
- was unnecessarily looping over faces for an index lookup when an array is already created.

8 years agocode cleanup: remove some kludge from uv loop select
Campbell Barton [Sun, 19 May 2013 17:20:10 +0000 (17:20 +0000)]
code cleanup: remove some kludge from uv loop select

8 years agocode cleanup: uv_find_nearest_vert
Campbell Barton [Sun, 19 May 2013 16:52:44 +0000 (16:52 +0000)]
code cleanup: uv_find_nearest_vert
was doing unneeded lookups on face uv's when the adjacent uv's are known.

8 years agoremove WITH_AVX_CPU, also used add_definitions incorrectly.
Campbell Barton [Sun, 19 May 2013 16:47:41 +0000 (16:47 +0000)]
remove WITH_AVX_CPU, also used add_definitions incorrectly.
single cflags can be added manually and don't need their own options.

8 years agostyle cleanup
Campbell Barton [Sun, 19 May 2013 15:11:25 +0000 (15:11 +0000)]
style cleanup

8 years agocode cleanup: simplify fast_ray_nearest_hit()
Campbell Barton [Sun, 19 May 2013 15:03:36 +0000 (15:03 +0000)]
code cleanup: simplify fast_ray_nearest_hit()

8 years agorevert (ifdef) r54745. which enbabled alpha in the GL buffer.
Campbell Barton [Sun, 19 May 2013 11:39:22 +0000 (11:39 +0000)]
revert (ifdef) r54745. which enbabled alpha in the GL buffer.
looks to be the cause of bug [#35415]

we can make this optional.

8 years agofix memory corruption: allocated memory space did not match the needed space
Gaia Clary [Sun, 19 May 2013 09:45:53 +0000 (09:45 +0000)]
fix memory corruption: allocated memory space did not match the needed space

8 years agofix for mistake in r56903
Campbell Barton [Sun, 19 May 2013 08:46:17 +0000 (08:46 +0000)]
fix for mistake in r56903

8 years agoFix for last fix, compile error in smoke code.
Brecht Van Lommel [Sun, 19 May 2013 04:12:00 +0000 (04:12 +0000)]
Fix for last fix, compile error in smoke code.

8 years agoFix #35407: different particle behavior compared to 2.66, reverted part of 56073.
Brecht Van Lommel [Sun, 19 May 2013 04:07:01 +0000 (04:07 +0000)]
Fix #35407: different particle behavior compared to 2.66, reverted part of 56073.

8 years agoBGE: Applying patch [#35416] "Missing python properties on ActionActuator: layer...
Mitchell Stokes [Sun, 19 May 2013 03:15:50 +0000 (03:15 +0000)]
BGE: Applying patch [#35416] "Missing python properties on ActionActuator: layer, layerWeight" from Florian Bantner (scheintodx).

8 years agoFix for [#35245] Freestyle getting stuck on view map creation + memory leaks.
Tamito Kajiyama [Sun, 19 May 2013 00:56:40 +0000 (00:56 +0000)]
Fix for [#35245] Freestyle getting stuck on view map creation + memory leaks.

There were two issues:

- Line visibility computations are very slow in the case of the provided .blend file, which gave
an impression that the rendering process got stuck.  The slowness can be explained by the present
data structures used for the line visibility computations, together with the specific mesh distribution
of the test scene.  At the moment Freestyle uses a regular grid in the 2D image coordinate system
to divide tris/quads into small groups in order to accelerate the line visibility computations.
On the other hand, the test scene is populated a big plane (made of one quad) and a moderately
detailed mesh object (22K tris).  The scale of the latter mesh is animated from nearly zero to
about 0.2 to make the object show up over time.  When the scale is nearly equal to zero, all the
tris concentrate in one grid cell, so essentially there is no performance gain from the grid data
structure optimized for speed.  It looks like a better grid data structure (possibly based on
adaptive grid refinement) is necessary to genuinely address the identified performance issue.  For now
the progress bar of Blender is employed to better inform users of the amount of work done in the line
visibility computations.

- A crash was caused by an excessive memory allocation request.  The X and Y dimensions of the grid
data structure are determined based on the average area of mesh faces in the given scene.  When the big
plane in the test scene is excluded from the rendering, the average area is almost zero (on the order
of 1e-5).  As a result of this extremely small average area, the X and Y dimensions were set to a very
large number, causing a fatal memory allocation error.  The present revision has introduced a hard
upper limit to the dimensions of the grid data structure to avoid this kind of numerical instability.

8 years agoCycles:
Thomas Dinges [Sat, 18 May 2013 22:40:21 +0000 (22:40 +0000)]
* Fix OSL compilation for scene_intersect(), when __Hair__ was disabled.

8 years agoOptimizations for dyntopo
Campbell Barton [Sat, 18 May 2013 19:18:55 +0000 (19:18 +0000)]
Optimizations for dyntopo
- creating faces was unnecessarily checking if they already existed.
- deleting a face did edge-lookups, when the edges are already available from the face-loops.

8 years agoFix crash due to shared paint cursor function. It is necessary to check
Antony Riakiotakis [Sat, 18 May 2013 15:51:40 +0000 (15:51 +0000)]
Fix crash due to shared paint cursor function. It is necessary to check
if we really are in sculpt mode context since the active object may be
in sculpt mode while cursor is in the 2d paint editor.

8 years agoFix for #35373, calling any paint operator from operator search menu
Antony Riakiotakis [Sat, 18 May 2013 15:24:25 +0000 (15:24 +0000)]
Fix for #35373, calling any paint operator from operator search menu
with mouse crashes blender.

Issue here is that paint operator invocation, immediately calls modal,
which checks if event is the same as initialization event plus keyup.
Since using the mouse on amenu calls the operator on mouse button up,
the operator ended immediately and that cause immediate cleanup and

Worked around this by forbidding the operator to finish on first modal
call (which is expected by all the asserts on invoke anyway). This
prevents the crash but requires an extra up event to end.

Also, ported part of Jason Wilkins' patch to stroke code to allow for
stroke sampling to be done before a dab is first performed and as soon
as the stroke begins

8 years agoCycles / OSL:
Thomas Dinges [Sat, 18 May 2013 14:36:03 +0000 (14:36 +0000)]
Cycles / OSL:
* Added Westin Sheen and Westin Backscatter closures for testing, useful for Cloth like effects.

Only available via OSL, added an example OSL shader to the Templates (Text Editor).

8 years agoComment out coordinates mapping made in rev55469
Sergey Sharybin [Sat, 18 May 2013 12:21:01 +0000 (12:21 +0000)]
Comment out coordinates mapping made in rev55469

Such mapping only worked foe compositor output node
(with some issues btw) and failed dramatically for
nodes like previews and viewers.

For now let's behave the same way as border+crop
worked in 2.66 for until proper feature support
is ready (which could take some time).

Fixes #35313: object and ID anti-aliased masks get messed up
              when using border render + crop

8 years agostyle cleanup
Campbell Barton [Sat, 18 May 2013 11:37:49 +0000 (11:37 +0000)]
style cleanup

8 years agoPainting / Sculpting: more tweaks to pressure sensitivity
Brecht Van Lommel [Sat, 18 May 2013 11:25:24 +0000 (11:25 +0000)]
Painting / Sculpting: more tweaks to pressure sensitivity

* Also do pressure interpolation for brush size and spacing.
* Do smoothing of pressure when smooth stroke and sample average is enabled.
* Revert the OS X specific pressure change to pressure ^ 2.5, for low pressure
  values like 0.05 it makes the pressure 100x lower, which is problematic. If
  we need to adjust the pressure curve it should be done for all platforms.

Still weak:

* Pressure of first touch on tablet is difficult to control, usually it's low
  which makes the stroke start out small or soft, but other times not. Finer
  event capturing at ghost level would help, along with pressure changes without
  mouse movement, but this may also need different paint stroke logic.
* Brush radius is rounded to integers, this gives noticeable stepping.
* Brush falloff is not antialiased, gives noticeable aliasing for small brush
  sizes which was always a problem, but is more common with size pressure control.

8 years agoCode cleanup / Cycles:
Thomas Dinges [Sat, 18 May 2013 11:04:29 +0000 (11:04 +0000)]
Code cleanup / Cycles:
* Simplify shaperadius() function a bit to avoid castings.
* Style cleanup 1.f -> 1.0f, to follow rest of Cycles code.

8 years agoFix #35390: sequencer end frame of preview range was not drawing correct.
Brecht Van Lommel [Sat, 18 May 2013 10:24:38 +0000 (10:24 +0000)]
Fix #35390: sequencer end frame of preview range was not drawing correct.

8 years agoFix #35404: crash in file save with python code that accesses mesh from panel.
Brecht Van Lommel [Sat, 18 May 2013 10:24:34 +0000 (10:24 +0000)]
Fix #35404: crash in file save with python code that accesses mesh from panel.

On file save the mesh gets loads from the editmesh but the derived mesh caches
wer not cleared. This usually happens through the depsgraph but it needs to be
done manually here. Most changes are some refactoring to deduplicate derived
mesh freeing code.

8 years agoStroke code:
Antony Riakiotakis [Sat, 18 May 2013 09:44:30 +0000 (09:44 +0000)]
Stroke code:

* Fix crash on 2d painting when no active object is present (NULL
pointer dereference in cursor drawing)
* Skip conditional on space_stroke function, since this is already
checked for on higher level.
* Interpolate pressure on spaced strokes.

8 years agobump to version '2.67a'
Campbell Barton [Sat, 18 May 2013 08:47:34 +0000 (08:47 +0000)]
bump to version '2.67a'

8 years agorigidbody: Add missig notifiers for add/remove operators
Sergej Reich [Fri, 17 May 2013 18:34:13 +0000 (18:34 +0000)]
rigidbody: Add missig notifiers for add/remove operators

Fixes [#35403] Highlight not updating instantly when removing from Rigid body

8 years agoSmoke simulator: Add flow subframes and ability to set custom particle size.
Miika Hamalainen [Fri, 17 May 2013 17:45:37 +0000 (17:45 +0000)]
Smoke simulator: Add flow subframes and ability to set custom particle size.

Previously it was nearly impossible to have fast moving objects emitting smoke or they would just leave behind a row of smoke poofs instead of continious stream of smoke. Now it's possible to set number of subframes for each smoke flow.

Another new thing is ability to set size of smoke flow particles instead of using closest smoke cell. This also works with my earlier "full sample" commit, so no more blocky particles either. :)

For more info check my blog post:

This commit also includes couple of fixes I spotted while testing:
* Fix: dissolve was applied at different time for low res and high res simulations.
* Fix: full sample setting didn't get copied with domain.

8 years agoMore work on 3d view render:
Ton Roosendaal [Fri, 17 May 2013 16:46:59 +0000 (16:46 +0000)]
More work on 3d view render:

- reverted fix for bug 32537 (error report drawing after thread job didn't show)

  This solves very bad 3d view render updates while using transform, it was
  getting into an eternal feedback loop for dependencies. (jobs sending mousemoves
  causing jobs to end, causing mousemoves, causing etc).

- The render-update code was not going over all windows, but over every screen to
  send signals (also the invisble ones)

8 years agoFix for #35390 fix: sequencer scene start/end still did not display when they are...
Brecht Van Lommel [Fri, 17 May 2013 16:37:47 +0000 (16:37 +0000)]
Fix for #35390 fix: sequencer scene start/end still did not display when they are equal.

8 years agofix for crash with toggle-drag on a popup (when the popup is closed while dragging).
Campbell Barton [Fri, 17 May 2013 13:54:44 +0000 (13:54 +0000)]
fix for crash with toggle-drag on a popup (when the popup is closed while dragging).

8 years agoBug fix, own collection.
Ton Roosendaal [Fri, 17 May 2013 13:15:43 +0000 (13:15 +0000)]
Bug fix, own collection.

Shapekey drivers were executed for every call to derivedmesh, which shouldn't happen.
It now only runs on the object_update() function, once for every depsgraph change.

Error was found while testing preview render in viewport. On each render, the
animsys sent a 'changed data' because of the shapekey drivers being called,
causing eternal re-render loops (without showing anything).

8 years agoFix #35369: Crop node or FileOutput node bug.
Sergey Sharybin [Fri, 17 May 2013 13:02:03 +0000 (13:02 +0000)]
Fix #35369: Crop node or FileOutput node bug.

Issue was caused by file output node actually,

The thing here is, compositor output does have fixed
resolution and we could predict how to map coordinates
for border and cropping in that case.

But viewers and file output nodes are currently totally
depending on an input resolution. Could not see how
border could be applied reliably in this cases.

Disabling border option for file output node, so
now it shall behave the same way as it was before.

Discovered issues when using cropping to render border,
namely there's an offset in viewer nodes and previews,
but this is separate issue i guess (file output seems
to work fine). Will revisit this issue in next days.

8 years agocode cleanup: use BM_elem_flag_test rather then accessing 'ele->head.hflag'
Campbell Barton [Fri, 17 May 2013 12:43:58 +0000 (12:43 +0000)]
code cleanup: use BM_elem_flag_test rather then accessing 'ele->head.hflag'

8 years agoignore hidden edges for bmesh grid-fill.
Campbell Barton [Fri, 17 May 2013 12:26:14 +0000 (12:26 +0000)]
ignore hidden edges for bmesh grid-fill.

8 years agofix for BM_mesh_edgeloops_find(), could give edge loops with one vert. (caused bridge...
Campbell Barton [Fri, 17 May 2013 12:11:34 +0000 (12:11 +0000)]
fix for BM_mesh_edgeloops_find(), could give edge loops with one vert. (caused bridge to crash sometimes)

8 years agofix for error in bridge tool, using freed faces from bmo input.
Campbell Barton [Fri, 17 May 2013 12:05:07 +0000 (12:05 +0000)]
fix for error in bridge tool, using freed faces from bmo input.

8 years ago3D Viewport rendering (Blender Internal)
Ton Roosendaal [Fri, 17 May 2013 11:13:46 +0000 (11:13 +0000)]
3D Viewport rendering (Blender Internal)

Added incremental re-render on view changes. That means all data preprocessing
only needs to be done once on view changes, quite faster that way.

Also fixed a bug in raytracing strands with soft shadows, was wrongly changing
coordinates in a static array.

Note: proper signals for re-renders is still on the todo. Many button options
don't signal a re-render yet. Work around: press G+ESC for quick full renders.

8 years agoFix #35393: Sculpt Shortcuts are bananas.
Sergey Sharybin [Fri, 17 May 2013 11:08:50 +0000 (11:08 +0000)]
Fix #35393: Sculpt Shortcuts are bananas.

Issue was introduced by self in svn rev56815.
Brushes list was simply not fully traversing
due to mistake in termination condition.

8 years agoFix #35390: the verticel lines indicating scene start and end frame in the
Brecht Van Lommel [Fri, 17 May 2013 09:47:05 +0000 (09:47 +0000)]
Fix #35390: the verticel lines indicating scene start and end frame in the
sequencer now draw such that a strip that spans this time is contained just
between these lines.

8 years agobump mathutils callback slot size.
Campbell Barton [Fri, 17 May 2013 07:10:40 +0000 (07:10 +0000)]
bump mathutils callback slot size.

8 years agoThis commit addresses the somewhat weak handling of stackless textures in Blender...
Bastien Montagne [Fri, 17 May 2013 07:10:10 +0000 (07:10 +0000)]
This commit addresses the somewhat weak handling of stackless textures in Blender with default (BI) renderer. To do so, it's defining an "other" texture context, and when in this one, it switches to using the "new shading" texture handling already known with Cycles engine.

So now, in the new "other" tex context, you can (depending on active data) have direct access to modifiers', force's or brushes' textures...

I also refactored a bit how texture contexts are handled (once again, we had some quite similar code in both space_buttons and RNA sources). This should also solve some harmless glitches like "no texture context selected in UI" sometimes when you remove data related to current texture (see e.g. after removing the material from default cube, in startup scene).

This usage of two different systems for textures, and the handling of switches between them, has been a bit tricky to get working right, but it is OK now I think. I also had to add a bool flag to buttons space, SB_TEX_USER_LIMITED (use_limited_texture_context in RNA), which indicates "new shading" texture code whether it has to ignore materials, lamps etc. (BI) or not (Cycles).

Btw, pinned textures from modifiers/force/etc. were also broken (showing nothing), now it should work too.

Thanks to Brecht for reviewing.

8 years agoFix #35398: changing render layer name causes animation to be lost.
Brecht Van Lommel [Fri, 17 May 2013 00:39:37 +0000 (00:39 +0000)]
Fix #35398: changing render layer name causes animation to be lost.

8 years agoFix for Freestyle built-in style module not...
Tamito Kajiyama [Thu, 16 May 2013 23:49:05 +0000 (23:49 +0000)]
Fix for Freestyle built-in style module not working correctly.
Suitable for inclusion in 2.67a.

Logical AND, OR and XOR operations on freestyle.Nature instances gave an error in some cases.
The updated C implementation of these bitwise operations is intended to reproduce the following Python implementation:

class Nature(int):
    def __and__(self, other):
        return Nature(int(self) & int(other))
    def __or__(self, other):
        return Nature(int(self) | int(other))
    def __xor__(self, other):
        return Nature(int(self) ^ int(other))

The problem report was by plasmasolutions on IRC, thanks a lot!

8 years agoCode cleanup / Cycles:
Thomas Dinges [Thu, 16 May 2013 21:53:21 +0000 (21:53 +0000)]
Code cleanup / Cycles:
* Put render resolution x/y into a function.

8 years agopartial revert of commit 54126 - (BGE UI: removing " use_occlusion_culling" from...
Dalai Felinto [Thu, 16 May 2013 21:37:24 +0000 (21:37 +0000)]
partial revert of commit 54126 - (BGE UI: removing " use_occlusion_culling" from the ui)
bug reported by Eloy Felix over email

Apparently there are some files that will perform better with "use_occlusion_culling" off.
For now the UI option can return.

Technically this could make into 2.67a, but the string is not localized (it'll be in English).
Not sure what is more important here:

- consistent UI OR to expose in the UI an option some people need

8 years agoCycles / BSSRDF:
Thomas Dinges [Thu, 16 May 2013 18:39:45 +0000 (18:39 +0000)]
Cycles / BSSRDF:
* Avoid one max() call for the bssrdf radius, the if condition already checks for values < BSSRDF_MIN_RADIUS.

8 years agoworkaround for loopselect-slide (with multicut enabled) changing from vertex-select...
Campbell Barton [Thu, 16 May 2013 18:33:07 +0000 (18:33 +0000)]
workaround for loopselect-slide (with multicut enabled) changing from vertex-select to edge-select.
this is needed to slide, but wasn't so nice for users, now restore the original mode.

8 years agocode cleanup: double promotion warnings.
Campbell Barton [Thu, 16 May 2013 17:20:56 +0000 (17:20 +0000)]
code cleanup: double promotion warnings.

8 years ago* This is embarrassing...
Thomas Dinges [Thu, 16 May 2013 15:59:05 +0000 (15:59 +0000)]
* This is embarrassing...

8 years agoCycles:
Thomas Dinges [Thu, 16 May 2013 15:47:09 +0000 (15:47 +0000)]
* Revert part of r56832, if code gets more complicated, it's better to keep it more logical here.

8 years agofix for crash in grid-fill where it was possible for rail edges to overlap.
Campbell Barton [Thu, 16 May 2013 15:28:57 +0000 (15:28 +0000)]
fix for crash in grid-fill where it was possible for rail edges to overlap.

8 years agoFix #35388, grouped nodes not editable in properties ui.
Lukas Toenne [Thu, 16 May 2013 15:06:18 +0000 (15:06 +0000)]
Fix #35388, grouped nodes not editable in properties ui.

The issue here was that the "active" material node depends on the editor context. Previously (< 2.67) there was only 1 edited node group possible globally throughout Blender, so the active material in the context could be resolved more easily. The solution now involves the active_viewer_key variable (first introduced for compositor viewer nodes in r56271, naming is a bit awkward but hard to change in DNA). This key defines the "last modified" node tree to resolve ambiguity of active context items. For single editors the result is the same as in 2.66, if multiple editors are used with different node groups the last modified tree is used.

8 years agogrid-fill: fix error in detecting face flipping.
Campbell Barton [Thu, 16 May 2013 13:58:21 +0000 (13:58 +0000)]
grid-fill: fix error in detecting face flipping.

8 years agoFix #35384: animation to enable/disable render layers was applied one frame too
Brecht Van Lommel [Thu, 16 May 2013 12:03:21 +0000 (12:03 +0000)]
Fix #35384: animation to enable/disable render layers was applied one frame too
late when rendering animations.

8 years agoCMakeLists.txt changes to use new static Jack libs with VC2012
Jürgen Herrmann [Thu, 16 May 2013 11:24:19 +0000 (11:24 +0000)]
CMakeLists.txt changes to use new static Jack libs with VC2012

8 years agoFix compile error on VS2012.
Jürgen Herrmann [Thu, 16 May 2013 11:04:01 +0000 (11:04 +0000)]
Fix compile error on VS2012.
Unused variables (for debug only) give an error.

8 years agofix [#35385] freestyle rendering crash blender
Campbell Barton [Thu, 16 May 2013 08:04:45 +0000 (08:04 +0000)]
fix [#35385] freestyle rendering crash blender

8 years agobmesh grid fill: interpolate vertex customdata (useful for vertex weights and shapekeys)
Campbell Barton [Thu, 16 May 2013 07:21:34 +0000 (07:21 +0000)]
bmesh grid fill: interpolate vertex customdata (useful for vertex weights and shapekeys)

8 years agoquiet warnings from r56825
Campbell Barton [Thu, 16 May 2013 03:55:47 +0000 (03:55 +0000)]
quiet warnings from r56825
- using vars before checking they are defined
- /* within comment

8 years agoFix for [#35352] Freestyle + Geometry Spatial Noise freezes on render.
Tamito Kajiyama [Thu, 16 May 2013 00:20:57 +0000 (00:20 +0000)]
Fix for [#35352] Freestyle + Geometry Spatial Noise freezes on render.

SpatialNoiseShader, as well as SmoothingShader were not updating stroke length after
geometry modification, causing an infinite loop in Stroke::Resample(int iNPoints) due to
incorrect length-based resampling of stroke vertices.

8 years agoFix #35368:
Brecht Van Lommel [Thu, 16 May 2013 00:07:01 +0000 (00:07 +0000)]
Fix #35368:
* Editing number of segments for particle hair did not update the viewport.
* Hidden particles were confusing, the paths were drawn but without the points.
  Now it draws the path faded to indicate that they are hidden/locked.
* Select tips/roots operators now have options to select/deselect/toggle/invert.

8 years agoFix #35372: sculpting/painting long brush strokes with small brush size would
Brecht Van Lommel [Wed, 15 May 2013 22:55:30 +0000 (22:55 +0000)]
Fix #35372: sculpting/painting long brush strokes with small brush size would
take up a lot of memory.

The operator was recording an array with all stroke points. However this was not
particularly useful, only sculpt mode had exec() implemented to redo the stroke,
but it was not registering the operator anyway so there was no way to access the
data after the operator was done. So no one was using this anyway.

I did now implement exec for the paint modes so you can call the operator with
stroke points from a script.

8 years agoFix #35355: 2D image paint View mapping mode was dependent on zoom, this was
Brecht Van Lommel [Wed, 15 May 2013 21:03:57 +0000 (21:03 +0000)]
Fix #35355: 2D image paint View mapping mode was dependent on zoom, this was
wrong, it should just fit the texture in the brush circle.

8 years agoCode cleanup / Cycles:
Thomas Dinges [Wed, 15 May 2013 20:38:17 +0000 (20:38 +0000)]
Code cleanup / Cycles:
* Some simplification of closure code (Velvet and Toon).

8 years agobmesh, grid fill tool.
Campbell Barton [Wed, 15 May 2013 20:34:40 +0000 (20:34 +0000)]
bmesh, grid fill tool.

This uses 2 edge loops and fills them with a grid, taking into account curvature of surrounding edges.
Access from face menu: Ctrl+F,G

8 years agoFix #35376: node editor throwing python error on some files saved with 2.66 test...
Brecht Van Lommel [Wed, 15 May 2013 19:24:07 +0000 (19:24 +0000)]
Fix #35376: node editor throwing python error on some files saved with 2.66 test builds.

8 years agoFix cycles CUDA error with world multiple importance sampling, after recent OpenCL...
Brecht Van Lommel [Wed, 15 May 2013 19:02:30 +0000 (19:02 +0000)]
Fix cycles CUDA error with world multiple importance sampling, after recent OpenCL fixes.

8 years agoFix action zones not drawing properly while sculpting, due to recent bugfix.
Brecht Van Lommel [Wed, 15 May 2013 17:59:55 +0000 (17:59 +0000)]
Fix action zones not drawing properly while sculpting, due to recent bugfix.

Partial redraw doesn't work so well with these, now I've changed the action
zones to just draw as part of regions instead of as a special overdraw done
at the end, which fits better with partial redraw by avoiding any special

8 years agoFixes for blender internal viewport render:
Brecht Van Lommel [Wed, 15 May 2013 17:09:45 +0000 (17:09 +0000)]
Fixes for blender internal viewport render:

* Particles did not render at viewport resolution like meshes.
* Properties editor preview render of hair was crashing, solution is to have
  two separate flags for this preview render and viewport preview render.

8 years agoFix for missing finalization of memory blocks allocated in the Freestyle module.
Tamito Kajiyama [Wed, 15 May 2013 17:06:56 +0000 (17:06 +0000)]
Fix for missing finalization of memory blocks allocated in the Freestyle module.
Suitable for inclusion in 2.67a.

8 years agoLibmv internal compiler error workaround for VC2012.
Jürgen Herrmann [Wed, 15 May 2013 17:00:53 +0000 (17:00 +0000)]
Libmv internal compiler error workaround for VC2012.
Will be reverted as soon as the x64 compiler is fixed.
For now it shouldn't have an impact on tracking performance. My test have shown no significant speed difference to official VC2008 build of 2.67.

8 years agouse bool arrays rather then char for weight paint lock/select arrays
Campbell Barton [Wed, 15 May 2013 15:52:48 +0000 (15:52 +0000)]
use bool arrays rather then char for weight paint lock/select arrays

8 years agoAttempt to fix #35057 and #35372: slow texture painting performance.
Brecht Van Lommel [Wed, 15 May 2013 14:37:05 +0000 (14:37 +0000)]
Attempt to fix #35057 and #35372: slow texture painting performance.

After the paint refactoring for 2.67, the OpenGL texture was getting updated for
every stroke point, rather than once for every redraw. With a small brush radius
and low spacing the number of stroke points can be quite large, which might have
a big performance impact depending on the graphics card / drivers.

Also for 2D image paint, avoid redrawing the button panels and properties editor
during painting.

There is another possible cause for slowdowns with 3D texture painting which was
not fixed. Projection painting is creating and destroying threads for every stroke
point. Depending on the CPU/OS there might be a lot of overhead in doing that if
the brush size is small.

8 years agoFix another cases where painting long brush strokes with small radius was slowed
Brecht Van Lommel [Wed, 15 May 2013 14:37:01 +0000 (14:37 +0000)]
Fix another cases where painting long brush strokes with small radius was slowed
down, this time by the operator properties getting converted to a string for
display in the info window.

With 1000+ stroke points this can get slow, and takes up too much space anyway,
so now it's (somewhat arbitrarily) limited to printing only 10 points.

8 years agoFix slow resizing of ID property arrays with more than 1619 items, it incorrectly
Brecht Van Lommel [Wed, 15 May 2013 14:36:58 +0000 (14:36 +0000)]
Fix slow resizing of ID property arrays with more than 1619 items, it incorrectly
reverted to sizing with by 1 each time. This was slowing down painting long strokes
with small brush radius.

8 years agoFix #35354: dyntopo - materials and UI display issues
Sergey Sharybin [Wed, 15 May 2013 12:33:28 +0000 (12:33 +0000)]
Fix #35354: dyntopo - materials and UI display issues

Textured dyntopo draw was leaving 2d textures enabled when it shouldn't.

Root of the issue was figured out by Campbell, actual place where
2D textures left enabled found by self.

Also, simplified fix is suggested by Campbell (mine was 2 lines longer! :)

8 years agoThe Area Split/Merge corner widget was drawing 1 pixel too big, the lines overlapped
Ton Roosendaal [Wed, 15 May 2013 12:05:35 +0000 (12:05 +0000)]
The Area Split/Merge corner widget was drawing 1 pixel too big, the lines overlapped
the area divider line.

8 years agoPatch for CMakeLists.txt to build with new OpenAL libs on VS2012.
Jürgen Herrmann [Wed, 15 May 2013 11:26:57 +0000 (11:26 +0000)]
Patch for CMakeLists.txt to build with new OpenAL libs on VS2012.
Because of crashing issue with old Creative Labs OpenAL on Windows 8 x64.

8 years agoFix part of #35372: distorted strokes when painting zoomed out with a small brush
Brecht Van Lommel [Wed, 15 May 2013 11:16:01 +0000 (11:16 +0000)]
Fix part of #35372: distorted strokes when painting zoomed out with a small brush
size. Interpolated mouse coordinates should not get rounded to integers.

8 years agoFix #35364: sculpting - D shortcut inconsistency
Sergey Sharybin [Wed, 15 May 2013 11:10:59 +0000 (11:10 +0000)]
Fix #35364: sculpting - D shortcut inconsistency

Switching to tool will cycle via all brushes with given type
only in case current brush tool matches requested one.

This means, when user requests brush with different type,
first brush of that tool will be activated. But further
toggling to the same tool will cycle via all acceptable

8 years agofix for finding openjpeg on some systems.
Campbell Barton [Wed, 15 May 2013 09:57:17 +0000 (09:57 +0000)]
fix for finding openjpeg on some systems.

8 years agoMove sculptsession functions implementation from object.c to paint.c
Sergey Sharybin [Wed, 15 May 2013 08:54:05 +0000 (08:54 +0000)]
Move sculptsession functions implementation from object.c to paint.c

This functios are declared in BKE_paint.h header and using
SculptSession structure which is also declared there.

Anyway, does not make sense such a splitting of header and
implementation files, better be consistent here.

8 years agoFix #35362: using dyntopo gives wrong render results
Sergey Sharybin [Wed, 15 May 2013 08:25:42 +0000 (08:25 +0000)]
Fix #35362: using dyntopo gives wrong render results

Made it so dynamic topology will flush changes from
SculptSession->bm to Object->me.

Used the same approach as sculptsession_bm_to_me does,
but instead of using DAG_id_tag_update used in-place
DerivedMesh release. Otherwise this lead to some
update issues resulting in missed object after render.

Also fixed multires modifier not being applied for
render when rendering from dyntopo sculpt mode.

P.S. Apparently sculpsession_bm_to_me was declared
     in BKE_paint.h but implemented in object.c.
     Rather confusing and better make it so this
     functions are declared and implemented in
     consistent files. But will solve this in a
     separate commit.

8 years agobmesh edgeloop utility function, calculates an edge loop from 2 verts (start and...
Campbell Barton [Wed, 15 May 2013 06:27:48 +0000 (06:27 +0000)]
bmesh edgeloop utility function, calculates an edge loop from 2 verts (start and endpoint).

8 years agofix for own recent change with normal calculation (with no faces it wasn't freeing...
Campbell Barton [Wed, 15 May 2013 05:56:49 +0000 (05:56 +0000)]
fix for own recent change with normal calculation (with no faces it wasn't freeing 0 byte allocation).

8 years agoMore fix for memory leaks in the Freestyle module.
Tamito Kajiyama [Wed, 15 May 2013 01:30:03 +0000 (01:30 +0000)]
More fix for memory leaks in the Freestyle module.

8 years agoBGE: A little bit of cleanup:
Mitchell Stokes [Tue, 14 May 2013 22:52:10 +0000 (22:52 +0000)]
BGE: A little bit of cleanup:
  * Removing KX_Scene::RemoveAnimatedObject() since KX_Scene::NewRemoveObject() is already handling this.
  * Don't create a new BL_ActionManager when replicating an object. Just set m_actionManager to NULL and let KX_GameObject::GetActionManager() allocate a new BL_ActionManager when one is needed.
  * Use KX_GameObject::GetScene() instead of KX_GetActiveScene() in KX_GameObject::GetActionManager() to make sure we're using the object's scene instead of one where Python might currently be running from. This could avoid potential issues with playing actions for objects in other scenes.

8 years agoFurther fix for memory leaks in Freestyle Python API components:
Tamito Kajiyama [Tue, 14 May 2013 22:51:11 +0000 (22:51 +0000)]
Further fix for memory leaks in Freestyle Python API components:
- StrokeAttribute thickness setter
- BezierCurve (used from within BezierCurveShader)
- Smoother (used from within SmoothingShader)

8 years agoFix for a copy-and-paste bug in a Freestyle Python API helper function.
Tamito Kajiyama [Tue, 14 May 2013 22:16:18 +0000 (22:16 +0000)]
Fix for a copy-and-paste bug in a Freestyle Python API helper function.

8 years agoCycles:
Thomas Dinges [Tue, 14 May 2013 21:18:20 +0000 (21:18 +0000)]
* Code cleanup, remove unused "resolution" variable from the DeviceTask class, was never used.

8 years agoPatch to CMake build system.
Jürgen Herrmann [Tue, 14 May 2013 19:08:45 +0000 (19:08 +0000)]
Patch to CMake build system.
Install needed dlls for libjack.

8 years agoCycles :
Thomas Dinges [Tue, 14 May 2013 18:31:55 +0000 (18:31 +0000)]
Cycles :
* Use is_zero(a) rather than dot(a, a) == 0, saves some calculations.

8 years agoMoved main part of doc out of C code, as suggested by Campell...
Bastien Montagne [Tue, 14 May 2013 18:16:37 +0000 (18:16 +0000)]
Moved main part of doc out of C code, as suggested by Campell, thx.

8 years agoFix #35347: constraints with vertex group targets were not using the vertex group
Brecht Van Lommel [Tue, 14 May 2013 16:22:53 +0000 (16:22 +0000)]
Fix #35347: constraints with vertex group targets were not using the vertex group
weights, it assumed all weights were 1. This gave very different results with the
new bevel modifier due to slightly different vertex group interpolation.