Commit Graph

48327 Commits

Author SHA1 Message Date
Campbell Barton
f173ff531c handy function for getting the 2d camera coords for a worldspace location.
bpy_extras.object_utils.world_to_camera(scene, obj, coord)
2013-06-13 13:51:01 +00:00
Brecht Van Lommel
a17d8a29bb Fix #35733: lamps on render layers that are both excluded and used for masking
should not be used, same as emissive meshes.
2013-06-13 13:09:32 +00:00
Campbell Barton
cda5770160 code cleanup: also fix crash in GPU_state_print(). and confine to debug mode builds. 2013-06-13 11:59:28 +00:00
Sergey Sharybin
eb136fcbec Added NULL check for socket type make_socket_interface
Without this check it's easy to crash blender by passing
non-existing socket type to sockets.new() function.
2013-06-13 11:49:22 +00:00
Campbell Barton
65047099b2 fix for pythons __dir__ returning registrable functions on class instances (which may not have the functions defined).
gave odd behavior of including members in __dir__ that couldn't getattr()
2013-06-13 11:35:25 +00:00
Tamito Kajiyama
d958144b65 Removed the Material Boundary option from the edge detection options in
the Parameter Editor mode.  The Material Boundary toggle button takes
effect only in the Python Scripting mode.  Instead the Parameter Editor
mode automatically determines which edge types need to be computed on the
basis of user-specified line selection criteria in terms of edge types.

