Commit Graph

53000 Commits

Author SHA1 Message Date
IRIE Shinsuke
6ec2d72eca Alternative fix for T39941, this also fixes odd behavior of rendered preview.
The rendered preview didn't show active layer or wasn't updated if the
layer was disabled. Now the viewport always shows an active layer regardless
of whether it's enabled or disabled.
2014-05-03 18:29:58 +09:00
Bastien Montagne
39dc3bce30 Fix T40001: Opening a 2.66 blend file in 2.7, a bone appear "rolled but not rolled".
Looks like some sign was lost in that complex matrix algebra (always be wary of squared values!).
2014-05-03 08:52:22 +02:00
Joshua Leung
35a9a7d396 NLA Editor: Show correct tooltip for "NLA Mute" on datablock expanders 2014-05-03 16:50:40 +12:00
Joshua Leung
3faa48cb07 Spelling fix 2014-05-03 16:50:39 +12:00
Dalai Felinto
97641a0ec9 Bake API - bpy.ops.object.bake()
New operator that can calls a bake function to the current render engine when available. This commit provides no feature for the users, but allows external engines to be accessed by the operator and be integrated with the baking api.

The API itself is simple. Blender sends a populated array of BakePixels to the renderer, and gets back an array of floats with the result.

The Blender Internal (and multires) system is still running independent, but we eventually will pipe it through the API as well. Cycles baking will come next as a separated commit

Python Operator:
----------------
The operator can be called with some arguments, or a user interface can be created for it. In that case the arguments can be ommited and the interface can expose the settings from bpy.context.scene.render.bake

bpy.ops.object.bake(type='COMBINED', filepath="", width=512, height=512, margin=16, use_selected_to_active=False, cage_extrusion=0, cage="", normal_space='TANGENT', normal_r='POS_X', normal_g='POS_Y', normal_b='POS_Z', save_mode='INTERNAL', use_clear=False, use_split_materials=False, use_automatic_name=False)
Note: external save mode is currently disabled.

Supported Features:
------------------
 * Margin - Baked result is extended this many pixels beyond the border of each UV "island," to soften seams in the texture.

 * Selected to Active - bake shading on the surface of selected object to the active object. The rays are cast from the lowpoly object inwards towards the highpoly object. If the highpoly object is not entirely involved by the lowpoly object, you can tweak the rays start point with Cage Extrusion. For even more control of the cage you can use a Cage object.

 * Cage Extrusion - distance to use for the inward ray cast when using selected to active

 * Custom Cage - object to use as cage (instead of the lowpoly object).

 * Normal swizzle - change the axis that gets mapped to RGB

 * Normal space - save as tangent or object normal spaces

Supported Passes:
-----------------
Any pass that is supported by Blender renderlayer system. Though it's up to the external engine to provide a valid enum with its supported passes. Normal passes get a special treatment since we post-process them to converted and "swizzled"

Development Notes for External Engines:
---------------------------------------
(read them in bake_api.c)

* For a complete implementation example look at the Cycles Bake commit (next).

Review: D421
Reviewed by: Campbell Barton, Brecht van Lommel, Sergey Sharybin, Thomas Dinge

Normal map pipeline "consulting" by Andy Davies (metalliandy)
Original design by Brecht van Lommel.

The entire commit history can be found on the branch: bake-cycles
2014-05-02 21:19:08 -03:00
Dalai Felinto
3312b20ac8 IMB buffer functions to take a mask as input
The mask make sure the conversion only happens in a few areas of the
buffer.

New Functions:
* IMB_buffer_byte_from_float_mask
* IMB_buffer_float_from_float_mask

The functions are an adaptation of their maskless counterparts without accepting different profiles for the input and output buffers.

