Commit Graph

42493 Commits

Author SHA1 Message Date
f2821e392b hint checks to re-alloc as unlikely
also edit comments for knife tool
2014-08-14 11:07:33 +10:00
28054d8e38 remove MAXFLOAT define 2014-08-14 10:36:07 +10:00
e05567ef3e Fix out of bounds read when recalculating mipmaps, error reported by
address sanitizer.

This was strangely only triggered when float buffers were used.
2014-08-13 19:07:45 +02:00
be755f3873 Fix T41408: Render layer pass bug, second attempt
Missed some passes in the previous commit. Now seems all the passes
are covered, at least with my understanding of the things.

There're some weird things going around with the refraction pass,
but that is caused by some other issue in the code. Would rather
call it a TODO for now.
2014-08-13 22:45:21 +06:00
eca7c96a28 Maybe slightly controversial pie commit:
Make pie menu item placement touch the radius from the internal side of
the buttons rather than placing on the center on the cirtcle. This
allows us to get rid of the separate visual angle property, also allows
for tighter placement of pies with a smaller radius without easily
overlapping.

Also pie menu title now always appears above the threshold indicator.
2014-08-13 15:11:19 +02:00
12154d791e Correct missing new line in the debug print 2014-08-13 18:08:58 +06:00
48b39898bf Align pie menu title on center. 2014-08-13 14:08:26 +02:00
Dalai Felinto
5b1f78e2d9 Image Editor: only do alpha test if output file requires alpha
(internal change, nothing should change to the user)
2014-08-13 13:11:10 +02:00
8d801c3afd Correct menu items active behavior applying to dialogs 2014-08-13 18:21:23 +10:00
818a036c1a Fix T39387: Knife makes duplicate verts with subsurf 2014-08-13 15:06:38 +10:00
ff42afb6c5 Math Lib: rename barycentric_transform -> transform_point_by_tri_v3
also add transform_point_by_seg_v3
2014-08-13 14:55:45 +10:00
3529913629 Math Lib: name signed versions of dist_to_plane_v3 explicitly
also add unsigned versions
2014-08-13 14:34:58 +10:00
3e90d7971a Knife tool: avoid copying vectors 2014-08-13 13:56:53 +10:00
7c9b8aa6cc Fix possible uninitialized var use 2014-08-13 10:38:08 +10:00
7df4fc5eaf Spelling 2014-08-13 09:34:37 +10:00
dfd9bfd3a8 Spelling 2014-08-13 08:38:16 +10:00
315c55916b RNA: use static declarations 2014-08-13 08:37:41 +10:00
dea01a0928 Compare squared distances for tracking selection 2014-08-13 08:27:50 +10:00
d17643ce1e Knife tool: cleanup threshold use, avoid sqrt 2014-08-13 08:08:18 +10:00
1510d0d441 Fix T41164: Knife creates duplicate verts 2014-08-13 08:03:31 +10:00
e5fd5599bc Fix T40566: Light instances disappears in rendered viewport (Blender Internal)
This is just another issue caused by convertblender overwriting the object
matrix at the time of creating render object. What's even worse here is that
original matrix is not stored for the lamps, only lamp_matrix*view_matrix is
stored.

For sure we can combine lar->co and lar->mat back to mat4, multiply by the
inverse view matrix and get object matrix, but this is not suitable for the
viewport render because every viewport rotation will accumulate the error.

For now let's store worldspace lamp matrix in the LampRen structure and use
it when rotating the scene.
2014-08-13 01:48:15 +06:00
e9ef7a8358 Fix T41060: Wrong texture 'Object' mapping in 3DView Rendered mode with Blender Internal 2014-08-13 00:32:29 +06:00
4bd252d8c3 Fix T41415: Lasso keymap not working in UV editor.
Extend option was not implemented for UV lasso select...
2014-08-12 20:12:42 +02:00
7c7cb01aa5 Fix part of T41406
Attempt to make soften brush faster by allowing non-symmetric kernels.
Projective painting supports those naturally but for 2D painting there's
a small hack to avoid shifting of the texture. Not totally correct but
it works for now.
2014-08-12 19:45:57 +02:00
561f375109 Fix T41409: Copy Custom Property function does nothing with pose bones.
Copying custom IDprops actually never worked, afaik, since previous code was copying 'from'
prop onto itself, in this case!
2014-08-12 17:32:59 +02:00
efc3ef2d3b Change previous commit that uses transparency by default.
Sampling still samples the texture color in transparent areas. This is
not so bad but users may get confused when clicking on a white spot and
picking black instead of the mesh color.

