Commit Graph

66005 Commits

Author SHA1 Message Date
Shinsuke Irie 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 c7612d68b2 Comment out scons '-Werror=float-conversion' for Cycles for now.
This option is only available in gcc >= 4.9, and we do not have a fancy helper in scons
to check availability of a flag...
2014-05-03 11:08:27 +02:00
Bastien Montagne 392d5de0aa Fix '-Werror=float-conversion' error with gcc < 4.9, for CMake
Scons is still TODO.
2014-05-03 10:54:02 +02: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
Brecht Van Lommel 198f5e506a Cycles: CUDA changes for kernel evaluation cancel 2014-05-02 21:19:10 -03:00
Dalai Felinto eec3eaba08 Cycles Bake
Expand Cycles to use the new baking API in Blender.

It works on the selected object, and the panel can be accessed in the Render panel (similar to where it is for the Blender Internal).

It bakes for the active texture of each material of the object. The active texture is currently defined as the active Image Texture node present in the material nodetree. If you don't want the baking to override an existent material, make sure the active Image Texture node is not connected to the nodetree. The active texture is also the texture shown in the viewport in the rendered mode.

Remember to save your images after the baking is complete.

Note: Bake currently only works in the CPU
Note: This is not supported by Cycles standalone because a lot of the work is done in Blender as part of the operator only, not the engine (Cycles).

Documentation:
http://wiki.blender.org/index.php/Doc:2.6/Manual/Render/Cycles/Bake

Supported Passes:
-----------------
Data Passes
 * Normal
 * UV
 * Diffuse/Glossy/Transmission/Subsurface/Emit Color

Light Passes
 * AO
 * Combined
 * Shadow
 * Diffuse/Glossy/Transmission/Subsurface/Emit Direct/Indirect
 * Environment

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

Original design by Brecht van Lommel.

The entire commit history can be found on the branch: bake-cycles
2014-05-02 21:19:09 -03: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 8d16869d83 Code cleanup: Add -Werror=float-conversion to Cycles 2014-05-03 07:31:46 +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
Thomas Dinges 9270aa9278 Cleanup: Remove unused variables. 2014-05-02 01:27:10 +02: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
Pablo Vazquez 4e7780a34a Cycles UI:
Show the Ray Visibility panel for objects with dupli_group on, no reason to hide it.
2014-05-01 19:14:10 -03: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
Bastien Montagne e2288255fb Fix T39987: The new "redirect to bone constraints" button at the object constaints tab is wrong in bone edit mode
In edit mode, do as with usual objects - show object constraints!
2014-05-01 21:24:30 +02:00
Brecht Van Lommel c806a8ce96 Cycles: MIS for lamps now loops over all lamps instead of picking one.
Probably will not be noticed in most scenes. This helps reduce noise when you
have multiple lamps with MIS enabled, at the cost of some performance, but from
testing some scenes this seems better.
2014-05-01 19:25:13 +02: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 195df5a034 Fix some dummy formating issue (breacks i18n message processing). 2014-05-01 16:30:40 +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
Bastien Montagne 1e9c4639c2 Install_deps.sh: do not use terminfo in our own llvm build.
llvm-config does not report it as link arg as it should
(see http://stackoverflow.com/questions/21477407/llvm-3-5-fails-to-link).
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
Gaia Clary 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
Bastien Montagne 9fb4c487ed Fix T39938: install_deps.sh fails when compiling OSL
Should always use a fixed rev in git repos!

Also done some other cleanup/fixes.
2014-05-01 09:30:11 +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