Review: Sergey Sharybin
2014-05-02 20:56:16 -03:00
Dalai Felinto
56d8affe42 BLI_path_suffix() - new path util functon to add a suffix to a filepath (before the extension)
Revision: D465
Reviewd by Campbell Barton
2014-05-02 20:56:16 -03:00
Campbell Barton
0111f3505f UI: more changes for large textfields
- no longer set 'but->drawstr' when editing buttons.
- clip text and set cursor based on the 'editstr'.
2014-05-03 09:18:00 +10:00
Campbell Barton
43d5e54a79 Fix for paste clamping the string length to UI_MAX_DRAW_STR 2014-05-03 06:06:19 +10:00
Campbell Barton
fc591473b2 Fix T39924: 400 character limit in text fields 2014-05-03 05:03:55 +10:00
Campbell Barton
0bb20259db Fix incorrect sizes used copying panel idname, tabname. 2014-05-03 04:17:55 +10:00
Sergey Sharybin
b62c2a913b Fix T39985: crash while rendering a scene with compositing nodes using another scene
The issue was caused by the wrong scene used to acquire render result for.

Now made it so render pipeline reports currently rendering scene to the job
via special callback.

This also solves missing tile highlight issue when rendering multiple scenes
in the compositor.
2014-05-02 14:54:13 +02:00
Sergey Sharybin
1552b56d9c Fix for missing render layer display buffer allocation 2014-05-02 14:54:12 +02:00
Lukas Tönne
b2c2edf6ae Fix T39966: Whole Group option of dupligroup visualization of particles
does not work as expected for Viewport and Blender Internal.

As @sergey noticed, this was caused by rBfbf8595, which disabled
rendering for wireframe objects in the viewport. However, the same
function `is_object_hidden` is also used for skipping dupli objects then
which may themselves be renderable.

Now use two variants:
* is_object_restricted is the previous test for general viewport/render visibility (lets wireframe duplicators pass)
* is_object_hidden includes the wireframe check for actual render instances
2014-05-02 13:08:15 +02:00
Sergey Sharybin
f65dcfc6d9 Fix T39989: Dupli group's objects in Particles are not displayed properly in 3D View
It was broken in 7544961 and the proper way is to make sure proper obmat is being
copied to object before the draw.

