Commit Graph

39312 Commits

Author SHA1 Message Date
Jürgen Herrmann
cd34945792 Fix compile error on VS2012.
Unused variables (for debug only) give an error.
2013-05-16 11:04:01 +00:00
Campbell Barton
812cd6c75e fix [#35385] freestyle rendering crash blender 2013-05-16 08:04:45 +00:00
Campbell Barton
d4dc67d318 bmesh grid fill: interpolate vertex customdata (useful for vertex weights and shapekeys) 2013-05-16 07:21:34 +00:00
Tamito Kajiyama
b0bb21e32d 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.
2013-05-16 00:20:57 +00:00
Brecht Van Lommel
00f0ac8107 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.
2013-05-16 00:07:01 +00:00
Brecht Van Lommel
837d0ac2e0 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.
2013-05-15 22:55:30 +00:00
Brecht Van Lommel
b97397cae3 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.
2013-05-15 21:03:57 +00:00
Campbell Barton
1df12416ca 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

http://www.graphicall.org/ftp/ideasman42/grid_fill.png
2013-05-15 20:34:40 +00:00
Brecht Van Lommel
ac43397767 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
exceptions.
2013-05-15 17:59:55 +00:00
Brecht Van Lommel
a4b5c05aad 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.
2013-05-15 17:09:45 +00:00
Tamito Kajiyama
845376e8d3 Fix for missing finalization of memory blocks allocated in the Freestyle module.
Suitable for inclusion in 2.67a.
2013-05-15 17:06:56 +00:00
Campbell Barton
65dcc6ad4f use bool arrays rather then char for weight paint lock/select arrays 2013-05-15 15:52:48 +00:00
Brecht Van Lommel
e1229b2978 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.
2013-05-15 14:37:05 +00:00
Brecht Van Lommel
71775dc2a4 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.
2013-05-15 14:37:01 +00:00
Brecht Van Lommel
bea14e8aaa 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.
2013-05-15 14:36:58 +00:00
Sergey Sharybin
a5dd469a06 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! :)
2013-05-15 12:33:28 +00:00
Ton Roosendaal
8230584582 The Area Split/Merge corner widget was drawing 1 pixel too big, the lines overlapped
the area divider line.
2013-05-15 12:05:35 +00:00
Jürgen Herrmann
7b9a321a79 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.
2013-05-15 11:26:57 +00:00
Brecht Van Lommel
98beda156c Fix part of #35372: distorted strokes when painting zoomed out with a small brush
size. Interpolated mouse coordinates should not get rounded to integers.
2013-05-15 11:16:01 +00:00
Sergey Sharybin
e1cb4aade8 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
brushes.
2013-05-15 11:10:59 +00:00
Sergey Sharybin
9c510330d9 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.
2013-05-15 08:54:05 +00:00
Sergey Sharybin
4fcd44d389 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.
2013-05-15 08:25:42 +00:00
Campbell Barton
cd089ea321 bmesh edgeloop utility function, calculates an edge loop from 2 verts (start and endpoint). 2013-05-15 06:27:48 +00:00
Campbell Barton
be409d446c fix for own recent change with normal calculation (with no faces it wasn't freeing 0 byte allocation). 2013-05-15 05:56:49 +00:00
Tamito Kajiyama
5e4139c50a More fix for memory leaks in the Freestyle module. 2013-05-15 01:30:03 +00:00
Mitchell Stokes
bb7b04bd94 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.
2013-05-14 22:52:10 +00:00
Tamito Kajiyama
50c46fb9b3 Further fix for memory leaks in Freestyle Python API components:
- StrokeAttribute thickness setter
- BezierCurve (used from within BezierCurveShader)
- Smoother (used from within SmoothingShader)
2013-05-14 22:51:11 +00:00
Tamito Kajiyama
628bde206f Fix for a copy-and-paste bug in a Freestyle Python API helper function. 2013-05-14 22:16:18 +00:00
Jürgen Herrmann
d70497cefc Patch to CMake build system.
Install needed dlls for libjack.
2013-05-14 19:08:45 +00:00
Bastien Montagne
6fc51bf20e Moved main part of bpy.app.translations doc out of C code, as suggested by Campell, thx. 2013-05-14 18:16:37 +00:00
Brecht Van Lommel
8ef3c42f80 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.
2013-05-14 16:22:53 +00:00
Jürgen Herrmann
44dfc76154 CMake build system update
- Extending CMakeLists.txt to support builds with VC2012.
- Fix some typo in CMakeLists.txt
- Introduces experimental WITH_AVX_CPU to build with /arch:AVX (VC11 only)
2013-05-14 16:16:25 +00:00
Bastien Montagne
761850f377 API doc for bpy.app.translations should look better now. 2013-05-14 15:33:59 +00:00
Lukas Toenne
e4921a9664 "Fix" for #35336. Added a warning in the doc string for nodetree.nodes.new() to point users at the recent API change from node.type enum identifiers to the generic node.bl_idname strings. Not really nice, but could prevent a few bug reports and make scripters' lifes easier. 2013-05-14 11:18:45 +00:00
Campbell Barton
bbea18f8c1 bridge tool: fix for error in recent commit. missed NULL check for example face. 2013-05-14 10:56:18 +00:00
Lukas Toenne
bcf91e5c91 Fix for #35349, multiple viewers nodes crashing during render. The condition for activating viewer nodes was completely overridden during renders. Changed this so viewer nodes are active only if both of these are true:
1) the node is tagged for recalc OR compo is in render mode
2) it is the currently active viewer (so only one viewer ever writes to the buffer)
2013-05-14 10:42:30 +00:00
Brecht Van Lommel
71d53203fa Code cleanup: fix confusing line of code with useless ||. 2013-05-14 10:20:58 +00:00
Campbell Barton
cfbf9c324b style cleanup 2013-05-14 06:58:35 +00:00
Campbell Barton
5888830acb tweak to r56784, no functional change, utility function worked confusingly. 2013-05-14 06:10:26 +00:00
Campbell Barton
3b8b62ea4e fix for problem where edge loop select would select too many vertices (extend selection too far),
before & after: http://www.graphicall.org/ftp/ideasman42/edgeloop_select_fix.png
2013-05-14 04:55:21 +00:00
Campbell Barton
b31e03fdd1 refactor bmesh edge loop walker,
was getting too complicated handing different cases at once, split out boundary case into its own branch.
2013-05-14 04:09:02 +00:00
Campbell Barton
c838b2d2a7 bmesh api: add 'is_boundary' attribute to verts. 2013-05-14 02:56:24 +00:00
Tamito Kajiyama
6ea2dec330 Added support for WITH_CXX_GUARDEDALLOC build option to the Freestyle module. 2013-05-13 22:58:27 +00:00
Tamito Kajiyama
1a91af691e Fix for a memory leak during Freestyle stroke shading. 2013-05-13 22:50:12 +00:00
Antony Riakiotakis
3e0722328e The usual fix for blenderplayer. I didn't have time to test scons but looks like the missing library on CMake is already present there. 2013-05-13 20:42:18 +00:00
Jürgen Herrmann
3d3a4e8eec Patch [#35234]:
Fix GetWindowsLon and SetWindowsLong issues with VS2012 and Windows 8.
Remove unneeded #ifdef block for GWL_WNDPROC and GWL_USERDATA
2013-05-13 20:27:05 +00:00
Campbell Barton
92da9792fe fix for strange behavior with loop select involving ngons,
when selecting a loop with quads on one side an ngon on another - never select the outer boundary edge of the ngon.
2013-05-13 17:42:27 +00:00
Campbell Barton
f4bb0a7412 code cleanup: remove duplicate calls to 'BMW_current_state' 2013-05-13 16:35:28 +00:00
Sergey Sharybin
d4c6ac9a60 Cleanup and small improvements to libmv
- Added const modifiers where it makes sense and
  helps keep code safe.
- Reshuffled argument to match <inputs>,<outputs>
  convention on parameters.
- Pass values to ApplyRadialDistortionCameraIntrinsics
  by a constant reference.
  This will save lots of CPU ticks passing relatively
  heavy jet objects to this function when running
  bundle adjustment.
2013-05-13 14:39:06 +00:00
Campbell Barton
b48deabf4e new bevel: fix for crash in merge, could result in collapsing faces being invalid. rather then splice each edge, use weld_verts operator which handles removing degenerate geometry. 2013-05-13 14:31:45 +00:00