7 years agoMerged changes in the trunk up to revision 54110.
Tamito Kajiyama [Sat, 26 Jan 2013 23:49:13 +0000 (23:49 +0000)]
Merged changes in the trunk up to revision 54110.

Conflicts resolved:

7 years agoSlightly generalized the crash fix in revision 54111.
Tamito Kajiyama [Sat, 26 Jan 2013 22:28:04 +0000 (22:28 +0000)]
Slightly generalized the crash fix in revision 54111.
Also added a warning message to anticipate potential issues due to
the implication of the problem addressed here.

7 years agoFix for a crash in curvature calculation due to a WVertex with no associated edges.
Tamito Kajiyama [Sat, 26 Jan 2013 18:53:16 +0000 (18:53 +0000)]
Fix for a crash in curvature calculation due to a WVertex with no associated edges.
(TODO: identify the reason why such a strange WVertex is generated.)
Problem report by Vicente Carro with a .blend for reproducing the issue.  Thanks a lot!

7 years agoFix [#34005] blender will close immediately in debug mode on deleting objects
Sergej Reich [Sat, 26 Jan 2013 17:38:45 +0000 (17:38 +0000)]
Fix [#34005] blender will close immediately in debug mode on deleting objects

Was silly mistake from rigidbody merge, base was used after it's been

Now don't free base in BKE_scene_base_remove() and rename it to

7 years agoCheck for deletion before moving vert in dyntopo collapse edge
Nicholas Bishop [Sat, 26 Jan 2013 17:19:21 +0000 (17:19 +0000)]
Check for deletion before moving vert in dyntopo collapse edge

Fixes [#33964] Dyntopo crash with edge collapse + undo

7 years agoRevert r54058, caused crash when adding paritcles in particle edit mode
Sergej Reich [Sat, 26 Jan 2013 12:30:44 +0000 (12:30 +0000)]
Revert r54058, caused crash when adding paritcles in particle edit mode

MEM_recallocN() doesn't allocate memory when used on a null pointer.

Just revert commit since there is no real benefit to using
MEM_recallocN() in this case.

7 years agoPorting over hotkeys for adding rigidbody objects (from original branch)
Joshua Leung [Sat, 26 Jan 2013 05:34:06 +0000 (05:34 +0000)]
Porting over hotkeys for adding rigidbody objects (from original branch)

* Ctrl-R          = Add Active
* Ctrl-Shift-R = Add Passive
* Ctrl-Alt-R    = Remove

7 years agoMotion Path calculations for objects now takes rigidbodies sim effects into
Joshua Leung [Sat, 26 Jan 2013 05:28:58 +0000 (05:28 +0000)]
Motion Path calculations for objects now takes rigidbodies sim effects into

7 years agoreal fix for Logic Bricks UI smart controller (#33746)
Dalai Felinto [Sat, 26 Jan 2013 03:30:21 +0000 (03:30 +0000)]
real fix for Logic Bricks UI smart controller (#33746)
previous commit (54102) actually reintroduces an old bug where Blender sigfaults when
the sensor and controllers are not from the active object.

The real fix for report #33746 is to clear the "object" property after the operator ran.
I'm not sure why when I call the operator from command line the property is cleared, but not
when I called it from C. Either way all should be working now.

7 years agobugfix for 33746 Unable to add Controller to objects correctly
Dalai Felinto [Sat, 26 Jan 2013 02:46:07 +0000 (02:46 +0000)]
bugfix for 33746 Unable to add Controller to objects correctly
(live from the global game jam Vancouver ;)

7 years agoFix [#33997] Units Scale in Metric mode displays wrong face area.
Bastien Montagne [Fri, 25 Jan 2013 21:21:38 +0000 (21:21 +0000)]
Fix [#33997] Units Scale in Metric mode displays wrong face area.

Also now display nice "area" units (maybe using "length" units was a perf matter, but anyway, you can't have more than a few tens of values displayed at a time, after that they become unreadable). Easy to undo anyway if we really want to keep ugly "10m" as area display!

7 years agoSmall tweak: Allow DPI for UI to go up 144, exactly double size of 72.
Ton Roosendaal [Fri, 25 Jan 2013 15:44:22 +0000 (15:44 +0000)]
Small tweak: Allow DPI for UI to go up 144, exactly double size of 72.
That makes all default icons draw in full unfiltered 32x32 pixel glory!

7 years agoFix warnings about undefined _POSIX_C_SOURCE with gcc 4.2 on Mac.
Brecht Van Lommel [Fri, 25 Jan 2013 13:51:49 +0000 (13:51 +0000)]
Fix warnings about undefined _POSIX_C_SOURCE with gcc 4.2 on Mac.

7 years agoBugfix #33989
Ton Roosendaal [Fri, 25 Jan 2013 10:17:06 +0000 (10:17 +0000)]
Bugfix #33989

Transparent region drawing and blend broke by commit 53919 5 days ago.
This commit reverts the change.

The claim in previous commit "edited code for readability" is quite
disputable :) The error is hard to notice even.

I also like to emphasize that people should check with owners for code
before committing changes! Cleaning code is first a job for maintainers.

7 years agoIncreasing dilate erode number of steps.
Monique Dewanchand [Fri, 25 Jan 2013 09:57:17 +0000 (09:57 +0000)]
Increasing dilate erode number of steps.

7 years agocommitted patch [#33972] dilate/erode optimization
Monique Dewanchand [Fri, 25 Jan 2013 09:47:28 +0000 (09:47 +0000)]
committed patch [#33972] dilate/erode optimization

this patch optimizes the dilate/erode step method (hopefully without any functional change),
making its speed not depend on the distance anymore.

Couldn't detect funtional changes so committing. Haven't tested for speed gain.

 * credits to erwin94 David M

7 years agoFix for no copy constructor in the Python wrapper of StrokeAttribute.
Tamito Kajiyama [Fri, 25 Jan 2013 07:31:29 +0000 (07:31 +0000)]
Fix for no copy constructor in the Python wrapper of StrokeAttribute.

7 years agorigidbody: Improve add/remove operators
Sergej Reich [Fri, 25 Jan 2013 06:26:38 +0000 (06:26 +0000)]
rigidbody: Improve add/remove operators

Now all add/remove operators for rigid body objects and constraints
automatically add objects to the appropriate groups and create groups if they
don't exist yet.

This makes handling rigid bodies easier but doesn't take away functionality.
If users want to handle groups manually they just need to create them before
adding any objects.

The previous behaviour was confusing and was even considered to be a bug since
clicking on rigid body in the physics tab seemed to do nothing.

7 years agoscons: Add missing WITH_BULLET define
Sergej Reich [Fri, 25 Jan 2013 05:02:36 +0000 (05:02 +0000)]
scons: Add missing WITH_BULLET define

Fixes [#33980] Ridid Body crashes when changing Collision shape with playback
as well as several other rigid body bugs wtih scons.

7 years agoFix cycles crash that happened with mesh emission and diffuse/glossy ray
Brecht Van Lommel [Fri, 25 Jan 2013 02:00:57 +0000 (02:00 +0000)]
Fix cycles crash that happened with mesh emission and diffuse/glossy ray
visibility disabled on some objects.

7 years agoheader cleanup, include BLI before BKE, also use bool for ntreeShaderExecTree
Campbell Barton [Thu, 24 Jan 2013 21:57:13 +0000 (21:57 +0000)]
header cleanup, include BLI before BKE, also use bool for ntreeShaderExecTree

7 years agoDo not redefine math functions for floats if compiler complies with C99 or POSIX...
Sv. Lockal [Thu, 24 Jan 2013 20:54:12 +0000 (20:54 +0000)]
Do not redefine math functions for floats if compiler complies with C99 or POSIX.1-2001

This is useful for gcc which does not define sqrtf/powf/... functions with preprocessor and therefore always used sqrt/pow/...
Float functions are generally 20-50% faster than their equivalents for double type.

7 years agoDisabled commit that was rendering Blender Internal for Cycles nodes.
Ton Roosendaal [Thu, 24 Jan 2013 19:31:44 +0000 (19:31 +0000)]
Disabled commit that was rendering Blender Internal for Cycles nodes.

Apparently Material nodes allow a mix of Cycles and BI Materials. Nifty!
I should read more docs, like this cool tutorial:

7 years agoLogic mistake in previous commit, broke node materials for Internal render.
Ton Roosendaal [Thu, 24 Jan 2013 18:56:04 +0000 (18:56 +0000)]
Logic mistake in previous commit, broke node materials for Internal render.

7 years agoPut back minimum window sizes on 320x240.
Ton Roosendaal [Thu, 24 Jan 2013 17:57:38 +0000 (17:57 +0000)]
Put back minimum window sizes on 320x240.
This didnt work well with making blender areas into windows.

Real fix: check such minimums based on what's in the window itself... or just
make scaling work flawless.

7 years agoFix #33953: blender crash after few steps with .exr image in compositor
Sergey Sharybin [Thu, 24 Jan 2013 17:21:22 +0000 (17:21 +0000)]
Fix #33953: blender crash after few steps with .exr image in compositor

Issue was caused by FILE multilayer ImBuf sharing buffers with render
result, and SEQUENCE multilayer ImBufs duplicating buffers. Which is
nice by it's own. But, changing image source wouldn't remove any loaded
image buffers, meaning if you've got loaded FILE multilayers they'll
likely became invalid.

That behavior of handling multilayers on changing source was done as
a fix for #24976, which is now actually not needed (removing check
for multilayer doesn't change behavior at all).

Just to be sure added check to RNA, so signal wouldn't be fired if
source wasn't actually changed form a menu.

7 years agoFix/workaround for cycles crash when enabling it for preview renders.
Brecht Van Lommel [Thu, 24 Jan 2013 16:20:43 +0000 (16:20 +0000)]
Fix/workaround for cycles crash when enabling it for preview renders.

Problem is that preview render database is being used, but the new datablock
function still uses G.main, and the mesh was being added to one database but
(attempted to be) removed from another. The proper fix would get rid of the
globals here, will look into that later.

7 years agoUsability
Ton Roosendaal [Thu, 24 Jan 2013 16:11:07 +0000 (16:11 +0000)]

- Cycles materials now render in Blender Internal too, skipping the nodes.
  Not very useful, but at least things then show up on renders and in

- Node editor: if wrong shader nodes are in a tree, they draw with thene
  color RED ALERT headers now. (Switching render engine will show it).

7 years agouse bool for new code.
Campbell Barton [Thu, 24 Jan 2013 14:48:08 +0000 (14:48 +0000)]
use bool for new code.

7 years agofix for mesh-cache modifier deform-integration used with axis-flipping would fail.
Campbell Barton [Thu, 24 Jan 2013 14:36:02 +0000 (14:36 +0000)]
fix for mesh-cache modifier deform-integration used with axis-flipping would fail.

7 years agoTiles highlight shall work fine with border render now
Sergey Sharybin [Thu, 24 Jan 2013 13:55:04 +0000 (13:55 +0000)]
Tiles highlight shall work fine with border render now

Before it was some offset from actual tile pixels.

7 years agoFixed for strict compiler flags
Sergey Sharybin [Thu, 24 Jan 2013 13:43:37 +0000 (13:43 +0000)]
Fixed for strict compiler flags

7 years agoNew 'X' icon in search buttons sometimes overlapped text, needs extra space.
Ton Roosendaal [Thu, 24 Jan 2013 13:02:00 +0000 (13:02 +0000)]
New 'X' icon in search buttons sometimes overlapped text, needs extra space.

7 years agofix for setting RegionView3D.view_matrix
Campbell Barton [Thu, 24 Jan 2013 11:54:11 +0000 (11:54 +0000)]
fix for setting RegionView3D.view_matrix

7 years agoFinal memory fix for (not really a leak, but unfreed memory...
Bastien Montagne [Thu, 24 Jan 2013 11:38:17 +0000 (11:38 +0000)]
Final memory fix for (not really a leak, but unfreed memory at end of program - I thought addons were unregistered at quit time...).

7 years agouse inline functions for subsurf MVert,MEdge mesh array functions, also some include...
Campbell Barton [Thu, 24 Jan 2013 11:28:26 +0000 (11:28 +0000)]
use inline functions for subsurf MVert,MEdge mesh array functions, also some include cleanup for scons/cmake.

7 years agoArmature rigging:
Ton Roosendaal [Thu, 24 Jan 2013 11:21:40 +0000 (11:21 +0000)]
Armature rigging:
Added more clear warning print for cases when a Proxy cannot be resolved.

7 years agofix for missing initialization of vert data in ccgDM_copyFinalVertArray
Campbell Barton [Thu, 24 Jan 2013 09:36:22 +0000 (09:36 +0000)]
fix for missing initialization of vert data in ccgDM_copyFinalVertArray

7 years agopatch [#33969] fix for [#33968] Blenders Custom Project File Generator for QtCreator...
Campbell Barton [Thu, 24 Jan 2013 08:59:48 +0000 (08:59 +0000)]
patch [#33969] fix for [#33968] Blenders Custom Project File Generator for QtCreator fails
from Philipp Oeser (lichtwerk)

7 years agoFix #33975: Crash when reloading texture
Sergey Sharybin [Thu, 24 Jan 2013 08:49:48 +0000 (08:49 +0000)]
Fix #33975: Crash when reloading texture

Two issues in texture_changed:
- Missing NULL check for material (slot could be empty)
- Materials could be linked to object, added special check for this

7 years agofix for G,G causing vertex slide in UV/Image window, also comment unused defines...
Campbell Barton [Thu, 24 Jan 2013 08:49:40 +0000 (08:49 +0000)]
fix for G,G causing vertex slide in UV/Image window, also comment unused defines/enums.

7 years agoFix threading issues of viewport rendering when using movies/generated images
Sergey Sharybin [Thu, 24 Jan 2013 08:14:20 +0000 (08:14 +0000)]
Fix threading issues of viewport rendering when using movies/generated images

Issue was caused by the fact that guarded allocator is not thread-safe and
generated images/movies could allocate memory when loading pixels to Cycles.

Currently solved by switching memory allocator to using mutex lock (the same
as sued for jobs) when viewport rendering is used.

Nicer solution would be to make guarded allocator thread-safe by using atomic
operations and lock-free lists, but that's more serious change.

7 years agoAdded some code which helps troubleshooting issues caused by
Sergey Sharybin [Thu, 24 Jan 2013 08:14:05 +0000 (08:14 +0000)]
Added some code which helps troubleshooting issues caused by
non-threadsafe usage of guarded allocator.

Also added small chunk of code to check consistency of begin/end
threaded malloc.

All this additional checks are commented and wouldn't affect on
builds, however found them helpful to troubleshoot issues so
decided to commit it to SVN.

7 years agocode cleanup: minor edits to mesh-cache formatting.
Campbell Barton [Thu, 24 Jan 2013 05:54:17 +0000 (05:54 +0000)]
code cleanup: minor edits to mesh-cache formatting.

7 years agoRemove dynamic-topology flag from mesh when entering sculpt mode
Nicholas Bishop [Thu, 24 Jan 2013 04:33:29 +0000 (04:33 +0000)]
Remove dynamic-topology flag from mesh when entering sculpt mode

This will be enabled if the file was saved with dynamic topology on,
but we don't automatically re-enter dynamic-topology mode when loading
a file so remove the flag.

Fixes bug [#33956]

7 years agoadd 'deform - integrate' option to mesh-cache,
Campbell Barton [Thu, 24 Jan 2013 04:02:30 +0000 (04:02 +0000)]
add 'deform - integrate' option to mesh-cache,
This means the deformation on the input to the modifier can be re-applied ontop of the mesh cache.

In practice this is most useful for using corrective shape-keys with mesh-cache.

7 years agorigidbody: Fix [#33971] Bullet Physics crash + patch
Sergej Reich [Thu, 24 Jan 2013 03:49:30 +0000 (03:49 +0000)]
rigidbody: Fix [#33971] Bullet Physics crash + patch

BKE_rigidbody_aftertrans_update() can be called before rigid body is
validated so check before updating physics_object.

Thanks to Antony Riakiotakis (psy-fi) for the initial patch.

7 years agoBugfix [#33974] Bone roll flips 180 degrees when extruding bones vertically
Joshua Leung [Thu, 24 Jan 2013 02:52:03 +0000 (02:52 +0000)]
Bugfix [#33974] Bone roll flips 180 degrees when extruding bones vertically

For example, if you're making a chain of bones (e.g. for a spine) by extruding
the tip joint of an initial bone, the bone rolls would be: 0 (for the initial
bone), 180, -180, 180, -180, etc. This has the undesirable effect of causing
B-Bones to twist to match the roll values at the other end of the bone.

The fix here seems to improve the situation in this case: bone roll values don't
flip or change anymore (in fact, the bone axes stay perfectly aligned now, as
they should). It also doesn't seem to cause any problems in other common cases I

7 years agoadd bullet define & include for scons makesrna, also move meshcache utils into own...
Campbell Barton [Thu, 24 Jan 2013 02:14:39 +0000 (02:14 +0000)]
add bullet define & include for scons makesrna, also move meshcache utils into own file.

7 years agoreplace calloc + memcpy with recalloc.
Campbell Barton [Thu, 24 Jan 2013 00:46:51 +0000 (00:46 +0000)]
replace calloc + memcpy with recalloc.

7 years agostyle cleanup
Campbell Barton [Wed, 23 Jan 2013 23:42:18 +0000 (23:42 +0000)]
style cleanup

7 years agostyle cleanup: bake
Campbell Barton [Wed, 23 Jan 2013 23:28:22 +0000 (23:28 +0000)]
style cleanup: bake

7 years agoFix #31338: python enum properties can now specify icons for items, in the following
Brecht Van Lommel [Wed, 23 Jan 2013 21:55:11 +0000 (21:55 +0000)]
Fix #31338: python enum properties can now specify icons for items, in the following
order: (identifier, name, description, icon, unique number)

This also works without the icon still, for compatibility.

7 years agoFix #33896: particle add brush with radius 1 would give duplicated and NaN hairs.
Brecht Van Lommel [Wed, 23 Jan 2013 19:40:52 +0000 (19:40 +0000)]
Fix #33896: particle add brush with radius 1 would give duplicated and NaN hairs.

7 years agoCycles Hair: Multiple vertex colours and UV coordinates
Stuart Broadfoot [Wed, 23 Jan 2013 17:15:45 +0000 (17:15 +0000)]
Cycles Hair: Multiple vertex colours and UV coordinates

Added export of multiple UV coordinates and vertex colour attributes.

A debugging option to export the strands without using the cache has also been removed.

7 years agoMesh Cache UI:
Thomas Dinges [Wed, 23 Jan 2013 16:57:43 +0000 (16:57 +0000)]
Mesh Cache UI:
* Modifier was not in alphabetical order
* No Icon was displayed in the Add Modifier menu.

Note: Mesh Cache uses Mesh Deform Icon at the moment, needs a unique one.

7 years agoFix #33915: tweak self intersection epsilon for motion blur a bit further, still
Brecht Van Lommel [Wed, 23 Jan 2013 16:56:02 +0000 (16:56 +0000)]
Fix #33915: tweak self intersection epsilon for motion blur a bit further, still
had some cases where there were artifacts. Also fix rendering error with shutter
time set to 0.

7 years agofix blenderplayer scons after bullet merge
Antony Riakiotakis [Wed, 23 Jan 2013 16:38:09 +0000 (16:38 +0000)]
fix blenderplayer scons after bullet merge

7 years agoUI todo:
Ton Roosendaal [Wed, 23 Jan 2013 16:01:35 +0000 (16:01 +0000)]
UI todo:

Added "Panel Title" style to Theme settings.
Allows to make these nice larger or draw differently.

Also tried to put hinting in Style, but this needs to be a per-font
setting. uiFont data is still not being saved (also not allowing
to set own font files for UI). That's a todo for 267 then.

7 years agoFix compilation with WITH_X11_XINPUT=OFF
Sv. Lockal [Wed, 23 Jan 2013 15:01:33 +0000 (15:01 +0000)]
Fix compilation with WITH_X11_XINPUT=OFF

7 years agoFix for missing function stub when WITH_BULLET is disabled.
Lukas Toenne [Wed, 23 Jan 2013 14:55:41 +0000 (14:55 +0000)]
Fix for missing function stub when WITH_BULLET is disabled.

7 years agoFix normalize_m4_m4 not working correct by not copying the entire matrix,
Brecht Van Lommel [Wed, 23 Jan 2013 14:37:12 +0000 (14:37 +0000)]
Fix normalize_m4_m4 not working correct by not copying the entire matrix,
caused issue in blender internal with recent fix.

7 years agoFix for [#33959] laplacian smooth gui buggy
Thomas Dinges [Wed, 23 Jan 2013 14:19:01 +0000 (14:19 +0000)]
Fix for [#33959] laplacian smooth gui buggy
* Made the property UI range do bigger steps.
* Increased default values a bit. If people need extreme small values (0.00001) they can enter that manually.

7 years agoFix #33556: overlapping regions draw over render info at the top of 3d view and
Brecht Van Lommel [Wed, 23 Jan 2013 14:05:08 +0000 (14:05 +0000)]
Fix #33556: overlapping regions draw over render info at the top of 3d view and
image editor. Also fix it not scaling properly with DPI.

7 years agorigidbody: Fix constraint buttons only showing for mesh objects
Sergej Reich [Wed, 23 Jan 2013 13:45:52 +0000 (13:45 +0000)]
rigidbody: Fix constraint buttons only showing for mesh objects

Was silly indentation mistake.

7 years agoFix #33905: cycles crash with bsdf node plugged twice into add shader.
Brecht Van Lommel [Wed, 23 Jan 2013 13:13:20 +0000 (13:13 +0000)]
Fix #33905: cycles crash with bsdf node plugged twice into add shader.

7 years agoCode cleanup: move render baking code into own file.
Brecht Van Lommel [Wed, 23 Jan 2013 13:13:16 +0000 (13:13 +0000)]
Code cleanup: move render baking code into own file.

7 years agoFix small issue found in vertex color bake bug that caused the result to be
Brecht Van Lommel [Wed, 23 Jan 2013 13:13:10 +0000 (13:13 +0000)]
Fix small issue found in vertex color bake bug that caused the result to be
different each time, due to float precision issues. The camera matrix itself
should not be modified in render, just its copy.

7 years agoFile Menu, "Save startup file" no asks for save-over confirm.
Ton Roosendaal [Wed, 23 Jan 2013 12:08:23 +0000 (12:08 +0000)]
File Menu, "Save startup file" no asks for save-over confirm.
Being a destructive action (and there are no versions saved as backup) it's an
OK convention to prevent accidents.

7 years agorigidbody: Make rigid bodies kinematic during transformation
Sergej Reich [Wed, 23 Jan 2013 12:06:18 +0000 (12:06 +0000)]
rigidbody: Make rigid bodies kinematic during transformation

This allows moving rigid bodies on frame > startframe.
Also rigid bodies can now be picked up and trown around while the
simulation is running.

Note: There is a small glitch with cancelling tansform during simulation
but it's tricky to get rid of.

TODO: Avoid static-static collision warnings

7 years agoUI / Layout scripts:
Thomas Dinges [Wed, 23 Jan 2013 11:40:35 +0000 (11:40 +0000)]
UI / Layout scripts:
* Code cleanup for new Rigid Body panels.
* Removed some unneeded split() calls.
* Remove redundant check for "ob.rigid_body_constraint" in the draw() function of the "Rigid Body Constraint" panel. The check is already made in the poll.

7 years agoCode cleanup
Joshua Leung [Wed, 23 Jan 2013 11:24:48 +0000 (11:24 +0000)]
Code cleanup

* Removed unused block of code
* matrice -> matrix

7 years agoCycles:
Thomas Dinges [Wed, 23 Jan 2013 11:02:28 +0000 (11:02 +0000)]
* Small code cleanup of panel registering after Bullet merge.

7 years agoBlender 2.66 Release Cycles:
Thomas Dinges [Wed, 23 Jan 2013 11:00:57 +0000 (11:00 +0000)]
Blender 2.66 Release Cycles:
* We enter BCon3 now, ongoing module work, stabilization of new features and fixes.

7 years agofix for blender quitting in X11 if you start blender with a tablet, unplug it, then...
Campbell Barton [Wed, 23 Jan 2013 10:32:09 +0000 (10:32 +0000)]
fix for blender quitting in X11 if you start blender with a tablet, unplug it, then open a new window.

7 years agoscene panel for rigid body - remove operator isnt greyed out when rigidbody is disabled
Campbell Barton [Wed, 23 Jan 2013 08:07:39 +0000 (08:07 +0000)]
scene panel for rigid body - remove operator isnt greyed out when rigidbody is disabled

7 years agoFix own stupid memory leak in new py i18n code (forgot to free temp keys when searchi...
Bastien Montagne [Wed, 23 Jan 2013 07:59:07 +0000 (07:59 +0000)]
Fix own stupid memory leak in new py i18n code (forgot to free temp keys when searching messages in GHash cache!).
Thanks to PerfectionCat for finding this.

7 years agocode cleanup: dont use 'bpy.context' when 'context' is available
Campbell Barton [Wed, 23 Jan 2013 07:52:31 +0000 (07:52 +0000)]
code cleanup: dont use 'bpy.context' when 'context' is available

7 years agomove rigidbody toggle into the header for scene and objects.
Campbell Barton [Wed, 23 Jan 2013 07:42:28 +0000 (07:42 +0000)]
move rigidbody toggle into the header for scene and objects.

7 years agomake bullet optional again
Campbell Barton [Wed, 23 Jan 2013 07:26:39 +0000 (07:26 +0000)]
make bullet optional again

7 years agofix [#29950] Linked proxy armature object properties can't be edited
Campbell Barton [Wed, 23 Jan 2013 06:09:53 +0000 (06:09 +0000)]
fix [#29950] Linked proxy armature object properties can't be edited

7 years agorigidbody: Add generic spring constraint
Sergej Reich [Wed, 23 Jan 2013 05:57:01 +0000 (05:57 +0000)]
rigidbody: Add generic spring constraint

Behaves like the generic constraint but has optional spring on each axis.

TODO: Add option to set rest length.

Patch by Markus Kasten (markus111), thanks!

7 years agorigidbody: Add rigid body constraints
Sergej Reich [Wed, 23 Jan 2013 05:56:56 +0000 (05:56 +0000)]
rigidbody: Add rigid body constraints

Constraints connect two rigid bodies.
Depending on which constraint is used different degrees of freedom
are limited, e.g. a hinge constraint only allows the objects to rotate
around a common axis.

Constraints are implemented as individual objects and bahave similar to
rigid bodies in terms of adding/removing/validating.

The position and orientation of the constraint object is the pivot point
of the constraint.

Constraints have their own group in the rigid body world.

To make connecting rigid bodies easier, there is a "Connect" operator that
creates an empty objects with a rigid body constraint connecting the selected
objects to active.

Currently the following constraints are implemented:
* Fixed
* Point
* Hinge
* Slider
* Piston
* Generic

Note: constraint limits aren't animatable yet).

7 years agorigidbody: Add "Copy Rigid Body Settings" and "Bake To Keyframes" operators
Sergej Reich [Wed, 23 Jan 2013 05:56:49 +0000 (05:56 +0000)]
rigidbody: Add "Copy Rigid Body Settings" and "Bake To Keyframes" operators

Based on a script by liero, thanks!

7 years agorigidbody: Add rigid body simulation
Sergej Reich [Wed, 23 Jan 2013 05:56:44 +0000 (05:56 +0000)]
rigidbody: Add rigid body simulation

Add operators to add/remove rigid body world and objects.
Add UI scripts.

The rigid body simulation works on scene level and overrides the
position/orientation of rigid bodies when active.
It does not deform meshes or generate data so there is no modifier.

* Add rigid body world in the scene tab
* Create a group
* Add objects to the group
* Assign group to the rigid body world
* Play animation
For convenience the rigid body tools operators in the tools panel of the 3d view
will add a world, group and add objects to the group automatically so you only have
to press one button to add/remove rigid bodies to the simulation.

Part of GSoC 2010 and 2012.
Authors: Joshua Leung (aligorith), Sergej Reich (sergof)

7 years agorigidbody: Add point cache support
Sergej Reich [Wed, 23 Jan 2013 05:56:34 +0000 (05:56 +0000)]
rigidbody: Add point cache support

Add read/write/interpolate functions.

In order to get rigid body point cache id from object it's now required to pass the
scene to BKE_ptcache_ids_from_object().

Rigid body cache is drawn in the orange color of the bullet logo.

7 years agorigidbody: Add force field support
Sergej Reich [Wed, 23 Jan 2013 05:56:27 +0000 (05:56 +0000)]
rigidbody: Add force field support

Force fields work with rigid bodies just like they do with other simulations.

Increase min and max strength of force fields so they can influence heavy rigid

TODO: Adjust force field strength based on the time step taken.

Part of GSoC 2010 and 2012.
Authors: Joshua Leung (aligorith), Sergej Reich (sergof)

7 years agorigidbody: Add DNA/RNA/BKE infrastructure for the rigid body sim
Sergej Reich [Wed, 23 Jan 2013 05:56:22 +0000 (05:56 +0000)]
rigidbody: Add DNA/RNA/BKE infrastructure for the rigid body sim

This is just the basic structure, the simulation isn't hooked up yet.

Scenes get a pointer to a rigid body world that holds rigid body objects.
Objects get a pointer to a rigdid body object.

Both rigid body world and objects aren't used directly in the simulation
and only hold information to create the actual physics objects.

Physics objects are created when rigid body objects are validated.
In order to keep blender and bullet objects in sync care has to be taken
to either call appropriate set functions or flag objects for validation.

Part of GSoC 2010 and 2012.
Authors: Joshua Leung (aligorith), Sergej Reich (sergof)

7 years agorigidbody: Add rigidbody module
Sergej Reich [Wed, 23 Jan 2013 05:56:13 +0000 (05:56 +0000)]
rigidbody: Add rigidbody module

It's mostly a C API for bullet that interfaces nicely with blender.
It could act as a generic interface for rigid body simulations but right
now it's very specific to bullet.

TODO: Fix building without bullet.

Part of GSoC 2010 and 2012.
Authors: Joshua Leung (aligorith), Sergej Reich (sergof)

7 years agomath: Add functions to decompose transformation matrices
Sergej Reich [Wed, 23 Jan 2013 05:56:05 +0000 (05:56 +0000)]
math: Add functions to decompose transformation matrices

mat4_decompose() is similar to mat4_to_loc_rot_size() but returns
rotation as quaternion.
mat4_to_loc_quat() just returns location and rotation without size.

7 years agoworkaround [#32866] Crash by cyclic use of Boolean Modifier
Campbell Barton [Wed, 23 Jan 2013 05:42:45 +0000 (05:42 +0000)]
workaround [#32866] Crash by cyclic use of Boolean Modifier

officially - modifiers shouldn't calc other objects derived mesh, but in some cases its needed at the moment for certain scenes, so just disallow booleans depending on booleans.

7 years agofix for own regression since 2.4x, non-linear number button range was too insensitive...
Campbell Barton [Wed, 23 Jan 2013 04:55:34 +0000 (04:55 +0000)]
fix for own regression since 2.4x, non-linear number button range was too insensitive for int buttons.

7 years agofix for glitch with vertex bake:
Campbell Barton [Wed, 23 Jan 2013 04:22:02 +0000 (04:22 +0000)]
fix for glitch with vertex bake:
- the mesh would be tagged to update, then updated before bake finished.
- also increase self-shadow offset, in some cases the offset wasn't enough.

7 years agofix [#33729] Shadows produce artefacts in vertex colour baking
Campbell Barton [Wed, 23 Jan 2013 03:01:43 +0000 (03:01 +0000)]
fix [#33729] Shadows produce artefacts in vertex colour baking

7 years agotweak to recent commit to clamp vertex range so new empty vgroups are in fact empty.
Campbell Barton [Tue, 22 Jan 2013 21:54:44 +0000 (21:54 +0000)]
tweak to recent commit to clamp vertex range so new empty vgroups are in fact empty.
- don't clamp if no empty groups are created
- no need to call ED_vgroup_data_create, this was very old code for weight paint r1596 - weight paint works without adding 'dvert'array.

7 years agoDisplaying labelname with reroute nodes.
Monique Dewanchand [Tue, 22 Jan 2013 21:35:33 +0000 (21:35 +0000)]
Displaying labelname with reroute nodes.
It uses the default text color.

7 years agosim: Remove "continue physics" code
Sergej Reich [Tue, 22 Jan 2013 20:47:03 +0000 (20:47 +0000)]
sim: Remove "continue physics" code

This was left over from 2.4x days and is not used anymore.
Now simulations are always interactive.

7 years agoOSX 10.6 error - hiding code behind a respondsToSelector.
Ton Roosendaal [Tue, 22 Jan 2013 19:06:51 +0000 (19:06 +0000)]
OSX 10.6 error - hiding code behind a respondsToSelector.

7 years agoGame Engine UI: Image Sampling Texture Panel cleanup
Dalai Felinto [Tue, 22 Jan 2013 18:42:16 +0000 (18:42 +0000)]
Game Engine UI: Image Sampling Texture Panel cleanup
removing non-GE supported features.

The idea of splitting the draw() function comes from Campbell Barton.
Review from him as well.

The main reason for not implement this in is to make sure the
panel is in the same order for both BI and BGE engines.

7 years agoMatcap fix: on enabling it, and when no matcap was selected before,
Ton Roosendaal [Tue, 22 Jan 2013 18:36:11 +0000 (18:36 +0000)]
Matcap fix: on enabling it, and when no matcap was selected before,
it sets first matcap icon.