Commit Graph

76 Commits

Author SHA1 Message Date
8acf717b6d Fix T38471: parenting in the outliner was possible with library linked objects. 2014-02-05 13:16:46 +01:00
d900f5be55 Code cleanup: use bools where possible 2014-02-03 19:35:44 +11:00
45df9f4141 Code Cleanup: find operator once and reuse 2014-01-24 00:06:09 +11:00
4c2ba8e936 Correct error in own recent commit 2014-01-16 20:52:30 +11:00
4f87ca47a6 Compilation error fix: mismatch declaration 2014-01-16 15:05:04 +06:00
af93ebcb50 Code Cleanup: style and redundant casts 2014-01-16 19:15:53 +11:00
63caaa2b12 Code Cleanup: rename vars for detecting change to be more consistent
rename change/is_change/is_changed/modified -> changed
also use bools over int/short/char and once accidental float.
2013-11-26 06:39:14 +11:00
abb37f4152 replace RNA_property_array_length with RNA_property_array_check where the length of the array is only used to check if the property is an array or not.
(this isnt reliable since arrays can be zero length).
2013-09-16 01:35:52 +00:00
365c368b5f add back library linking warning when renaming library datablocks in the outliner, also typo corrections. 2013-09-12 22:08:56 +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
1979720d03 quiet compiler warnings. 2013-08-14 11:29:22 +00:00
135ee563e9 Fix crash happening when clearing parent in outliner modes which doesn't support this. 2013-08-13 14:46:39 +00:00
66a4077927 fix for [#36260] 2,300 Objects Makes Blender Unresponsive
- performance of outliner was low because of unoptimal data structures.
- now it uses BLI_mempool instead of custom mempool and GHash to make searches for duplicates faster.
- also fix undesired behaviour of BLI_mempool_as_arrayN

thanks to Campbell Barton and Lukas Tönne for helping me get a better fix put together.
2013-08-03 11:35:09 +00:00
793e17ef6c Remove superfluous iterations (caused by typo) and type casts in outliner
This significantly lowers the position of outliner_draw_tree_element in profiler
and partially fixes [#36260] (2,300 Objects Makes Blender Unresponsive)
2013-07-30 08:45:45 +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
32e674c2c9 fix [#35998] Crash when trying rename Driver in Outliner
remove unused script define
2013-07-04 04:57:04 +00:00
de0b017127 Cleanup outliner_dropzone code
* deduplicated a bunch of code and moved it into outliner_dropzone_find()
 * moved all the per-dropzone checks into the poll functions
 * one functional change, disable drop parenting on self & self->parent

The basic assumption: if poll() == true then outliner_dropzone_find() will return a valid TreeElement
2013-04-03 07:42:56 +00:00
aaa8a13c49 code cleanup: use const events for modal and invoke operators. 2013-03-13 09:03:46 +00:00
2ff48c019d minor edits to r55134 (recursive outliner select).
- loop over scene bases rather then looping over all objects, then looking up bases.
- shuffle checks so slow ones are last.
- rather then having own behavior for recursive select, do the regular operation,
  then apply the result recursively afterwards.
2013-03-09 15:51:36 +00:00
b2397db100 Outliner: Added recursive select/deselect (CTRL+LMB) and extend (CTRL+SHIFT+LMB) 2013-03-09 13:13:04 +00:00
ddddb7bab1 code cleanup: favor braces when blocks have mixed brace use. 2013-03-09 03:46:30 +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
adf9dffa30 set drag/drop operators as 'INTERNAL', there not useful to access from operator search. 2013-02-05 14:38:19 +00:00
518bfbb1c9 style cleanup 2013-02-02 04:58:03 +00:00
82bbf467ca Reshuffled data view for Outliner.
- The new "Main Data" option is now under the category "Blender File".
- That category also displays the Linked Library files.
  (Including allows browsing what's used from this file)

Also fixed CTRL+click on names, crashed.
2012-12-22 16:49:50 +00:00
a31cc2aeb7 Fix #33326: outliner numpad minus collapse followed by numpad plus expand did not work. 2012-11-27 20:12:00 +00:00
c91562d0ff Fix #33310: unnecessary redraw of outliner when editing materials and textures. 2012-11-26 08:52:07 +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
f3ece5a108 style cleanup: trailing tabs & expand some non prefix tabs into spaces. 2012-10-21 05:46:41 +00:00
b8267a0dfb More UI messages and BKE_reportf<->BKE_report fixes... 2012-10-18 16:25:58 +00:00
dd56cc0cdd Fix #32913: missing cycles viewport update when toggling visibility in outliner
with V and R shortcut keys.
2012-10-18 11:58:54 +00:00
d4e40b5230 fix [#32616] Changing parent does not keep transformation
add an option to apply the transform of an object when re-parenting.

the reason for this is you dont always want to apply transform because...
- your object may be driven/animated and the transformation will be lost.
- with negative scales and rotation it can end up giving odd/not-useful results.
2012-09-27 12:24:38 +00:00
232571c61a code cleanup: replace macro for BLI_rect size/center with inline functions. 2012-09-15 11:48:20 +00:00
c92ab5c3ef code cleanup: use rect size macros 2012-08-21 20:34:05 +00:00
77f47799dd code cleanup: use BLI_RCT_SIZE macro 2012-08-20 23:06:17 +00:00
3ebbfe2c40 new parameter in assign_material() to specify where material shall be assigned: object, obdata, by userpref(default) (as discussed with ideasman_42) 2012-08-12 17:12:07 +00:00
b67b73e2d8 "Fix" [#32033] In the execution result of with_automatic_weight, the difference is seen right and left.
This auto/heat vgroup creation seems to be fuzzy/unstable (each run gives a slightly different result). I have not the competences (nor time) to investigate that laplacian stuff, so for now just adding an option when parenting to an armature with envelope/heat, to mirror weights along the X axis (as it is done by default when doing it from the Weight Paint mode).
2012-07-15 12:53:16 +00:00
468ef74ed7 More spell and typo fixes (mostly visualise->visualize, grey->gray, normalise->normalize). 2012-07-03 19:09:07 +00:00
f305261f14 OUTLINER_OT_material_drop -- Drag & Drop materials onto objects in the outliner
Adds the material at materials + 1 unlike the DnD view3d one which replaces the first one
2012-06-10 22:22:26 +00:00
f885306bb8 Fix #31702: Drag and Drop parenting crashes Blender
Crash was caused by recent changes in parent drop operator which were
aimed to prevent parenting objects between different scenes (which probably
makes sense).

The problem was how it was checked if objects belongs to the same scene --
outliner tree with type ID_SCE was used for this which works pretty nice
for All Scenes outliner view. But in other view modes there is no scene
element in outliner tree which lead to some NULL pointer dereferences.

Currently resolved this by assuming that if there's no Scene parent element
in outliner tree parent and child belongs to the same scene which is active
scene. This is truth for current view modes of outliner but if it'll be
changed in the future this assumption shall be updated and re-implemented
with some smarter checks of which scene object from outliner belongs to.
2012-06-05 09:57:19 +00:00
02b927b8c4 style cleanup 2012-05-31 18:40:06 +00:00
52aad984b6 Outliner Drag & Drop fixes
OUTLINER_OT_parent_drop
 * use scene of child instead of active scene
 * poll to check if parent and child are in same scene

OUTLINER_OT_parent_clear
 * get scene from child instead of only working on active scene
 * poll to check if no parent

OUTLINER_OT_scene_drop && OBJECT_OT_make_links_scene
 * memory leak on error
 * would only link some objects on error
2012-05-29 18:12:13 +00:00
e0c2ddb886 OUTLINER_OT_scene_drop -- "Drag object to scene in Outliner" operator
Refactored the two (well, three now) other places where an object is linked to a scene into ED_object_scene_link()
2012-05-29 08:20:11 +00:00
53082c410d Outliner drag/drop parent fix -- added checks for modifiers and contraints to the poll functions
Parenting was just broken, poll would return true but nothing would happen if you dropped on modifiers or constraints

Parent clear now works the same as dropping on a non-ID_OB types but left the actual modifier/contraint instances open to allow for future expansion
2012-05-28 22:59:11 +00:00
d5b53420f6 style cleanup: outliner 2012-05-07 17:56:30 +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
e701f9b670 style cleanup: whitespace / commas 2012-04-29 15:47:02 +00:00