Commit Graph

272 Commits

Author SHA1 Message Date
6734936c13 RNA API: use bool's for enum itemf callbacks. 2014-01-04 18:10:01 +11:00
0d6ae3fda2 Main API: refactor naming, use BKE_main_ prefix and add main arg. 2013-12-30 13:25:27 +11:00
c46463eb3f Code Cleanup: use ELEM macro when checking object type 2013-12-09 21:20:07 +11:00
e99586fee2 Fix #37090: Blender crashes on "Make single user" option
issue was caused by id->mewid pointing to an invalid memory
after file load.

The rule here: all the tools need to reset it to NULL (or
other value they need) in the beginning.

Currently some tools are doing newid clear in the beginning
and some does it in the end. We need to clean it up so clear
only happens in the beginning.

But ideal we need some kind NewIDContext to make duplication
safe for threading.
2013-10-15 17:11:15 +00:00
7ad59c4e2c fix odd (intentional) behavior with vertex parent,
curve children of a triangle vertex parent would only display their relationship line to the first vertex. (confusing)

also added OB_TYPE_SUPPORT_PARVERT macro.
2013-09-01 22:38:41 +00:00
4c7ded98bc support for vertex parenting in object mode for object types which support it (mesh, lattice, curve, surface)
previously this had to be done one by one.

both single and triagle vertex parents can be made, selected based on distance to the verts.

Developer notes:
- looks like this was old TODO, enums existed but weren't used.
- only meshes currently support using.
- added BKE_object_as_kdtree(), may come in handy for similar cases.
2013-09-01 22:01:21 +00:00
c4a50e9aeb remove unneeded NULL checks, add one for give_matarar() return value. 2013-07-28 06:37:58 +00:00
9634f8f115 transform was flushing the selection (inline), now skip this and use the selection as-is.
flush the selection on entering editmode instead (since the selection mode can be changed with another mesh).
is other tools leave the selection incorrectly flushed, those will need to be fixed so transform works as expected.
2013-07-22 10:44:24 +00:00
397da50002 style cleanup: switch statements, include break statements within braces & indent.
also indent case's within the switch (we already did both of these almost everywhere)
2013-07-19 15:23:42 +00:00
bbfc3c6cee Fix #35992: crash using make links > animation data between empty and mesh object. 2013-07-03 20:37:09 +00:00
3181c4ecd5 Fix #35935: make links > groups, which copies group membership between objects,
would also copy object dupligroups (next item in the menu).
2013-07-03 17:16:24 +00:00
d6c14ed855 Fix #35964: viewport render not updating with linking materials with ctrl+L. 2013-07-02 17:21:40 +00:00
24e8f2f4ce fix for crash linking fonts to other objects with linked obdata (link, undo would crash). 2013-06-28 18:39:39 +00:00
a6b505ef0b style cleanup 2013-06-06 06:02:46 +00:00
902976e012 Fix #35378: Shape Key Animation Data still linked when creating full copy of scene
Two issues were found:

- Mesh/Curve/Lattice kay blocks weren't copying their actions
  when making object data local. This lead to object data using
  diffrent AnimData structures which were using the same action.

- Copying actions shall happen after object object data was
  localized. This is so because otherwise we'll copy actions
  for original AnimData, not for copied one.

Reviewed by Joshua, thanks!
2013-06-03 12:28:46 +00:00
6f8c29ab0b fix for 2 errors introduced since release
- shape key NULL pointer dereference.
- use uninitialized variable for bmesh free.

also update credits and merge dissolve flag assignment.
2013-05-09 07:02:51 +00:00
c8cf9415de Fix #35149: solidify modifier + vertex parent not working after going in and out
of editmode on the child object.

Problem was that the object custom data mask was not taken into account when
rebuilding the derivedmesh in some cases, which is needed for the derivedmesh
to contain the mapping back to the original vertices. Now this data mask is
used for any derivedmesh build that will be cached.

