Commit Graph

365 Commits

Author SHA1 Message Date
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
cffd10a7c8 Todo item:
- Drop group into 3d window now puts itself at mouse cursor location.
- Drop objects into 3d window now doesn't move the 3d cursor anymore.

Added new function ED_view3d_cursor3d_position() to handle this,
so the temporarily object-drop operator macro also could go away.
(Which was setting 3d cursor)
2012-12-26 16:24:50 +00:00
3ca00cbf54 Outliner:
Added drag-drop support for Groups. On drop in 3d window it creates an instance.

Todo: it adds this on 3d cursor position still. The existing drop-object-duplicate operator
is a Macro - with warning. For adding on mouse-cursor position we need a better
way (new function call, just use operator option).
2012-12-22 18:34:17 +00:00
b61958c80d Bugfix 33560
Setup: 2 windows, 2 scenes, shared objects and groups.

Errors:
- editing in 1 window, didn't correctly update shared stuff in the other
  (like child - parent relations)
- deleting group members in 1 scene, could crash the other.

Fixes:
- On load, only a depsgraph was created for the "active" scene. Now it makes
  depsgraphs for all visible scenes.
- "DAG ID flushes" were only working on active scenes too, they now take
  the other visible into account as well.
- Delete object - notifier was only sent to the active scene.

