Commit Graph

49420 Commits

Author SHA1 Message Date
Mitchell Stokes
362b25b382 Fix T39928: Blender crash/freeze when game engine is started with animation played directly on camera object with parents.
Updating object IPOs is not currently thread-safe since it also updates
children. This leads to problems when parents and children are both
animated. For now, updating object IPOs is done in its own loop to avoid
threading issues.
2014-05-04 15:39:15 -07:00
Joshua Leung
2a3cdeadf1 Fixes for errors uncovered after previous commit 2014-05-04 23:28:27 +12:00
Joshua Leung
c561e0d929 Code cleanup: Use enum instead of int in function signatures for bAnimChannelType settings callbacks 2014-05-04 23:19:40 +12:00
Joshua Leung
be7b09ef85 NLA Editor: Display "tweaking action" status indicator icon in place of action-type icon
Instead of displaying the "tweaking action" status indicator icon on the right hand
side jammed against the mapping/no-mapping toggle (pin), this is now displayed as in
place of the action icon used on the left (as the type indicator). This is less messy
than the previous situation, which was needed partly due to the abuse of an unsuited
icon.
2014-05-04 19:28:14 +12:00
Joshua Leung
2812e6a069 NLA Editor: Added dedicated icons for "pushdown" operator and for indicating the "tweaking" state
1) The "pushdown" operation is the actual name for the functionality
   previously represented by the snowflake. That is, pushing the active
   action onto the NLA stack as a new strip.

   The icon that is introduced here is the icon I originally wanted to
   use here for this purpose (but couldn't at the time the NLA was coded
   as we didn't have the master SVG available yet). I'm making this change
   now to hopefully make the "animation-layers" intentions behind the NLA
   design a lot clearer than they have been so far.

2) Also added a dedicated icon for representing that the active action
   is in the "tweaking" state (i.e. we're editing a particular strip's
   action). Previously we were abusing an icon designed for an entirely
   different purpose, mainly since its identifier looked like it would work.
2014-05-04 19:19:39 +12:00
Joshua Leung
91f90f61d3 NLA Eval Bugfix: Influence settings on active action didn't work
* The automatically calculated influence was overriding the value we were passing
  into the dummy strip, making this seem like it doesn't work

* Made some tweaks to prevent some potential memory-related bugs
   - nlastrips_ctime_get_strip() actually saves off references to the list of strips
     it gets, so declaring dummy_strip in an inner scope like this could potentially
     be quite dangerous
   - Prevented a potential memory leak for the early abort when there are no strips
     for whatever reason (it shouldn't occur though)
2014-05-04 16:35:12 +12:00
Campbell Barton
fd80ac4c3e Fix typo (uninitialized var) 2014-05-04 12:37:02 +10:00
Campbell Barton
a1ba57a008 Fix T40010: Single user looses parent relationship (temporarily) 2014-05-04 08:36:15 +10:00
Sergey Sharybin
ea6671a630 Fix for aligned handles in masking and curve objects
The issue has been introduced in 0985bb4, made it so curves and masks
stick to old behavior.

FCurves are still flaky, namely, grabbing both handles selected would
change the length of one of the handles which is not nice imo.
2014-05-03 21:58:02 +02:00
Campbell Barton
08d899d1e7 Code cleanup: style 2014-05-04 00:41:45 +10:00
Sergey Sharybin
e08db08a84 Fix T39997: Multiple boolean modifiers sharing the same right operand crashes
The issue was caused by the temporary CD layers being allocated for subsurf
meshes, same as we've got back in 881fb43.

In the long run this temporary storage is to be re-considered, but it'll also
imply re-considering of the Derivedmesh interaction as well. For now let's
use a simpler solution which is forbidding modifiers to call getArray for other
objects' derivedMeshes but use an API calls which would allocate local copy of
the data preventing race condition of shared data in DM.
2014-05-03 16:13:01 +02:00
Campbell Barton
48c1a7f8a4 Doxy cleanup: formatting 2014-05-03 23:45:17 +10:00
Tamito Kajiyama
38b9979919 Minor code style fix. 2014-05-03 20:38:45 +09:00
Tamito Kajiyama
5347c7b9db Added support for the Make Local command in the Outliner on textures in line styles. 2014-05-03 20:38:44 +09:00
Tamito Kajiyama
78fb7249c6 Added changes to unlink textures from line styles in the Outliner. 2014-05-03 20:38:43 +09:00
Tamito Kajiyama
634da4598e Added changes to show textures as part of line styles in the Outliner. 2014-05-03 20:38:43 +09:00
Tamito Kajiyama
3c3759ac9e Added notifier of updates in Freestyle texture slots. 2014-05-03 20:38:42 +09:00
Tamito Kajiyama
308ec601b2 Fix for missing initialization and copying of FreestyleLineStyle::pr_texture value. 2014-05-03 20:38:41 +09:00
Thomas Beck
0cd49fde56 Make blenderplayer compilable again after recent commit b7f085d9c1 by Tamito.
Inserted a stub in stub.c and added the struct keyword to make gcc happy
2014-05-03 12:51:51 +02:00
Tamito Kajiyama
b7f085d9c1 Patch D246: Texture Marks for freestyle strokes, written and contributed by Paolo Acampora.
Reviewers: brecht, kjym3, #freestyle

Reviewed By: brecht, kjym3

Differential Revision: https://developer.blender.org/D246
2014-05-03 18:54:59 +09:00
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