Commit Graph

392 Commits

Author SHA1 Message Date
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
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
9eea6c7057 improved tooltips even more (as discussed in IRC) 2013-04-13 09:32:27 +00:00
f181952a28 improved tooltips 2013-04-13 09:27:03 +00:00
790374d07d code cleanup: rename editmode functions so we have ED_object_editmode_load/enter/exit 2013-03-21 14:18:17 +00:00
401fdf5065 py api: add Object.update_from_editmode(),
Useful for python exporters to avoid toggling editmode on export, moved into own function ED_object_editmode_load(obedit).
2013-03-21 14:12:04 +00:00
aaa8a13c49 code cleanup: use const events for modal and invoke operators. 2013-03-13 09:03:46 +00:00
c36f20a7d2 style cleanup 2013-03-08 04:00:06 +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
098e4234b1 minor change to own recent commit with transform fcurve centers and some style edits and typo corrections. 2013-02-19 02:30:02 +00:00
5ba0eb0ae5 Fix some popups being too small on retina display, among them the new image dialog. 2013-02-18 15:08:27 +00:00
2e822e30b1 add collision masks to copy-game-physics settings. (another GGJ missing feature :) ) 2013-01-28 06:56:47 +00:00
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
ba14beb000 Code cleanup: add usual 'BKE_' prefix to 'public' constraint functions from blenkernel... 2012-12-23 11:31:15 +00:00
2a5cabb039 code cleanup and minor changes
- use DummyRNA_NULL_items to replace empty enums.
- replace calloc with malloc in copy_dverts since its copied over after.
- add wmGesture->userdata, so operators that use gestures have somewhere to store their own data (not used yet).
2012-12-22 01:08:42 +00:00
95225cf110 Bug fix, IRC report.
With 2 windows, 2 scenes, linked objects:
- enter editmode in 1 window.
- the other window allowed to enter editmode too.
- and crash happened on exit editmode.

Since editmode is in Context (scene->obedit) a bad conflict arises.

New function BKE_object_is_in_editmode() returns this info outside of
context. Note I didn't use BMEdit_FromObject() because of the assert().

NOTE: contextual storage of editmode could need rework... five places:
- ob->mode / ob->restore_mode
- scene->object
- CTX_data_edit_object()
- BKE_object_is_in_editmode()
- view3d mode handling menu
2012-12-17 14:51:06 +00:00
f68b550587 Fix #33241: can't exit edit mode when object gets hidden via animation. 2012-11-21 03:33:34 +00:00
5c6f6301b0 Image thread safe improvements
This commit makes BKE_image_acquire_ibuf referencing result, which means once
some area requested for image buffer, it'll be guaranteed this buffer wouldn't
be freed by image signal.

To de-reference buffer BKE_image_release_ibuf should now always be used.

To make referencing working correct we can not rely on result of
image_get_ibuf_threadsafe called outside from thread lock. This is so because
we need to guarantee getting image buffer from list of loaded buffers and it's
referencing happens atomic. Without lock here it is possible that between call
of image_get_ibuf_threadsafe and referencing the buffer IMA_SIGNAL_FREE would
be called. Image signal handling too is blocking now to prevent such a
situation.

Threads are locking by spinlock, which are faster than mutexes. There were some
slowdown reports in the past about render slowdown when using OSX on Xeon CPU.
It shouldn't happen with spin locks, but more tests on different hardware would
be really welcome. So far can not see speed regressions on own computers.

This commit also removes BKE_image_get_ibuf, because it was not so intuitive
when get_ibuf and acquire_ibuf should be used.

