Commit Graph

44187 Commits

Author SHA1 Message Date
Brecht Van Lommel
7bcbbe26d5 Fix #33905: cycles crash with bsdf node plugged twice into add shader. 2013-01-23 13:13:20 +00:00
Brecht Van Lommel
b9472cbd83 Code cleanup: move render baking code into own file. 2013-01-23 13:13:16 +00:00
Brecht Van Lommel
a03cc5c6c5 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.
2013-01-23 13:13:10 +00:00
Ton Roosendaal
3e6892e18f 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.
2013-01-23 12:08:23 +00:00
Sergej Reich
419ce840f9 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
2013-01-23 12:06:18 +00:00
Thomas Dinges
be21034ae4 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.
2013-01-23 11:40:35 +00:00
Joshua Leung
5412d00310 Code cleanup
* Removed unused block of code
* matrice -> matrix
2013-01-23 11:24:48 +00:00
Thomas Dinges
9ce9f6a477 Cycles:
* Small code cleanup of panel registering after Bullet merge.
2013-01-23 11:02:28 +00:00
Thomas Dinges
d2161ec488 Blender 2.66 Release Cycles:
* We enter BCon3 now, ongoing module work, stabilization of new features and fixes.
2013-01-23 11:00:57 +00:00
Campbell Barton
47f23c1372 fix for blender quitting in X11 if you start blender with a tablet, unplug it, then open a new window. 2013-01-23 10:32:09 +00:00
Campbell Barton
45fb9f9f09 scene panel for rigid body - remove operator isnt greyed out when rigidbody is disabled 2013-01-23 08:07:39 +00:00
Bastien Montagne
bb14b390e5 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.
2013-01-23 07:59:07 +00:00
Campbell Barton
fd35d42bf4 code cleanup: dont use 'bpy.context' when 'context' is available 2013-01-23 07:52:31 +00:00
Campbell Barton
6b51bb39c8 move rigidbody toggle into the header for scene and objects. 2013-01-23 07:42:28 +00:00
Campbell Barton
69ddc5eb99 make bullet optional again 2013-01-23 07:26:39 +00:00
Campbell Barton
4544c234f5 fix [#29950] Linked proxy armature object properties can't be edited 2013-01-23 06:09:53 +00:00
Sergej Reich
c48238fac6 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!
2013-01-23 05:57:01 +00:00
Sergej Reich
47c96081d0 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).
2013-01-23 05:56:56 +00:00
Sergej Reich
cdc8ed24bf rigidbody: Add "Copy Rigid Body Settings" and "Bake To Keyframes" operators
Based on a script by liero, thanks!
2013-01-23 05:56:49 +00:00
Sergej Reich
2d8637946b 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.

Usage:
* 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)
2013-01-23 05:56:44 +00:00
Sergej Reich
089cf12435 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.
2013-01-23 05:56:34 +00:00
Sergej Reich
fc377c17e3 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
bodies.

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

