Commit Graph

40867 Commits

Author SHA1 Message Date
Lukas Toenne
c9cd150f43 Cycles compile fix: only use std::isfinite when OSL is enabled. 2012-09-02 18:11:28 +00:00
Thomas Dinges
dfec5a3655 * Removed last occurrence of get_pointcloud_attr_query. 2012-09-02 17:39:07 +00:00
Thomas Dinges
add7ca12d9 * OSL can't overwrite input parameters, use a local variable instead. 2012-09-02 16:37:58 +00:00
Thomas Dinges
b26d19a7b8 Cycles / OSL:
* Updates for noise_turbulence, to match svm function.
2012-09-02 16:06:18 +00:00
Lukas Toenne
e1bca6cfc4 Fixed a number of OSL syntax errors from the updated 1.2 API. Microfacet functions now all take an eta parameter, set to 1.0 if no IOR is given. 2012-09-02 15:41:35 +00:00
Thomas Dinges
28d02bc056 Fix for r50314:
* oren_nayar is not part of the default stdosl, added it back.
2012-09-02 15:26:13 +00:00
Lukas Toenne
092f6344c3 Fixed remaining syntax errors in OSL files. node_sepcomb_rgb.osl is split into 2 parts, since OSL only allows one shader per file. 2012-09-02 15:07:51 +00:00
Sv. Lockal
ebbfc46bea Use function pointers instead of hard-coded english button names in color picker block.
This solves the problem with es/ru translations of color picker block reported by Gabriel Gazzán in Bf-translations-dev.
2012-09-02 13:36:33 +00:00
Thomas Dinges
f1d279912f Cycles / OSL:
* Add oslutil.h, from osl 1.2.
2012-09-02 13:34:12 +00:00
Thomas Dinges
6c02a8fc8c OSL / Cycles:
* Update the stdosl header file, from official osl 1.2.
2012-09-02 13:23:44 +00:00
Thomas Dinges
25fc454ce0 Cycles / OSL:
* Remove declaration of node_blend_weight_texture from cmake, does not exist, and match node_blend_weight name in nodes.cpp with the actual file.
2012-09-02 12:46:54 +00:00
Thomas Dinges
23dca13691 Cycles / OSL:
* First batch of compile fixes for several shaders, mainly syntax errors.
2012-09-02 12:24:04 +00:00
Thomas Dinges
748582f49e Cycles / OSL:
Fixes for API changes in OSL RendererServices:

* Added two new required get_matrix methods, from OSL RendererServices (otherwise the constructor fails). The two new matrix methods probably still need an implementation. 
* Removed deprecated "get_pointcloud_attr_query" and "pointcloud". There are two new routines for pointclouds, function headers for those are there.

* Removed the (unused) PARTIO code parts from OSL. It was marked as not tested / not working, and due to the api changes here broken for sure. Code is still in svn history if needed.
2012-09-02 01:10:31 +00:00
Benoit Bolsee
53f343edd7 ..\commmit_hive.txt 2012-09-01 21:23:05 +00:00
Thomas Dinges
779ecb06dd Cycles / OSL:
* Compile fix for the "direction_to_panorama" issue.
Added kernel_projection.h to kernel_triangle.h.
2012-09-01 15:30:35 +00:00
Antony Riakiotakis
bcb552ef94 Enable shader model 3.0 shaders for mingw compilers 2012-09-01 14:53:01 +00:00
Lukas Toenne
ff9b071fbd Fix #32463, Cycles crashing. The particle system sync_recalc part was checking object data, which can be NULL and doesn't actually say anything about particles, removed. 2012-09-01 11:30:22 +00:00
Lukas Toenne
cc835e47b0 Cycles fix: don't skip particle device update when there are no particle systems. The device texture always contains at least one dummy particle in case particle info node is used for non-instance objects, this must be initialized in any case. 2012-09-01 11:30:19 +00:00
Thomas Dinges
fda711a851 Cycles / OSLGlobals:
* Fixes for changes in the Open Shading Langauge API from version 0.6.0: 11ce51418b