Thanks to Ton and Brecht for discussion/review :)
2012-11-15 15:59:58 +00:00
f3ece5a108 style cleanup: trailing tabs & expand some non prefix tabs into spaces. 2012-10-21 05:46:41 +00:00
872cc0c4c0 Kind of cleanup of "menu strings": always have a space between the entry's label and value (these strings are a nightmare to handle in RTL languages like arabic or persian, but a bit less of a nightmare this way ;) ). 2012-10-04 13:59:14 +00:00
c1abde5935 Fix #32667: Curve softbodies doesn't render animation (cycles)
Issue was caused by cycles being duplicated curve objects before converting
them to mesh. This duplication will loose pointcache which resulted in object
not being properly deformed.
2012-09-27 14:37:20 +00:00
d3737de8c2 fix for a strange linking error where set_property() in source/blender/blenkernel/intern/property.c would get mixed up with an X11 function of the same name. it crashed blender loading on my system.
Give functions in property.c more unique names.
2012-09-18 04:35:30 +00:00
27b4b45543 utility functions: BLI_findptr, BLI_rfindptr --- use for finding an item in a linked list by a pointer. 2012-08-18 16:16:13 +00:00
cfb7aee017 style cleanup 2012-07-07 22:51:57 +00:00
84bf3e48c0 style cleanup: use c style comments in C code 2012-07-06 23:56:59 +00:00
15cb064e1b style cleanup 2012-06-25 07:24:48 +00:00
bdfcc5c619 Fix #31825: 3D View Editor Header > Object > Game > Copy Properties affecting other commands.
Mark property to be copied/moved as SKIP_SAVE. That was giving the issues.
2012-06-18 14:44:16 +00:00
29e5f72395 Interface:
* Rename "Clear Game Property" to "Rename Game Properties", because the operator deletes all game properties from all selected object(s), not only one.

This fixes [#31828], patch by Philipp Oeser.
2012-06-14 14:02:15 +00:00
6cff0b71a7 style cleanup 2012-06-05 21:54:21 +00:00
d4c7f2d53d clear active object when hiding unselected objects too. 2012-05-30 06:37:40 +00:00
857dedbc58 style cleanup 2012-05-27 00:36:50 +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
d20c129a9c style cleanup: whitespace/operators 2012-05-09 09:24:15 +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
5d02292d3c Bugfixes for Motion Path drawing/updating in light of the recent changes:
* Added proper "update" operators in place of the abuse of the calculate
operators, so now the display ranges won't get overwritten everytime (with the
default values) you go to update the paths.

* Display range settings in properties editor now actually work. Before, the "In
Range" mode only displayed the entire paths.
2012-05-06 04:18:13 +00:00
c91cee2bb9 code cleanup: naming - BKE_mesh_* 2012-05-05 21:28:12 +00:00
f3230c7897 Second part of fix for [#31157]: Some (actually, 172) operators have no tooltip.
About 30 undocumented ops remaining...
2012-05-05 17:10:51 +00:00
34b18fcbc1 code cleanup: BKE_ naming, also make bpy.data.images.load() always load a new image. (not use existing one) 2012-05-05 14:52:04 +00:00
a731e13043 code cleanup: function naming, use BKE_*type* prefix. 2012-05-05 14:03:12 +00:00
657e62c912 code cleanup: tag unused vars 2012-05-01 18:57:32 +00:00
ffc9fcb1a1 Motion Paths GUI Cleanup
This commit refactors the way that the Motion Paths GUI works. The key problems
this tries to address are:
1) Mode error - Confusion about whether we're dealing with the Object or Pose
level Motion Paths panel
2) Display settings vs Baking Settings

In line with the original design intentions for the 2.5/6 Properties Editor,
I've now split out the actual baking-related settings away from the Properties
Editor:
* Now, when clicking "Calculate Paths" from the toolbar, you'll be prompted with
a dialog to select the start/end frames (and for bones, whether to bake from
heads or tails). This is less confusing than relying on firstly setting the
range via the display range settings (and baking using that), since many people
apparently only used the "around current" mode, and were confused why things
weren't working

* Added a display of the frame ranges of the current baked Motion Path on the
active Object/Bone. This makes it clearer/easier to debug if the path suddenly
starts disappearing after a certain frame.

* Replaced Calculate/Clear Paths in the panels with a single "Update" button if
there's already a baked Motion Path.

Hopefully these changes (in combination with some of the other bugfixes) will
make it more obvious how everything works.
2012-05-01 16:19:13 +00:00
75a468f61e Comment fixes - code for Object Motion Paths still referred to Bones 2012-05-01 13:51:50 +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
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
9caab2e265 code cleanup: replace some long ELEM7 checks with macro OB_TYPE_SUPPORT_EDITMODE() 2012-04-28 10:33:32 +00:00
b340f930ec style cleanup: changes to brace placement / newlines - for/while/if/switch 2012-04-28 06:31:57 +00:00
1652e459b6 Small fix for r45256, AKEY (de)selection not working.
Added call to BM_mesh_select_mode_flush on entering edit mode.
2012-03-29 23:14:09 +00:00
a173508f49 converting a mesh to an undo mesh now skips using bmesh operator. 2012-03-29 03:06:42 +00:00