Part of GSoC 2010 and 2012.
Authors: Joshua Leung (aligorith), Sergej Reich (sergof)
2013-01-23 05:56:27 +00:00
Sergej Reich
27601aaf01 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)
2013-01-23 05:56:22 +00:00
Sergej Reich
5c85deb285 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)
2013-01-23 05:56:13 +00:00
Sergej Reich
e83e3b0cf7 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.
2013-01-23 05:56:05 +00:00
Campbell Barton
281e094e16 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.
2013-01-23 05:42:45 +00:00
Campbell Barton
833104e647 fix for own regression since 2.4x, non-linear number button range was too insensitive for int buttons. 2013-01-23 04:55:34 +00:00
Campbell Barton
7c4f70178f 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.
2013-01-23 04:22:02 +00:00
Campbell Barton
c8dbf61f35 fix [#33729] Shadows produce artefacts in vertex colour baking 2013-01-23 03:01:43 +00:00
Campbell Barton
cba88c1778 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.
2013-01-22 21:54:44 +00:00
Monique Dewanchand
aa8fda324b Displaying labelname with reroute nodes.
It uses the default text color.
2013-01-22 21:35:33 +00:00
Sergej Reich
8b8d4ba7ef sim: Remove "continue physics" code
This was left over from 2.4x days and is not used anymore.
Now simulations are always interactive.
2013-01-22 20:47:03 +00:00
Ton Roosendaal
8733150ac1 OSX 10.6 error - hiding code behind a respondsToSelector. 2013-01-22 19:06:51 +00:00
Dalai Felinto
13f890a26c 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 properties_games.py is to make sure the
panel is in the same order for both BI and BGE engines.
2013-01-22 18:42:16 +00:00
Ton Roosendaal
6740b4f73a Matcap fix: on enabling it, and when no matcap was selected before,
it sets first matcap icon.
2013-01-22 18:36:11 +00:00
Antony Riakiotakis
a099bd8bb0 make sure config directory is initialized or python complains 2013-01-22 18:13:22 +00:00
Ton Roosendaal
9e30e7cdaf Bug fix #33911
When you open a Blender window larger than a screen, Macs clip it to match the height,
but they allow the width to be more.

Problem is that this clipping happens after all window opening code. That causes
check for HiDPI mode to fail.

Now it checks it again on event GHOST_kEventWindowUpdate, which is only on startup.
2013-01-22 18:07:17 +00:00
Antony Riakiotakis
8e2dd1c351 Scons, linux: If we are to keep WITH_INTERNATIONAL on by default, also turn on boost by default because it locale libraries are needed 2013-01-22 17:09:10 +00:00
Antony Riakiotakis
10261c4250 a better fix for scons finding pyconfig.h in ubuntu 12.10 2013-01-22 16:40:40 +00:00
Sergey Sharybin
78f5d531a4 Fix/workaround for GLSL textured and matcap modes for dyntopo
Currently used special checks in DM draw code, perhaps better would be
simply to flush changes from PBVH to DM.

Anyway, now things seems to be working OK, will check on better solution
from code point of view later.
2013-01-22 16:06:09 +00:00
Ton Roosendaal
e7ed4605eb Bugfix #33945
OSX: in HiDPI mode, the brush circle doubled on every use.
Was caused by new code storing and setting brush sizes.
2013-01-22 15:30:29 +00:00
Bastien Montagne
711c0e4fdd Fix [#33962] Grease Pencil crashing blender
Own fault from grease pencil to curve enhacement. Fixed the bug itself, and made poll of convert operator more strict (no only active when there is something to convert, i.e. at least one stroke!).
2013-01-22 15:22:46 +00:00
Bastien Montagne
63edcf785e Fix for build with scons whithout i18n support.
This should not be needed, I really see no reason for this linking error, but I'd rather use this hack than wasting more time over this issue. When will we get rid of this "two build systems to maintain" time-wasting situation?
2013-01-22 14:55:34 +00:00
Thomas Dinges
59b096ed00 Cycles:
* Disable Lamp MIS on sm_20. Still enabled for CPU and sm_21 and above.
2013-01-22 14:49:52 +00:00
Antony Riakiotakis
f758c7bd25 revert scons fix, it is necessary after all 2013-01-22 14:25:20 +00:00
Antony Riakiotakis
598d84efed ubuntu 12.10 does not have pyconfig.h in include directory causing scons to fail. Omitting since it looks like cmake only uses Python.h too 2013-01-22 14:14:30 +00:00
Campbell Barton
24f858016a add path for particle brush 2013-01-22 13:47:44 +00:00
Campbell Barton
0f108dede6 style cleanup 2013-01-22 13:35:02 +00:00
Ton Roosendaal
61bb1a3b50 Matcap fix:
Setting Cycles as render engine skipped matcap drawing.
Logic for checking drawing types needed a shuffle.
2013-01-22 12:36:06 +00:00
Antony Riakiotakis
90d92ea7fc Good rule of thumb. If blenderplayer gets broken after stubs.c leaves my "recently opened" menu on my editor, something is really wrong :) 2013-01-22 12:32:07 +00:00