Problem report from Light BWK through personal communications, thanks!
2013-06-13 11:10:18 +00:00
Sergey Sharybin
54a42a4254 Fix crash in movie clip node when ibuf fails to load.
Was a stupid mistake in another fix here :(
2013-06-13 10:25:41 +00:00
Lukas Toenne
85823bff07 Safety check for NodeTree.links.new function: Added NEVER_NULL flags to from_socket/to_socket arguments to make sure the function doesn't crash when passing None/NULL. 2013-06-13 09:52:14 +00:00
Campbell Barton
815a87a652 fix [#35346] Python: still UI issue with popup and dropdown list 2013-06-13 09:12:53 +00:00
Campbell Barton
8b4bca6cf0 fix [#35713] Set Origin not waiting for user input.
Only activate search-box items on mouse-release,
Otherwise this gives odd behavior when using the operator-search popup since some tools expect the mouse buttons not to be held when activating which includes operators that have their own popup menus.
2013-06-13 01:39:07 +00:00
Campbell Barton
8eb6b954fd internal change to searchbox: store the active search index rather then index + 1, simplifies checks. 2013-06-13 01:13:26 +00:00
Campbell Barton
532503e0cb fix for problem with creating weight-paint preview.
In the case where the modifier stack didnt need deform-verts to calculate,
they would not be available for the preview either.

This fixes a bug caused by r57206 which set mirror to preview so the mirrored
weights would be displayed, but it only worked when there was an armature after it, see [#35545].
2013-06-13 00:33:48 +00:00
Brecht Van Lommel
a5f60e9337 Fix #35723: cycles motion blur rendering issue after recent optimizations to skip
some unneeded object syncing.
2013-06-12 20:47:48 +00:00
Brecht Van Lommel
69e7fb6091 Fix #35715: incorrect shortcut shown for some menus after recent code refactoring. 2013-06-12 20:47:46 +00:00
Tamito Kajiyama
f4dc0fa6c9 Fix #35353: Freestyle + Compositor + Auto-render renders freestyle lines in the wrong place. 2013-06-12 17:59:03 +00:00
Sergey Sharybin
9aa088bab6 Track Position node now could output absolute position of track at a given frame 2013-06-12 14:28:36 +00:00
Sergey Sharybin
ba3a1067fa Remove magic constants from Track Position node RNA code. 2013-06-12 12:55:44 +00:00
Sergey Sharybin
22d2faccef Cleaned code a bit around 2D stabilization
Hopefully it's more readable now. Took me a while to remmeber
all the stuff going on here while was looking into possibility
of implementing some feature here.
2013-06-12 12:34:10 +00:00
Joshua Leung
2aab2d97de Bugfix [#35668] Tooltip for Euler Discontinuity Filter was misleading
The tooltip seemed to hint that this tool is able to resolve all manner of
gimble-lock situations by untangling the curves (i.e. performing some kind of
equivalent-angles resolution, keeping in mind the nearest situations nearby).
However, this tool currently only performs corrections for the most basic case
when large jump+flip discontinuity artifacts appear in euler rotation curves as
a result of rotation values getting clipped to +/- 180 degrees, which arises
when these rotation curves are the result of baking some physics sim or so.

(Also, fixed an unrelated "replace-all" typo in a comment)
2013-06-12 12:32:07 +00:00
Lukas Toenne
0c91ebfeee Fix #35703, Viewer node doesn't updates image sometimes. The viewer node was not getting correctly initialized node->id pointer to the Viewer image (thanks to Sergey for figuring that out). The original
proposal was to add another special init hack for the viewer node->id, but rather would do it right and so moved all the special init hacks for constant ID backpointers (Scene for RenderLayer, Composite,
Defocus, FileOutput and MovieClip for MovieClip, MovieDistortion and Stabilization nodes). These are now part of the local init callbacks functions of the appropriate nodes, using the new initfunc_api
callback which takes a Context pointer, so they have access to Scene.
2013-06-12 11:26:44 +00:00
Gaia Clary
793e582d1a Vertex weight panel now uses same sort order as Vertex Group list 2013-06-12 10:39:27 +00:00
Campbell Barton
69153c7089 ifdef bugfix since its a little strange. 2013-06-12 10:03:13 +00:00
Gaia Clary
1d1bf3b2ba prepared local vgroup selection function for more general usage 2013-06-12 09:52:37 +00:00
Campbell Barton
31e667c10e solidify: dont add poly-normal layer to the derived mesh, since this is no longer a convention. 2013-06-12 09:35:02 +00:00
Campbell Barton
8e2e590484 fix [#35710] Mesh explodes while using solidify modifier with tubular non-manifold base mesh. 2013-06-12 08:24:31 +00:00
Campbell Barton
0b316d72ca change to solidify modifiers own normal calculation function, dont attempt to calculate normals for edges with 3+ face users. 2013-06-12 07:53:54 +00:00
Campbell Barton
293b3f0bdf optimize solidify, no need to do edgehash lookups, the edges are known. 2013-06-12 07:16:13 +00:00
Lukas Toenne
f0b991c944 Supplementary fix for #35640, internal node group trees (inside material, lamp, world, texture and scene) still keep their original library pointer when appending, making them uneditable. Clearing the
lib pointer now has been moved inside the id_clear_lib_data function, with an ugly switch statement to handle integrated node trees.
2013-06-12 07:02:52 +00:00
Campbell Barton
d00ca6eb2c solidify: reduce sign conversions. 2013-06-12 06:51:02 +00:00
Campbell Barton
3994ad8ced solidify: remove BLI_array realloc's. 2013-06-12 06:20:24 +00:00
Campbell Barton
da733a25a5 correct solidify normal calculation logic
- always calculate vertex normals since they are used as fallbacks.
- only calculate rim normals if the normals are not already flagged as dirty.
2013-06-12 06:06:19 +00:00
Campbell Barton
fa51f02be3 minor changes to the script auto-execution based on Brecht's suggestions. 2013-06-12 00:10:56 +00:00
Brecht Van Lommel
37f92119e4 Fix #35665: more CUDA issues with recent kernel changes, tested on sm_20, sm_21
and sm_30 cards, so hopefully it should all work now.

Also includes some warnings fixes related to nvcc compiler arguments, should make
no difference otherwise.
2013-06-11 21:58:48 +00:00
Brecht Van Lommel
3d21bf9688 Fix lamp size allowing negative values. 2013-06-11 21:58:43 +00:00
Campbell Barton
c8f30bc7f0 fix [#35574] Export Key Map issue
problem was the keymap failed to import but didnt give any feedback, now it displays error message.
2013-06-11 15:11:55 +00:00
Brecht Van Lommel
e895e2e0d1 Fix #35711: cycles border render issue after recent changes. 2013-06-11 14:15:46 +00:00
Brecht Van Lommel
de83a4f13c Fix #35251: cycles crash rendering with a particular user preferences configuration. 2013-06-11 12:52:02 +00:00
Brecht Van Lommel
789fabba41 Fix #35405: properties editor preview render restarted unnecessarily after F12 render. 2013-06-11 12:37:56 +00:00
Sergey Sharybin
568f0c70c1 Fix #35704: Simplify on scene with dupli recursion crashes
Couple of issues here:

- User shouldn't be able to run into dupligroup recursion.
  It was checking already when setting a group for dupli.
  Added check to operator which adds object to group.

- It's still possible files with recursion are hanging around,
  so made simplify function robust to such kind of crap.
2013-06-11 11:21:16 +00:00
Sergey Sharybin
e895c8302e Use OpenMP threads in bm_loop_interp_mdisps
Gives approx 2x speedup on my laptop on such operations
as mesh subdivision in edit mode. Desktops with fancier
CPUs could benefit even more.

Thanks Campbell for review!
2013-06-11 09:14:39 +00:00
Sergey Sharybin
e969bb207d Fix compilation error caused by recent wavelength node commit
Apparently, it's bad idea to rely on compiler to cast NULL
which is (void*)0 to int -- and in fact if i was a compiler
would also generate an error.

Further, couldn't see why we need to pass NULL or 0 th add_node,
argument value is defautl to 0 already.
2013-06-11 08:07:05 +00:00
Sergey Sharybin
401eaa448b Fix for distortion happens when flipping mesh normals
Issue was caused by missing X/Y displacement components
flip when flipping the normals (flipping the normals changes
the tangent space apparently and displacement vectors need
to be modified to correspond to new space).

Reported by Jonathan Williamson in IRC.
2013-06-11 08:06:59 +00:00
Campbell Barton
c730ae0921 another case that should have been in r57371, also reduce type conversions in compassion. 2013-06-11 05:56:02 +00:00
Campbell Barton
f0e6e60f65 fix for problem where curve handles in editmode could be obscured by other selected objects (referred to in [#35669]) 2013-06-11 05:21:36 +00:00
Campbell Barton
5e892def15 fix [#35656] Crash on File Browser 2013-06-11 05:09:12 +00:00
Tamito Kajiyama
5520331215 Fix #35561: freestyle + read full sample layers = crash.
Now add_freestyle() in pipeline.c takes a second argument to enable/disable
stroke rendering.  When stroke rendering is disabled, the function allocates
data structures but does not perform stroke rendering.  The allocated data
structures (mostly left unpopulated with data elements) are intended to allow
for the Read Full Sample Layers (Shift-R) command in the compositor.
2013-06-11 02:32:01 +00:00
Thomas Dinges
9020df976c Cycles / Wavelength to RGB node:
* Added a node to convert wavelength (in nanometers, from 380nm to 780nm) to RGB values. This can be useful to match real world colors easier.

* Code cleanup:
** Moved color functions (xyz and hsv) into dedicated utility files.
** Remove svm_lerp(), use interp() instead. 

Documentation:
http://wiki.blender.org/index.php/Doc:2.6/Manual/Render/Cycles/Nodes/More#Wavelength

Example render:
http://www.pasteall.org/pic/show.php?id=53202

This is part of my GSoC 2013. (revisions 57322, 57326, 57335 and 57367 from soc-2013-dingto).
2013-06-10 21:55:41 +00:00
Brecht Van Lommel
c03e638cf3 Fix msvc compile error with subdivide use_smooth_even option. 2013-06-10 20:54:08 +00:00
Brecht Van Lommel
2213b92e48 Fix cycles OSL node sockets not preserving values when updating with new code. 2013-06-10 20:47:58 +00:00
Brecht Van Lommel
9d3ad07f14 Cycles: ray visibility panel is now also available for the world, works same as
meshes and lamps. The light path node already made this possible but it's a bit
faster to render this way and convenient.
2013-06-10 20:34:34 +00:00