* Removed the need for ShadingSystemImpl.
2012-08-31 20:31:21 +00:00
Thomas Dinges
7ac0dd2953 Cycles / OSL:
* OSL namespace fixes for osl_shader.cpp.
2012-08-31 20:08:55 +00:00
Thomas Dinges
01815d83fb Cycles / OSL:
* Fixes for changes in r40163. Removed unused code and fixed emissive_eval function.
2012-08-31 19:59:50 +00:00
Thomas Dinges
99abcb8e45 Possible fix for [#32462] blender cannot load bmp files (Windows OS).
* Typo in the CHECK_HEADER_FIELD macro. 

Patch by kjym3 in IRC, thanks!
2012-08-31 19:57:03 +00:00
Lukas Toenne
2694b68d4a Cycles: Fix for particle info node crash: The particle 'alive' state can be set to 'dying', which is just an indicator that the particle will be removed, but it is is used for instancing. This would lead to insufficient texture size and assert crash. 2012-08-31 19:39:08 +00:00
Lukas Toenne
3ca3102bcf Cycles: Fully initialize the dummy particle at index 0. 2012-08-31 19:39:06 +00:00
Lukas Toenne
1228be0896 Cycles: Start the particle index for object instances at 1 instead 0. The first particle in the device texture is a dummy for non-instance objects using the particle info node. 2012-08-31 19:39:04 +00:00
Lukas Toenne
cabdeec0c0 Cycles: Tag particle systems after syncing to make sure the particle system manager updates the device data. 2012-08-31 19:39:03 +00:00
Lukas Toenne
9e3fa15d4b Added a bunch of additional particle state attributes to the Cycles particle info node:
* Location: Basically the same as the location from Object Info node for object instances on particles, but in principle there could be additional offsets for dupli objects, so included for completeness.
* Size: Single float scale of the particle. Also directly translates to object scale for current dupli objects, but handy to have as a single float to start with instead of a scale vector (currently not even exposed in Object Info).
* Rotation: This is a quaternion, which are not yet supported by Cycles nodes. The float4 is copied to internal Cycles data and stored in the particles texture data, but the node doesn't have a socket for it yet and the data is not yet written to the stack. Code is just commented out so could be enabled quickly if/when rotation support is added to cycles.
* Velocity: Linear velocity vector of particles.
* Angular Velocity: Angular velocity around principle axes.

The texture data is currently packed tightly into the particles texture, which saves a few bytes, but requires an additional texture lookup for some vector attributes which spread over two float4s. Could also add another float4 to particle size to avoid this.
2012-08-31 19:38:59 +00:00
Lukas Toenne
f0d2477484 Fix for #32184 and redesign of particle storage in Cycles.
The particle data used by the Particle Info node was stored in cycles as a list in each object. This is a problem when the particle emitter mesh is hidden: Objects in cycles are only intended as instances of renderable meshes, so when hiding the emitter mesh the particle data doesn't get stored either. Also the particle data can potentially be copied to multiple instances of the same object, which is a waste of texture space.

The solution in this patch is to make a completely separate list of particle systems in the Cycles scene data. This way the particle data can be generated even when the emitter object itself is not visible.
2012-08-31 17:27:08 +00:00
Brecht Van Lommel
5ecff7a240 Fix #32329: inset produces incorrect result, epsilon was too small to handle
floating point error.
2012-08-31 16:10:13 +00:00
Brecht Van Lommel
fe9b1c644f Fix #32458: changing UV image in image editor not working when the active face
was not selected. Now changed it so that the active face must also have its
UVs shown in the image editor to be used as the source of the image shown.
2012-08-31 15:01:40 +00:00
Brecht Van Lommel
78c181fafc Fix part of #32376: mirror vertex groups with flip group names did not keep
the same vertex group active.
2012-08-31 13:43:56 +00:00
Brecht Van Lommel
6b2aa6f863 Fix #32408: image editor does not show paint brush circle on loading a .blend
file that has paint mode enabled.
2012-08-31 13:04:03 +00:00
Brecht Van Lommel
533192013f Fix #32447: mouse selection in uv editor is now no longer registerd as last
operator, same as 3d view.
2012-08-31 12:08:08 +00:00
Brecht Van Lommel
0b4dfa1fcb Fix #32450: edge slide with multiple loops selected could move some loops
in the wrong direction.
2012-08-31 12:08:04 +00:00
Thomas Dinges
e5f23b4ace Cycles / OSL:
* Assume OSL libs in the libdir.
2012-08-31 00:21:56 +00:00
Brecht Van Lommel
fd22a5603a Fix #32418: color copy/paste between gamma and linear color buttons gave wrong
results, now it does the conversion.
2012-08-30 17:55:21 +00:00
Brecht Van Lommel
4e13a659bb Fix #32402: live unwrap memory leak, more noticeable if you have many UV's pinned. 2012-08-30 17:42:08 +00:00
Brecht Van Lommel
b25ca62f20 Fix #32404: GLSL normal maps using float images were incorrectly getting
color managed.
2012-08-30 17:42:04 +00:00
Brecht Van Lommel
f9bccc069c Fix #32405: snapping in UV editor does not work if snapping in 3D view is set
to "snap to face" with "project individual ..." enabled.
2012-08-30 17:41:59 +00:00
Joshua Leung
c4622c405e Bugfix [#32249] Groups in Dopesheet and Action editor don't get updated after
bone renaming

* Renaming F-Curves now checks if the corresponding F-Curve's group can also be
renamed accordingly.
* Changed the RNA updates for bone renaming so that they properly update the
channel lists
2012-08-30 15:06:13 +00:00
Brecht Van Lommel
dfd54c61d1 Possible fix for #32446: after undo in mesh edit mode, vertex/edge/face
selection syncing would not work correct, in this case deselecting an edge
would deselect the two vertices even if it wasn't needed.
2012-08-30 14:18:14 +00:00
Joshua Leung
09af2fecfb Silencing compiler warning (use of undefined value) 2012-08-30 14:09:50 +00:00
Joshua Leung
7e2ec90db9 Bugfix [#32437] Cannot define Alt-E keybinding in Text Editor window
WM_keymap_add_item(keymap, "TEXT_OT_insert", KM_TEXTINPUT, KM_ANY, KM_ANY, 0);
<---  this catch-all key map item at the end of the Text Editor keymap was
gobbling all the key events for user-defined hotkeys added after it in the
keymap. This includes all hotkeys for new operators defined by addons (via
keymap.keymap_items.new()).

As a slightly hacky workaround for this, I've added an extra parameter to
keymap_items.new() which will force the newly added item to get added to the
start of the key map items list (i.e. with top priority). To enable, simply add,
head=True    to keymap_items.new() calls. For example:
    keymap.keymap_items.new("MY_OP_my_operator_id", type='E', value='PRESS',
alt=True, head=True)

This should be useful for cases where there are similar catch-alls, where it is
necessary to insert our item before the offending catch-all (without knowing
which one it is). However, in general, it's recommended not to use this, unless
all other methods (inlcuding choosing another key combination if your first
choice doesn't work) fails.
2012-08-30 14:08:43 +00:00
Joshua Leung
0db80bdb88 Style cleanup - adding some braces around some multi-line statements (used after
if/else if/for)
2012-08-30 13:18:33 +00:00
Joshua Leung
3a84186737 Style cleanup - make scope and type of "pchanw" clearer (and define it separate
from pointer references)
2012-08-30 13:11:53 +00:00
Joshua Leung
5eba863429 Bugfix [#32440] Segmentation fault when moving bone in pose mode when Ghost
Around Frame is enabled

It turns out that the final "rebuild pose" at the end of each ghost drawing step
was at fault here, as it resulted in bones referring to a different set of
constraints after each ghost drawing step. However, most of the time, these new
references pointed to non-existent locations, causing the segfaults.

To fix this, I've removed this last rebuild step, which seems to work fine (no
major problems seem to arise from this). Also, to ensure that the other object
parameters have not changed (as a result of the reevaluation that needs to go
on), we now evaluate the object once more after all the ghost drawing (but
before final restore) so that object parameters (and potentially sub-data) are
all restored to their original values.

An upside of removing the final rebuild step is that "In Range" and "On
Keyframe" ghosting options now work with proxies again. Previously, trying to
move bones (but without autokey enabled) would mean that bones would snap back
to their unkeyed positions.
2012-08-30 12:59:46 +00:00
Dalai Felinto
ded5e9cd23 clamp for Mix node
the implementation was following my early commit for Math node
I haven't had a chance to run those through Brecht, but would like to do eventually. (they work fine though)
2012-08-30 06:31:02 +00:00
Campbell Barton
3f83d273b3 fix [#32433] Grease Pencil Layer color & Color Management 2012-08-29 23:02:16 +00:00
Dalai Felinto
c052ebda8e Cycles bugfix: [32431] Cycles Math Node : Clamp does not work
the OSL solution is slightly different than the svm, but I think it's fine.

thanks Lukas Toenne for helping with a fix on the original patch
2012-08-29 17:30:14 +00:00
Sergey Sharybin
7a13bc2196 Fix wrong user counter in world node trees
World is being localized without increasing ID users, so no need
to decrease ID users on localized world free.
2012-08-29 12:47:42 +00:00