Doing obmat copy in advance doesn't really work because object might appear multiple
times in the duplilist.
2014-05-02 11:26:59 +02:00
Lukas Tönne
6416979b45 Fix T39984: Interpolation errors in particle emitter animation.
Reverse child->parent order of particle emitter animation eval causes
artifacts when more than one parent level is used.
2014-05-02 09:56:51 +02:00
Mitchell Stokes
1a8b17661f Fix T35552: LibLoading objects with Collision sensors gives an error
The collision sensors were not being properly unregistered from the
physics system before they were merged into the current scene.
2014-05-02 00:08:00 -07:00
Mitchell Stokes
27cbb28659 BGE cleanup: Removing the unused SCA_EventManager::Replace_PhysicsScene(). 2014-05-01 19:43:07 -07:00
Mitchell Stokes
685316b406 BGE: Forgot a NULL check in CcdPhysicsEnvironment::MergeEnvironment() 2014-05-01 18:34:25 -07:00
Campbell Barton
867efab404 Correct own stupid mistake dragging popups (x/y swap) 2014-05-02 10:09:26 +10:00
Campbell Barton
c12af4beb9 Code cleanup: UI use ui_block_to_window_rctf where possible 2014-05-02 09:33:29 +10:00
Campbell Barton
f61e885706 UIL: Dragging popups wasn't updating safe-areas 2014-05-02 09:25:04 +10:00
Mitchell Stokes
9f16428cb5 BGE cleanup: Moving the PHY_* includes in BL_BlenderDataConversion.cpp
These includes are now with the rest of the includes instead of in the
middle of the file. This should also help building on OS X.
2014-05-01 15:26:05 -07:00
Mitchell Stokes
5f80a7ffe2 Fix T39932: LibNew can't find LibLoaded meshes.
LibNew now searchs dynamic (i.e., LibLoaded)  mains instead of just the current main.
2014-05-01 14:49:42 -07:00
Campbell Barton
b75b0a11e0 Update parse_syntax_error() to Python 3.4x version 2014-05-02 06:24:29 +10:00
Campbell Barton
45163387d2 Fix T39988: Selected object count invalid after exiting local-view 2014-05-02 05:56:57 +10:00
Campbell Barton
d303556afb Code cleanup: remove file handling headers where they arent needed 2014-05-02 05:37:11 +10:00
Campbell Barton
3db5430b92 Code cleanup: replace long long with int64_t & doxy formatting. 2014-05-02 05:37:11 +10:00
Campbell Barton
95b93b5d46 Add BLI_compiler_compat.h to help with portability 2014-05-02 01:14:15 +10:00
Campbell Barton
35ca209152 Code cleanup: remove unused kludge for Py/Win encoding 2014-05-02 00:56:24 +10:00
Campbell Barton
fa25d7cf7b Code cleanup: remove defines no longer needed on windows 2014-05-02 00:55:54 +10:00
Bastien Montagne
ea6fba2926 Cleanup: Remove unused variables. 2014-05-01 16:32:25 +02:00
Bastien Montagne
bb5b608deb Fix T31555: Username with special chars in Windows 7
At last! Could not check seriously on windows (though it was done during py patch
process).
2014-05-01 16:25:39 +02:00
Tamito Kajiyama
57405578f9 Fix for a typo in comment. 2014-05-01 23:04:37 +09:00
gaiaclary
8bdac4d0bc fix T39967: Added support for Import/export of vertex color layers 2014-05-01 14:52:36 +02:00
Bastien Montagne
091f13a618 Fix blenderplayer build. 2014-05-01 09:35:32 +02:00
Campbell Barton
b245d3577a View2d: bring back 2.4x option to lock time for 2d views 2014-05-01 14:49:47 +10:00
Campbell Barton
4849ca8a56 Fix T39884: Displaying filenames with '|' failing in menus 2014-05-01 12:40:49 +10:00
Campbell Barton
7b0bce1946 Code cleanup: remove redundant filename copy & simplify splash 2014-05-01 11:59:25 +10:00
Mitchell Stokes
60c8c130fe BGE cleanup: KX_GameObject::GetParent() no longer increases the object's refcount.
I'm not sure why this function ever increased the object's refcount. Any
place in the code that calls KX_GameObject::GetParent() has to turn
around and call parent->Release(). Forgetting to call Release() was a
common cause of memory leaks (in fact, KX_SteeringActuator was probably
leaking). If the refcount needs to be increased, the calling code can
handle calling AddRef().
2014-04-30 18:53:32 -07:00
Antony Riakiotakis
73ad0dfbae Fix first part of T39956
show diffuse option not correctly calculated on opening a file.

Make sure we call pbvh_show_diffuse_color_set after building the pbvh so
vertex data are available to it.
2014-05-01 02:12:02 +03:00
Thomas Dinges
55b2a5aa45 More fixes, msvc 2008 needs math includes for "isnan".. 2014-05-01 00:36:15 +02:00
Campbell Barton
1fcce18dbf Another issue with includes
OSX needs userdef for pixelsize, adjusted header to avoid this happening again.
2014-05-01 07:38:14 +10:00
Campbell Barton
af86b008b2 Include removal gave problems with windows, ifdef some back in for windows only 2014-05-01 07:21:08 +10:00
Campbell Barton
cb48c0ceea Revert "Fix msvc 2013 compiler errors after the ingenious cleanup in 4ca67869cc7a."
This reverts commit a47a4ef82f.
2014-05-01 07:20:46 +10:00
Thomas Dinges
a47a4ef82f Fix msvc 2013 compiler errors after the ingenious cleanup in 4ca67869cc. 2014-04-30 23:16:12 +02:00
Campbell Barton
2ce3e4639a Fix for making single user objects setting FROMGROUP flag incorrectly 2014-05-01 06:52:10 +10:00
Antony Riakiotakis
d2a3260763 Add PBVH debug display, where we can see the PBVH node bounding boxes.
To enable enter debug value 14.
Leaf nodes are green while container nodes are red.
2014-04-30 23:43:19 +03:00
Campbell Barton
d50f8832e3 Fix T39969: Make single user object looses custom-tx-bone 2014-05-01 06:07:21 +10:00
Campbell Barton
3d5ab5a496 Warning cleanup: signed/unsigned compare
also remove redundant loop in BKE_pose_copy_data
2014-05-01 05:57:01 +10:00