Also problematic was that the datamask for the active object was applied to
all objects in the scene, which caused the parent object to be recalculated
when it didn't need to be. Now this datamask is only used for the active object.
2013-05-01 14:34:12 +00:00
ed68497700 style cleanup 2013-04-25 16:35:57 +00:00
2043d801e8 Fix #34806: rigid body world settings were not copied with a full scene copy.
Now copying a scene will also duplicate groups that consist entirely of objects
that are duplicated with the scene. The rigid body world will then also pointers
to these new groups.
2013-04-24 23:09:25 +00:00
4df0c46f83 Make freestyle use local Main for temporary objects
This means main database is no longer pollutes with
temporary scene and objects needed for freestyle
render.

Actually, there're few of separated temporary mains
now. Ideally it's better to use single one, but it's
not so much trivial to pass it to all classes. Not
so big deal actually.

Required some changes to blender kernel, to make it
possible to add object to a given main, also to
check on mesh materials for objects in given main.
This is all straightforward changes.

As an additional, solved issue with main database
being infinitely polluted with text blocks created
by create_lineset_handler function.

This fixes:
- #35003: Freestyle crashes if user expands objects in FRS1_Scene
- #35012: ctrl+f12 rendering crashes when using Freestyle
2013-04-18 08:58:21 +00:00
37e73aa368 code cleanup: use BKE naming conventions for functions in BKE_editmesh.h and BKE_editmesh_bvh.h 2013-04-16 05:59:48 +00:00
456f3b318a code cleanup: minor changes, clang checker option for exact size matches and use vector functions. 2013-04-14 12:01:12 +00:00
6da961775f code cleanup: rename BKE_tessmesh -> BKE_editmesh, rename EditDerivedBMesh.tc -> em. ('tc' is odd name which isn't used elsewhere). 2013-04-13 20:31:52 +00:00
3ad13869fe Fix #34862: some operators like mesh separate or object clear parent were not
showing shortcuts in menus, now it shows them in the submenu.
2013-04-05 00:53:37 +00:00
d407aeecc7 code cleanup: use more (blender) conventional naming for group functions.
also change dump_rna2xml.py to dump bpy.data by default.
2013-04-03 11:28:42 +00:00
e7c15beaf6 code cleanup: use booleans for mesh and selection code. 2013-03-19 23:17:44 +00:00
aaa8a13c49 code cleanup: use const events for modal and invoke operators. 2013-03-13 09:03:46 +00:00
8560b141eb Fix for [#34598] Modifier-Icon in Outliner does not appear
* OBJECT_OT_make_links_scene did only trigger an 3D View update which was insufficient for Outliner (modifiers for example) and also some parts inside the Properties Editor (Mesh Data, Material Data).
2013-03-11 19:50:11 +00:00
7d585ed475 patch [#34103] check_for_dupid.patch
from Lawrence D'Oliveiro (ldo)

- more comments
- more uses of bool type
- define symbol for length of in_use array in check_for_dupid
2013-03-10 05:46:24 +00:00
ddddb7bab1 code cleanup: favor braces when blocks have mixed brace use. 2013-03-09 03:46:30 +00:00
b1543f07bf Another bunch of UI translation fixes, thanks to Leon Cheung, Gabriel Gazzán and S. Lockal for spotting them! 2013-02-24 15:40:28 +00:00
20220d47e3 Dependency Graph: some refactoring which should have no user visible impact
besides performance in some cases.

* DAG_scene_sort is now removed and replaced by DAG_relations_tag_update in
  most cases. This will clear the dependency graph, and only rebuild it right
  before it's needed again when the scene is re-evaluated.

  This is done because DAG_scene_sort is slow when called many times from
  python operators. Further the scene argument is not needed because most
  operations can potentially affect more than the current scene.

* DAG_scene_relations_update will now rebuild the dependency graph if it's not
  there yet, and DAG_scene_relations_rebuild will force a rebuild for the rare
  cases that need it.

* Remove various places where ob->recalc was set manually. This should go
  through DAG_id_tag_update() in nearly all cases instead since this is now
  a fast operation. Also removed DAG_ids_flush_update that goes along with
  such manual tagging of ob->recalc.
2013-02-21 19:33:04 +00:00
98b9ed185f Translate "Set Parent To" menu (ctrl-P), reported on bf-translations ML by Satoshi Yamasaki, thanks! 2013-02-15 08:31:00 +00:00
7dbce1930a Reports #34042 and #33749
Tweak for new option for Relative Bone parenting
(which transforms child object based on rest pose, so you can change bones 
in editmode to define pivot)

In the original commit it was made default, but that was too invisble for
users. Now it's an option in the Make Parent menu to choose. Communicates
a new feature better.
2013-02-12 14:42:46 +00:00
adf9dffa30 set drag/drop operators as 'INTERNAL', there not useful to access from operator search. 2013-02-05 14:38:19 +00:00
Dalai Felinto
236bc27484 Operators name "cleanup"
The operator names all show up in the Search button. As such is nicer if they
can all have the main words capitalized.

e.g. "Snap strips" should be "Snap Strips"
     "Copy to clipboard" should be "Copy to Clipboard"

This was done with a mix of bash tools, regex, and manual work because I'm too rushed into regex :)

+ fix bge stereo eye separation tooltip
2013-01-27 07:23:58 +00:00
c84383301c 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
freed.

Now don't free base in BKE_scene_base_remove() and rename it to
BKE_scene_base_unlink().
2013-01-26 17:38:45 +00:00
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
ba14beb000 Code cleanup: add usual 'BKE_' prefix to 'public' constraint functions from blenkernel... 2012-12-23 11:31:15 +00:00
767bfba808 cmake was missing some header files. 2012-12-04 14:43:42 +00:00
b43c022373 Move to layer: remove the OK button and make it apply immediately like it did
before, is much nicer workflow. Now only if global undo is disabled will the
OK button show.

This is also a more generic fix for #26891 that solves other operators that
were also broken with global undo disabled.
2012-11-27 16:02:15 +00:00
c91562d0ff Fix #33310: unnecessary redraw of outliner when editing materials and textures. 2012-11-26 08:52:07 +00:00
f579aea076 code cleanup: use ptrdiff_t when comparing pointers and tag event as an unused arg to move_to_layer_invoke() 2012-11-13 15:46:55 +00:00
37cc2b4fdc Bugfix #26891
Recoded the move-to-layer popup to wait for execution of operator until you 
press Enter or OK button.
That excludes undo/redo, which makes it faster for many too.

(note the menu is all hotkey driven, so it's MKEY, <number>, Enter)

Also fixed: missing MEM_free in this popup type.
2012-11-13 14:34:36 +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
1767b65846 style cleanup: also rename bmesh_decimate.c --> bmesh_decimate_collapse.c 2012-10-23 03:38:26 +00:00
f3ece5a108 style cleanup: trailing tabs & expand some non prefix tabs into spaces. 2012-10-21 05:46:41 +00:00
0093ea2a79 safety NULL check for r51327, don't assume ED_object_modifier_add() succeeds. 2012-10-15 03:56:01 +00:00
04f063de84 Parenting an object to a deformer (armature/curve/lattice) will now attempt to
check if the object is already parented to said deformer before trying to add a
new modifier

This should help reduce the number of cases where users inadvertantly end up
creating multiple deform modifiers pointing to the same object, which has been
known to be a cause of "double-transform" artifacts.

Note that this is only able to detect these cases by checking if the parent
object is selected, so this will only really work for the Ctrl-P shortcut where
you have to select both objects first. However, it shouldn't be a problem either
in the Outliner (drag and drop), as the object probably won't be a child of its
parent already if you're doing this.
2012-10-15 03:16:38 +00:00