All in all it's a real depsgraph fix (for once!) :) Using multi-window and
multi-scene setups now is more useful.
2012-12-17 12:03:31 +00:00
18cb2d208c code cleanup: use 'const float *' when getting the 3d cursor and not editing it. 2012-12-17 05:38:50 +00:00
7c699a217a define the size of matrix args for both rows/cols. 2012-12-11 14:29:01 +00:00
22505c10f8 fix [#33442] Units
adding meshes were scaling the user input values so the distance on the button didnt relate to the scale of the object added.

Now use an invoke function that scales unset default values.
2012-12-09 10:48:18 +00:00
9653c929ed skip recalculating tessface when adding objects if 'EnterEdit-mode' is disabled. 2012-11-29 02:37:39 +00:00
863291bc8e Fix #33113: cycles not rendering motion blur correct with dying particles.
There were a bunch of other issues with dupli motion blur and syncing, the problem
being that there was no proper way to detect corresponding duplis between frames
or updates. As a solution, a persistent_id was added to the DupliObject. It's an
extension of the previous index value, with one index for each dupli level. This
can be used to reliably find matching dupli objects between frames. Works with
nested duplis, multiple particle systems, etc.
2012-11-08 16:35:28 +00:00
c9dade4fe0 Big i18n commit: add "reports" from bmesh/readfile/tracking/dynapaint (and a few others), and another bunch of UI messages tweaks/fixes, as well as some BKE_report()<->BKE_reportf()... 2012-10-26 17:32:50 +00:00
0e494b74c4 style cleanup 2012-10-26 04:14:10 +00:00
492518f5e4 Fix [#32884] select by group not working when active object in more than one group.
Would have liked to rework this whole area, but it's kind of tricky, so better to first fix that bug!
2012-10-22 06:53:51 +00:00
f3ece5a108 style cleanup: trailing tabs & expand some non prefix tabs into spaces. 2012-10-21 05:46:41 +00:00
a75f11d036 Fix #32219: Inconsistent influence of Units Scale on new objects
Made it so meshes, curves, surfaces and metaballs are scaling to a grid cell size,
which makes them behave consistently now.

There're still issues to be resolved still:

- Lattice is not scaled to grid cell size yet, it uses slightly different add
  function which makes scaling a bit tricky and hacky. Would prefer to do a
  bit bigger refactor here, so it's a TODO for now.

- Cameras, speakers and other helpers are not scaling. They don't have data
  on which scale could be applied and perhaps it should be some kind of draw
  scale. Also would consider it's a TODO for now.
2012-10-19 12:53:03 +00:00
cb634b9100 Google Summer of Code project: "Smoke Simulator Improvements & Fire".
Documentation & Test blend files:
------------------
http://wiki.blender.org/index.php/User:MiikaH/GSoC-2012-Smoke-Simulator-Improvements

Credits:
------------------
Miika Hamalainen (MiikaH): Student / Main programmer

Daniel Genrich (Genscher): Mentor / Programmer of merged patches from Smoke2 branch
Google: For Google Summer of Code 2012
2012-10-10 13:18:07 +00:00
657fc4f474 code cleanup: de-duplicate enum. 2012-10-05 15:48:39 +00:00
00ce0c9aae Clean up in "add object" code:
* Get rid of ED_object_add_generic_invoke() and all invoke callbacks using it, it was doing nothing exec() callbacks would not do. In fact, its only action (setting part of common add ops properties, like loc, layers, etc.) was needed too by direct exec call, so it was done twice in case of using invoke()!
* Replace custom invoke code for metaballs by WM_menu_invoke helper (as already used by lamps).
* Add a new OBJECT_OT_empty_add op, to allow direct addition of empties of a given drawtype.
* And some general code cleanup (like trailing spaces, empty lines, ...).

Did quite a bunch of tests/verifications, but obviously could not tackle all possible scenarios... Anyway, if any, bugs should arize quite quickly (but I don’t expect any! :p ).
2012-10-05 12:59:09 +00:00
a320773b88 Some effect-less code cleanup... 2012-10-05 07:05:52 +00:00
fedc8e1722 Cycles: add "From Dupli" option for texture coordinate node. This gets the
Generated and UV coordinates from the duplicator of instance instead of the
object itself.

This was used in e.g. Big Buck Bunny for texturing instanced feathers with
a UV map on the bird. Many files changed, mainly to do some refactoring to
get rid of G.rendering global in duplilist code.
2012-10-04 21:40:39 +00:00
c574419049 fix for crashes caused by mixups when adding objects when incompatible object types were already in editmode. 2012-09-23 07:18:50 +00:00
0d5d2146eb code cleanup: make shape key api names consistent with our new convention. 2012-09-19 10:12:07 +00:00
e75f5c8208 quiet -Wmissing-prototypes warnings, and enable this warning by default for C with gcc.
helps for finding unused functions and making functions static, also did some minor code cleanup.
2012-09-15 01:52:28 +00:00
64aa98643d Fix #31753: GLSL not updated after deleting lights in multiple-scene setting 2012-08-02 15:49:20 +00:00
9c8edae7d4 fix for separate loose parts doing full depsgraph rebuild for every object split off. 2012-07-19 10:23:25 +00:00
84bf3e48c0 style cleanup: use c style comments in C code 2012-07-06 23:56:59 +00:00
201e9d815a Bugfix for [#31829] Add lamp icons missing. Patch by Philipp Oeser.
Note: If you do code cleanups, and revert make sure you revert it correct and not halfway. ;-) r47034
2012-06-14 13:54:55 +00:00
c3a7db28d3 Fix #31657: adding mesh objects did not take units into account for the grid
scale that sets the default size.
2012-05-31 16:04:03 +00:00
54b64cfd61 code cleanup: use const float and define array size 2012-05-26 22:21:56 +00:00
49b6867e0c previous commit didnt build - add back enum and note that its a copy because of linking error 2012-05-26 00:41:11 +00:00
6dcef66468 code cleanup: remove duplicate enum 2012-05-26 00:06:30 +00:00
af3e348430 code cleanup: use TRUE/FALSE rather then 1/0 for better readability, also replace do prefix with do_ for bool vars. 2012-05-19 13:28:19 +00:00
ed33320e3f Code cleanup: simplify standard GHash creation.
Added four new functions as shortcuts to creating GHashes that use the
standard ptr/str/int/pair hash and compare functions.

GHash *BLI_ghash_ptr_new(const char *info);
GHash *BLI_ghash_str_new(const char *info);
GHash *BLI_ghash_int_new(const char *info);
GHash *BLI_ghash_pair_new(const char *info);

Replaced almost all occurrences of BLI_ghash_new() with one of the
above functions.
2012-05-16 00:51:36 +00:00
3ef11693f5 Style cleanup: displist module 2012-05-07 06:58:03 +00:00
c7b20e79cd Style cleanup: rename BKE_metaball* to BKE_mball -- mball is more commonly used term in Blender 2012-05-07 06:38:41 +00:00
c91cee2bb9 code cleanup: naming - BKE_mesh_* 2012-05-05 21:28:12 +00:00
6292fb4cbd code cleanup: BKE_libblock_find_name() now takes an ID constant rather then a string. 2012-05-05 17:00:11 +00:00
1dccd4c98a code cleanup: naming - pose/armature/image
also use ..._find_name(..., name) rather then ..._find_named(..., name) --- both were used.
2012-05-05 16:03:57 +00:00
299ff91ea1 code cleanup: BKE_scene api naming.
also stop numpy from being found in /usr/include with cmake.
2012-05-05 14:33:36 +00:00
a731e13043 code cleanup: function naming, use BKE_*type* prefix. 2012-05-05 14:03:12 +00:00
084fedd03a code cleanup: brush/camera naming 2012-05-05 00:58:22 +00:00
68d9e73ecd Fix: forgot to commit these files as part of strand bugfix. 2012-05-04 12:46:51 +00:00
a5af5e8f50 style cleanup: re - http://wiki.blender.org/index.php/Dev:Doc/CodeStyle#Braces_with_Macros 2012-04-30 16:22:40 +00:00
343edf2722 style cleanup: function calls & whitespace. 2012-04-29 17:11:40 +00:00
f88cfd9168 Code and style cleanup in own modules in BKE and also mball module
- Make sure functions are named in way BKE_<object>_<action> (same way as RNA callbacks)
- Make functions which are used by mball.c only static and remove their prototypes
  from public header file.

Further cleanup is coming.
2012-04-28 16:49:00 +00:00
e2c453b5f9 style cleanup: editors / mesh & object 2012-04-28 15:42:27 +00:00
ef054e165c style cleanup: format 'for' loop macros the same as for loops, some renaming to BLI_array macros. 2012-04-28 15:14:16 +00:00
b340f930ec style cleanup: changes to brace placement / newlines - for/while/if/switch 2012-04-28 06:31:57 +00:00
b8a71efeba style cleanup: follow style guide for/with/if spacing 2012-03-24 07:52:14 +00:00
ab4a2aaf4a style cleanup: follow style guide for formatting of if/for/while loops, and else if's 2012-03-24 06:38:07 +00:00
4c3bb77012 style cleanup: spaces aroudn operators for operator definitions. 2012-03-22 07:26:09 +00:00