Commit Graph

48743 Commits

Author SHA1 Message Date
Campbell Barton
99fe6d29eb skip duplicating faces for edge slide unless its used, this causes update problems for shape keys at the moment, Ill check on that but no need to run in most cases. 2013-07-10 12:37:15 +00:00
Campbell Barton
3d13f22e89 no need to copy mat4x4 -> 3x3 in mat4_to_scale 2013-07-10 12:12:58 +00:00
Brecht Van Lommel
9460d9f344 Fix #36080: fix cycles crash with certain group node setups, accessing freed
memory.
2013-07-10 10:50:19 +00:00
Sergey Sharybin
5e1d450b90 Fix #36076: Metaballs as particles with particle texture (size influence) crashes Blender
Issue was caused by size influence affecting on object's matrix, which
is nice by it's own. But mball code was using ob->size to check whether
it's zero-sized object or not, but then was using ob->obmat to scale
the meta elements.

This lead to situation when zero-sized elements were trying to tessellate,
which is for sure a really bad idea.
2013-07-10 10:24:06 +00:00
Campbell Barton
3f9629a4c7 patch [#36078] Fixes joining behavior for curves and armatures (when active object not selected). 2013-07-10 09:55:10 +00:00
Campbell Barton
6ebfdd8dc3 remove reference to wrong python version in comments & pedantic style edit. 2013-07-10 09:40:49 +00:00
Campbell Barton
24a3fc5a6b fix for possible bug with compilers that dont have boolean support. 2013-07-10 08:01:06 +00:00
Campbell Barton
f47fe89b19 fix [#36065] UI labels are shown in the theme color for unselected list items 2013-07-10 08:00:00 +00:00
Lukas Toenne
0cc9b45294 Fix #36041, Chroma key broken. Compositor node was using wrong socket index to link the output of the RGBToYCC operation to the chroma matte input.
This mistake happens over and over, it's just not clear what the index arguments in these relink functions mean ... We really need to clean up that interface.
2013-07-10 07:23:55 +00:00
Campbell Barton
e6291ea418 fix [#36079] Use Modifier Stack Crash with Particles 2013-07-10 05:46:45 +00:00
Campbell Barton
06be19c0ec add asserts for passing in bad index values to DM_get_***_data, CustomData_get() 2013-07-10 05:38:36 +00:00
Campbell Barton
974ec7ddcf fix for particle lasso-select inverting the selection. 2013-07-10 05:01:49 +00:00
Campbell Barton
34fc990997 fix [#35406] Hair puff brush bug
- puff was interpolating hair that made longer strands cirl up.
- also fixed problem with puff-volume option, it was over-accumulating so unselected parts of the hair would have too much offset applied.
2013-07-10 04:54:14 +00:00
Campbell Barton
aabddad346 draw loopcut display on the deformed mesh when in editmode. 2013-07-10 02:05:16 +00:00
Campbell Barton
b0312d5991 fix [#35948] Toggle-Draw AutoKeyframe Bug 2013-07-10 01:13:24 +00:00
Brecht Van Lommel
3f34a88fc8 Fix #36075: editing shading nodes could still crash blender internal rendered
draw mode. This happens because it uses node data structures in threads, now
it does same as preview render, which is to immediately stop the render thread
when e.g. deleting nodes.
2013-07-10 01:05:56 +00:00
Campbell Barton
a3643ee3d6 fix [#36073] Changing list items misses undo push 2013-07-09 23:40:53 +00:00
Tamito Kajiyama
795034c17d Fix for bug #36009: Rendered ortho view messes up Freestyle lines in 3D viewport.
Clipping start is negative when the viewport preview is used with the orthographic view,
while Freestyle assumes that imported mesh data are in the camera coordinate system
with the view point located at origin.  The present solution is to adjust the clipping
start/end and introduce a Z-axis offset for mesh vertices so as to satisfy the assumption.
2013-07-09 23:25:02 +00:00
Brecht Van Lommel
5569a4b282 Fix missing cycles viewport update when changing manual texture space
location or size in the properties editor.
2013-07-09 22:27:18 +00:00
Sergey Sharybin
677e136e4b Partial revert of rev58110
There's one thing we didn't foresee from the beginning,
which is apparently TLS is only available in OSX starting
from version 10.7, and we still do support of 10.6.

After recent Brecht's changes about locked viewport
while initializing BI render this TLS is not needed
in trunk anymore. So reverting this chunk of base
iteration to use static variable. But leaving all the
other static variables warped into context still, it
should help a bit in the future refactor.

Real fix would be to have some kind of graph context
evaluation structure which would be passing to update
routines (which will solve threaded mballs update) and
making depsgraph responsible for getting a motherball.
But this is all for GSoC project.
2013-07-09 18:38:33 +00:00
Campbell Barton
8491814a10 fix [#36004] Vertex parent on curve point results in blank 'parent_type' on child object 2013-07-09 13:50:22 +00:00
Brecht Van Lommel
79f264bd69 Fix blender environment map texture looking different on the first render with
an image file, the image extend is set automatically when render starts but not
when the image was never loaded yet.
2013-07-09 13:47:19 +00:00
Campbell Barton
c3c84521f1 fix [#36055] Edge/Face Info display on wrong position with key frames
display editmesh stats with deform modifiers.
2013-07-09 12:59:31 +00:00
Brecht Van Lommel
381df05641 Fix #36030: datablock drag and drop to buttons not working with a certain number
of objects in the scene.
2013-07-09 11:31:49 +00:00
Lukas Toenne
75c7032a19 Fix #36050, backdrop not working. The compositor backdrop requires a restart of the compositing job, which does not happen if just enabling backdrop after adding a viewer node. To fix this added the appropriate notifiers in a update callback for the show_backdrop property. 2013-07-09 09:10:42 +00:00
Campbell Barton
80738a1828 add checks in paintface_flush_flags for faces which have no original index values. (could give out of bounds writes) 2013-07-09 08:25:30 +00:00
Sergey Sharybin
86546ca42d Fixed more threading issues with metaballs
This time issue was caused by static variables used in
BKE_scene_base_iter_next function.

Change is not so much ultimate actually, but didn't
find more clear solution for now. So the changes are:

- Wrap almost all the static variables into own context-
  like structure, which is owned by the callee function
  and getting passed to the iteration function.

- Recursion detection wasn't possible with such approach,
  so recursion detection still uses static in_next_object
  variable, but which is now stored in thread local
  storage (TLS, or thread variable if this names are more
  clear for you).

This makes code thread-safe, but for sure final solution
shall be completely different. Ideally, dependency graph
shall be possible to answer on question "which object is
a motherball for this metaball". This will avoid iterating
via all the bases, objects and duplis just to get needed
motherball.

Further, metaball evaluation ideally will use the same
kind of depsgraph filtering, which will get result for
question like "which objects belongs to this group of
metaballs".

But this ideal things are to be solved in Joshua's and
mind GSoC projects.

Tested on linux (gcc and clang) and windows (msvc2008),
hopefully no compilation error will happen.

Thanks to Brecht for reviewing the change and getting
feedback for other possible ways we've dicussed!
2013-07-09 08:23:01 +00:00
Campbell Barton
139754894b fix [#36039] Texture paint bug with face selection on subdivided object
original patch by Antony Riakiotakis, made some edits to only check origindex when needed.
2013-07-09 08:17:14 +00:00
Campbell Barton
fba8e8861c fix for error in vertex_group_vert_select_unlocked_poll, check for non existing group wasn't right. 2013-07-09 07:50:16 +00:00
Campbell Barton
34b301f0a4 fix error where if you tried to bridge an odd number of loops after bridging pairs, there was no way to change the options.
eventually I think the operator api should support this but for now return finished.
2013-07-09 06:34:54 +00:00
Campbell Barton
d4ff53b760 fix [#36066] crash when Tab out text object
the way Curve.len is used at the moment is really stupid, calculate string size on save for now, but should really store the length in bytes and total number of characters.
2013-07-09 06:21:45 +00:00
Campbell Barton
750b30c7dd fix [#36008] Can't set values higher than 1.0 in HSV colour picker (But can in RGB) - also some strange behavior 2013-07-09 04:00:56 +00:00
Campbell Barton
bd5cb6fb3b fix for own error in normal-recalc r58077, initial face flipping wasn't checking against face-island center. 2013-07-09 01:18:15 +00:00
Campbell Barton
14ab39c5e0 minor improvements
- calc normals only check flag when needed.
- keymap, dont get name unless its needed.
- keymap, avoid property lookup.
- idprop debug print, include pointer, helpful for troubleshooting.
2013-07-09 00:13:17 +00:00
Campbell Barton
6c0d97fbcf fix [#35806] Unable to check "Correct UVs" option in "Loop Cut and Slide" (Keymap Editor) 2013-07-09 00:08:18 +00:00
Brecht Van Lommel
3d847ed6e6 Fix #36064: cycles direct/indirect light passes with materials that have zero
RGB color components gave non-grey results when you might no expect it.

What happens is that some of the color channels are zero in the direct light
pass because their channel is zero in the color pass. The direct light pass is
defined as lighting divided by the color pass, and we can't divide by zero. We
do a division after all samples are added together to ensure that multiplication
in the compositor gives the exact combined pass even with antialiasing, DoF, ..

Found a simple tweak here, instead of setting such channels to zero it will set
it to the average of other non-zero color channels, which makes the results look
like the expected grey.
2013-07-08 23:31:45 +00:00
Campbell Barton
b2b6d56443 move keymap ui into modules, its not loaded on startup anymore. 2013-07-08 22:57:51 +00:00
Brecht Van Lommel
a2553444fa Fix #35969: blender internal and cycles not updating mesh while in edit mode.
Patch for blender internal made by Campbell.
2013-07-08 22:41:14 +00:00
Brecht Van Lommel
8ab1fadf3d Fix #36063: cycles 3D viewport was incorrectly influenced by blender internal
material halo settings.
2013-07-08 22:41:12 +00:00
Brecht Van Lommel
751062fc5f Fix #35979, #35937, #35739: undo crashes and missing updates with blender
internal viewport rendering. Lots of tweaks here, mainly:

* Stop 3D viewport render and free database before undo.
* Accumulate update flags rather than replace them each time it rerenders, to
  avoid previous updates getting lost.
* Don't check against Render struct view parameters for changes, those are set
  in the job thread which might not run before the next update call.
2013-07-08 22:26:10 +00:00
Brecht Van Lommel
63042da52a Fix #36059: region overlap did not show scopes overlapping in the image editor.
It's only enabled for some particular regions, this one makes sense to show.
2013-07-08 18:27:32 +00:00
Brecht Van Lommel
3ce280e825 Fix #35960, #36044: blender internal viewport rendering crash while editing data.
Now the viewport rendering thread will lock the main thread while it is exporting
objects to render data. This is not ideal if you have big scenes that might block
the UI, but Cycles does the same, and it's fairly quick because the same evaluated
mesh can be used as for viewport drawing. It's the only way to get things stable
until the thread safe dependency graph is here.

This adds a mechanism to the job system for jobs to lock the main thread, using a
new 'ticket mutex lock' which is a mutex lock that gives priority to the first
thread that tries to lock the mutex.

Still to solve: undo/redo crashes.
2013-07-08 17:56:51 +00:00
Antony Riakiotakis
861f9e10f7 Attempt to fix #35057, disable threading if diameter of the brush
becomes too small. Typically this would happen if the number of buckets
is clipped to the maximum value. This avoids thread overhead.

A better fix might be to do bucket-brush intersection on main thread and
dispatch threads to process bucket hits as they become available. This
way only one thread at most would end up being used in such cases
anyway. A better task scheduler is needed for that though, leaving for
after GSOC.
2013-07-08 15:35:53 +00:00
Campbell Barton
27734f5bec fix/improve normal calculation, noticed when checking on the previous bugfix.
- normals depended on the meshes rotation, so you could rotate Suzzane and in some cases one of the eye normals would be flipped.
- normals depended on the meshes placement in relation to the meshes center, now find the outer most face by each face-island center.
2013-07-08 13:30:11 +00:00
Howard Trickey
0a006cce9c Fix bevel bugs 34445 and 35109, copying over edge data.
The bugs were about not respecting edge smoothness and
not respecting edge crease.  This change copies the
edge attributes from a beveled edge to the two outside
edges of the bevel.
2013-07-08 13:02:21 +00:00
Lukas Toenne
d75e0f320b Fix #36024. This part fixes user counting for node editor trees. The user count previously would only work correctly for node trees which are part of material, scene, etc. or linked by group nodes. Any
custom pynodes tree edited directly as library data would get a 0 user count on reload and subsequently not be saved. Now the node space follows the same pattern as the image space: the node tree(s) user
count gets incremented on file load and opening in the editor ensures a real user. This leads to 1 "unreal" user for the editor (dropped on reload), but seems to be the only viable solution atm.
2013-07-08 11:38:11 +00:00
Lukas Toenne
fa7e690a91 Partial fix for #36024, don't always reset the node editor tree pointer if the type is undefined. This can happen if the tree type is defined by addon or script, in which case the tree type would be unknown the first time the context is checked, but registered right afterward. Also unknown tree types are handled fine, they just display dummy nodes in red warning color. 2013-07-08 11:38:09 +00:00
Campbell Barton
61bbefe40d remove unused normal-recalc flags. 2013-07-08 08:56:46 +00:00
Campbell Barton
335fd7388f move normal recalculation into its own source file. 2013-07-08 08:50:04 +00:00
Sergey Sharybin
96d78e3de9 Fix #36042: Subdividing a cyclic spline shifts start/end points
Issue goes back to 2.4x days at least (but very much likely the
issue is even older). It's caused by subdivision code was starting
to iterate points from previous one, which shifted all the points
by one.

Reshuffled code so now iteration starts from first spline point.

Thanks to Campbell for review and tests! :)
2013-07-08 08:02:37 +00:00