Commit Graph

52002 Commits

Author SHA1 Message Date
Sergey Sharybin e9ef7a8358 Fix T41060: Wrong texture 'Object' mapping in 3DView Rendered mode with Blender Internal 2014-08-13 00:32:29 +06:00
Bastien Montagne 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
Antonis Ryakiotakis 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
Bastien Montagne 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
Antonis Ryakiotakis 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
Bastien Montagne f4dc4bb774 Cleanup. 2014-08-12 16:03:49 +02:00
Bastien Montagne 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
Antonis Ryakiotakis 0bcc8d5cd3 Support table erasor in projective painting as well. 2014-08-12 14:20:06 +02:00
Antonis Ryakiotakis 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
Lukas Tönne 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
Antonis Ryakiotakis 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
Sergey Sharybin d425cb06f6 Fix T41408: Diffuse and specular passes were incorrect with combined/color passes disabled 2014-08-12 13:45:55 +06:00
Campbell Barton eadfddd02a Cleanup: magic numbers 2014-08-12 15:58:53 +10:00
Campbell Barton 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
Campbell Barton 06020eb02e Cleanup: unused var 2014-08-12 13:33:39 +10:00
Campbell Barton 6be4b39526 GHash: add flag get/set for gset 2014-08-12 13:29:40 +10:00
Tamito Kajiyama 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
Tamito Kajiyama 4bb81f625e Fix for wrong idname of the "Create Freestyle Stroke Material" operator. 2014-08-12 10:10:53 +09:00
Tamito Kajiyama 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
Tamito Kajiyama 75e03e93be Freestyle: removed dead code in BlenderStrokeRenderer. 2014-08-12 10:10:51 +09:00
Tamito Kajiyama dd13952080 Freestyle: Fix for git merge glitches.
Also made minor code cleanup.
2014-08-12 10:10:50 +09:00
Tamito Kajiyama b606520791 Freestyle: Removed debugging code (use G.main instead of Freestyle-local struct Main). 2014-08-12 10:10:49 +09:00
Tamito Kajiyama 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
Tamito Kajiyama 829e25c922 Fix for wrong link in the line style shader nodes due to a typo. 2014-08-12 10:10:47 +09:00
Tamito Kajiyama 7dd605e361 Fix for SCENE_OT_freestyle_stroke_material_create not respecting "use_nodes" line style prop. 2014-08-12 10:10:46 +09:00
Tamito Kajiyama 7852fc8bcd Freestyle: Proper support for alpha transparency in line style shader nodes for Cycles. 2014-08-12 10:10:45 +09:00
Tamito Kajiyama 2843aa1501 Freestyle: Fix for error handling in SCENE_OT_freestyle_stroke_material_create. 2014-08-12 10:10:44 +09:00
Tamito Kajiyama cc33d73185 Freestyle: Fix for an increasing reference count of images in copied Image Texture shader nodes. 2014-08-12 10:10:43 +09:00
Tamito Kajiyama 45af769020 Freestyle: Properly reconnect links from a UV Along Stroke node to a UV Map node. 2014-08-12 10:10:42 +09:00
Tamito Kajiyama e457dfec32 Freestyle: Updated BKE_linestyle_default_shader() to include the UV Along Stroke shader node. 2014-08-12 10:10:41 +09:00
Tamito Kajiyama 52d357a0b5 Freestyle: Added new UV Along Stroke shader node. 2014-08-12 10:10:40 +09:00
Tamito Kajiyama 6a5b8e91b1 Freestyle: removed unnecessary call of node_type_storage() in the definition of the Output Line Style node. 2014-08-12 10:10:39 +09:00
Tamito Kajiyama 6f60ca3cd4 Freestyle: Caching of auto-generated materials from line style shader nodes. 2014-08-12 10:10:38 +09:00
Tamito Kajiyama 7b1234be1c Removed/disabled debugging code. 2014-08-12 10:10:37 +09:00
Tamito Kajiyama 34c133a488 Freestyle: an improved workflow of line style shading nodes.
Removed the previous changes for passing a line style through the Controller, and
revised the BlenderTextureShader to assign the shader node tree of a line style
(if specified) to strokes.  This way the assignment of shading nodes can be done
through both the Freestyle GUI and Python scripting.
2014-08-12 10:10:36 +09:00
Tamito Kajiyama c38e80d632 WIP commit just for a record of a working snapshot of code revisions for node-based textured strokes. 2014-08-12 10:10:35 +09:00
Tamito Kajiyama a2a2d4679a Made temporary changes to use G.main rather than Freestyle-local Main for debugging. 2014-08-12 10:10:34 +09:00
Tamito Kajiyama 622ef089f9 Freestyle: Fix for a crash during access to Scene properties from within Python. 2014-08-12 10:10:33 +09:00
Tamito Kajiyama 4fc2b8dcc6 Added BKE_linestyle_use_textures() to check if stroke textures are enabled. 2014-08-12 10:10:32 +09:00
Tamito Kajiyama 1ddb8e238e Freestyle: Keep a reference of the line style in Stroke rather than in StrokeRep. 2014-08-12 10:10:31 +09:00
Tamito Kajiyama 83360eccae Fix for renamed API functions in rB415af0b. 2014-08-12 10:10:29 +09:00
Tamito Kajiyama 701f0356df Freestyle: Removed a debug print in BlenderStrokeRenderer::GetStrokeShader(). 2014-08-12 10:10:28 +09:00
Tamito Kajiyama 722951eceb Freestyle: Added "blend_type" and "use_clamp" options to the Output Line Style shader node. 2014-08-12 10:10:27 +09:00
Tamito Kajiyama 833353b25e Freestyle: Fix for a crash in BKE_linestyle_default_shader() due to a typo. 2014-08-12 10:10:26 +09:00
Tamito Kajiyama 7e9ac19b2c Freestyle: Fix for stroke_shader node default values copied from the Output Line Style node. 2014-08-12 10:10:24 +09:00
Tamito Kajiyama 1b65faf90b Freestyle: Changed the default Color value of the Output Line Style node. 2014-08-12 10:10:23 +09:00
Tamito Kajiyama cb75f79b8a Freestyle: Add BKE_linestyle_default_shader() for creating the default line style shader node tree.
Changes to ED_node_shader_default() were reverted since the code there was actually
not suitable for setting up the default line style node tree properly.
2014-08-12 10:10:22 +09:00
Tamito Kajiyama 4e11fcead0 Follow-up to rB647969f9b617: Renamed CTX_data_linestyle_from_scene() to BKE_get_linestyle_from_scene(). 2014-08-12 10:10:21 +09:00
Tamito Kajiyama fc85446c50 Freestyle: Added preliminary support for textured strokes in Cycles.
Now the shader node tree of a line style ID datablock is used to define textures
as well as their mapping and influence.

TODO: Textures alpha channel mapping and influence.
TODO: Blend mode in the Output Line Style shader node.
2014-08-12 10:10:20 +09:00
Tamito Kajiyama 4677684cfd Changed ntreeCopyTree_ex() to accept a pointer to struct Main. 2014-08-12 10:10:19 +09:00