Krita also has this uncertainty when picking in transparent areas but we
do not interpolate with an explicit "transparent" looking texture during
viewport drawing (maybe we should), so it's not so apparent what happens
here.
2014-08-12 16:17:21 +02:00
f4dc4bb774 Cleanup. 2014-08-12 16:03:49 +02:00
ca5c02fc93 Fix T41411: Undo crashing with background images set.
Since 3DViews use IDs like images or clips, we can't skip anymore `lib_link_screen()`
when reading from mem for undo/redo stuff. Else, freeing (unused) screen in `BKE_read_file_from_memfile()`
will lead to using data already freed (since pointers have not been updated when reading that undo step).
2014-08-12 16:03:49 +02:00
0bcc8d5cd3 Support table erasor in projective painting as well. 2014-08-12 14:20:06 +02:00
ba345bcbb6 Fix T41414, T41386.
There were a few issues to fix here:

* We did not really unpremultiply float image dabs prior to sending them
to the GPU. That made float and byte image result different in texture
painting and undoing could change the result.
* To make textures nicely composited over the mesh, I used decal mode in
OpenGL texture environment for the texture unit. This uses the texture's
alpha channel with a nice over operator.
* Texture creation used to override the alpha setting due to the display
restrictions. Not so anymore, people can now create transparent byte
images.

Also, made alpha zero default for new textures now, since it has such a
nice effect here.
2014-08-12 13:49:45 +02:00
1743c81ce1 Fix T41349: Muting texture nodes can cause crashes.
Problem is that setup of stack indices which refer to the same stack
entry can lead to cyclic TexDelegate node pointers, causing an infinite
loop.

Fixing this would take too much time and require recoding large parts of
the texnodes system, which is earmarked for scrapping anyway ... So for
now just disabled muting in texnodes to avoid crashes.
2014-08-12 12:44:47 +02:00
6e8e94d806 Fix undo in texture painting not refreshing float images in viewport if
16 bit float textures was off
2014-08-12 12:03:27 +02:00
d425cb06f6 Fix T41408: Diffuse and specular passes were incorrect with combined/color passes disabled 2014-08-12 13:45:55 +06:00
eadfddd02a Cleanup: magic numbers 2014-08-12 15:58:53 +10:00
ab06ec7a24 Rewritten Array Modifier D443
Patch by PatB with own edits

- replace BMesh with CDDM functions.
- faster remove-vertex merging.
- extend CDDM_merge_verts to be more flexible.
2014-08-12 13:52:17 +10:00
06020eb02e Cleanup: unused var 2014-08-12 13:33:39 +10:00
6be4b39526 GHash: add flag get/set for gset 2014-08-12 13:29:40 +10:00
b65a022892 Freestyle: Removed the stored bContext from the Controller class.
The stored context object was used for creation of shade nodes.  A closer look at the
node system showed that the context is not actually used when shader nodes are
added to a shader node tree.  Relying on this fact, now a NULL pointer is passed to
nodeAddStaticNode() instead of the stored bContext pointer.
2014-08-12 10:10:55 +09:00
4bb81f625e Fix for wrong idname of the "Create Freestyle Stroke Material" operator. 2014-08-12 10:10:53 +09:00
71b85a8390 Freestyle: code cleanup.
Marked a function argument with UNUSED() and removed an unused local variable.

Patch provided by Sergey Sharybin.
2014-08-12 10:10:52 +09:00
75e03e93be Freestyle: removed dead code in BlenderStrokeRenderer. 2014-08-12 10:10:51 +09:00
dd13952080 Freestyle: Fix for git merge glitches.
Also made minor code cleanup.
2014-08-12 10:10:50 +09:00
b606520791 Freestyle: Removed debugging code (use G.main instead of Freestyle-local struct Main). 2014-08-12 10:10:49 +09:00
f7d3f2b228 Fix for vertex colors not working properly.
Looks like the issue was caused by a UV map name starting with a lower case
letter (e.g., "color").  Capitalizing the name fixed the problem.  Also adjusted
the creation of custom data layers to optimize things a bit.
2014-08-12 10:10:48 +09:00
829e25c922 Fix for wrong link in the line style shader nodes due to a typo. 2014-08-12 10:10:47 +09:00
7dd605e361 Fix for SCENE_OT_freestyle_stroke_material_create not respecting "use_nodes" line style prop. 2014-08-12 10:10:46 +09:00
7852fc8bcd Freestyle: Proper support for alpha transparency in line style shader nodes for Cycles. 2014-08-12 10:10:45 +09:00
2843aa1501 Freestyle: Fix for error handling in SCENE_OT_freestyle_stroke_material_create. 2014-08-12 10:10:44 +09:00
cc33d73185 Freestyle: Fix for an increasing reference count of images in copied Image Texture shader nodes. 2014-08-12 10:10:43 +09:00
45af769020 Freestyle: Properly reconnect links from a UV Along Stroke node to a UV Map node. 2014-08-12 10:10:42 +09:00