Commit Graph

47719 Commits

Author SHA1 Message Date
Campbell Barton
43748eca2d ignore hidden edges for bmesh grid-fill. 2013-05-17 12:26:14 +00:00
Campbell Barton
b73c821b5d fix for BM_mesh_edgeloops_find(), could give edge loops with one vert. (caused bridge to crash sometimes) 2013-05-17 12:11:34 +00:00
Campbell Barton
f79e190307 fix for error in bridge tool, using freed faces from bmo input. 2013-05-17 12:05:07 +00:00
Ton Roosendaal
7b2172cb0b 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.
2013-05-17 11:13:46 +00:00
Sergey Sharybin
a4e9edb674 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.
2013-05-17 11:08:50 +00:00
Brecht Van Lommel
79fc2ac845 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.
2013-05-17 09:47:05 +00:00
Campbell Barton
04a9c0e28a bump mathutils callback slot size. 2013-05-17 07:10:40 +00:00
Bastien Montagne
9d567dd366 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.
2013-05-17 07:10:10 +00:00
Brecht Van Lommel
308d014b49 Fix #35398: changing render layer name causes animation to be lost. 2013-05-17 00:39:37 +00:00
Tamito Kajiyama
30d3a57eb7 Fix for Freestyle built-in style module sketchy_multiple_parameterization.py 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!
2013-05-16 23:49:05 +00:00
Thomas Dinges
616bc9d68f Code cleanup / Cycles:
* Put render resolution x/y into a function.
2013-05-16 21:53:21 +00:00
Dalai Felinto
49003dd90c 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
2013-05-16 21:37:24 +00:00
Thomas Dinges
8e487bebd3 Cycles / BSSRDF:
* Avoid one max() call for the bssrdf radius, the if condition already checks for values < BSSRDF_MIN_RADIUS.
2013-05-16 18:39:45 +00:00
Campbell Barton
b9fa4f7df9 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.
2013-05-16 18:33:07 +00:00
Campbell Barton
f334df5624 code cleanup: double promotion warnings. 2013-05-16 17:20:56 +00:00
Thomas Dinges
34ba69d576 * This is embarrassing... 2013-05-16 15:59:05 +00:00
Thomas Dinges
4475de5bd8 Cycles:
* Revert part of r56832, if code gets more complicated, it's better to keep it more logical here.
2013-05-16 15:47:09 +00:00
Campbell Barton
fbf890200c fix for crash in grid-fill where it was possible for rail edges to overlap. 2013-05-16 15:28:57 +00:00
Lukas Toenne
a8964d865f 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.
2013-05-16 15:06:18 +00:00
Campbell Barton
b881dd9e7f grid-fill: fix error in detecting face flipping. 2013-05-16 13:58:21 +00:00
Brecht Van Lommel
4dec85ef26 Fix #35384: animation to enable/disable render layers was applied one frame too
late when rendering animations.
2013-05-16 12:03:21 +00:00
Jürgen Herrmann
b90108c108 CMakeLists.txt changes to use new static Jack libs with VC2012 2013-05-16 11:24:19 +00:00
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
Campbell Barton
8982439383 quiet warnings from r56825
- using vars before checking they are defined
- /* within comment
2013-05-16 03:55:47 +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
Thomas Dinges
9b59e2b95a Code cleanup / Cycles:
* Some simplification of closure code (Velvet and Toon).
2013-05-15 20:38:17 +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
85530846b6 Fix #35376: node editor throwing python error on some files saved with 2.66 test builds. 2013-05-15 19:24:07 +00:00
Brecht Van Lommel
693f687ebf Fix cycles CUDA error with world multiple importance sampling, after recent OpenCL fixes. 2013-05-15 19:02:30 +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
Jürgen Herrmann
8a89d27b87 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.
2013-05-15 17:00:53 +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
Campbell Barton
417ca7b451 fix for finding openjpeg on some systems. 2013-05-15 09:57:17 +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