Commit Graph

317 Commits

Author SHA1 Message Date
a9fb183901 rename BLI_ghashIterator_notDone() -> BLI_ghashIterator_done()
was renamed fairly recently but other similar iterators not negated
	like this, would prefer to keep it as it was
2013-05-08 12:58:11 +00:00
afb4b65167 Random number generator: replace a bunch of usage of the global random number
generator with a local one. It's not thread safe and will not give repeatable
results, so in most cases it should not be used.

Also fixes #34992 where the noise texture of a displacement modifier was not
properly random in opengl animation render, because the seed got reset to a
fixed value by an unrelated function while for final render it changed each
frame.
2013-04-15 23:12:40 +00:00
be71c46b24 code cleanup: minor BMESH_TODO's, some were left in even though they were done/invalid. 2013-04-15 04:34:14 +00:00
2c47244954 code cleanup: use const char for args and replace wm_keyconfig_list_find() -> BLI_findstring() 2013-04-13 04:28:04 +00:00
09721bffc0 replace view3d_get_view_aligned_coordinate with ED_view3d_win_to_3d_int() 2013-03-26 02:37:29 +00:00
6926596174 More new data names translation (most cases should be covered now).
Also done a few cleanup here and there...
2013-03-25 08:29:06 +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
885441e758 I18n users request: add the ability to use a translated name for newly added/created objects or other datablocks.
This simply adds a third "translation type" (in addition to iface and tip), "new data", with relevant user settings flag and helper funcs/macros (and py api).

Currently implemented name translation when adding new objects, as well as modifiers and constraints, will add the others (cd layers, scenes, perhaps nodes [though I think they do not need this], etc.) later.
2013-03-20 18:42:09 +00:00
d4af049fab add option to convert grease pencil into poly line directly.
Without this, bezier curves at 12 resolution are very high detail for many tasks when converted from freehand strokes.
so add the option to convert 1:1 grease pencil points to curve polygons.

also add use_handles option to curve conversion which is used when converting beziers to poly lines.
2013-03-20 15:01:15 +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
4a01ba4ba5 ruler3d: replace ED_view3d_cursor3d_position() with lower level function view3d_get_view_aligned_coordinate() 2013-03-09 10:28:28 +00:00
ddddb7bab1 code cleanup: favor braces when blocks have mixed brace use. 2013-03-09 03:46:30 +00:00
53b7bc8f1f Change !BLI_ghashIterator_isDone to BLI_ghashIterator_notDone. It is
always used in that context so we can at least avoid reverting it twice
:p.
2013-03-06 20:55:04 +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
0f359c41ea Style tweak - missing braces 2013-02-19 10:31:29 +00:00
c524b47912 Another huge bunch of UI translation fixes, mostly reported by Leon Cheung, Sv.Lockal, Gabriel Gazzán and Satoshi Yamasaki, thanks! 2013-02-17 13:56:49 +00:00
87f8925a76 fix for typo in recent commit. 2013-01-15 22:26:46 +00:00
73c7c10c6e Bug fix #33748
Old fixes, since 2009 and before! Related to Curve object editmode:

- normals are not being drawn for hidden curves anymore
- even worse: Blender also didn't hide the extrusions or bevels for hidden curves
- outside edit mode, it shows all (as for all other modes)
- (de)select-all now works when 1st (or any) handle was hidden.
2013-01-15 15:42:12 +00:00
5e6917a18e patch [#33738] Extend Selection option unified and added to few operators
from Sebastian Nell (codemanx), with minor edits
2013-01-12 10:48:10 +00:00
75e94aba98 Code cleanup
* "ad" -> "adt": use proper var names for AnimData
* Replacing some flattened loops with the cleaner for-loop syntax
2012-12-21 06:17:20 +00:00
7c699a217a define the size of matrix args for both rows/cols. 2012-12-11 14:29:01 +00:00
c8734334a1 Style: AnimData vars should be named "adt" NOT "ad" 2012-11-22 22:58:01 +00:00
973cb29d84 style cleanup: if's on the same line. 2012-11-18 02:41:55 +00:00
2bb174cfa4 style cleanup: indentation 2012-11-09 09:33:28 +00:00
53160bd508 minor edits to mesh operators
- Rename 'mesh.select_nth' operator menu item 'Every N Number of Verts' to 'Checker Deselect',
  since its not just de-selecting verts (works on edges and faces too) and the term 'checker' gives a better description of the result.

- Rename 'mesh.select_by_number_vertices' to 'mesh.select_face_by_sides', since this is a face selection tool, which wasnt obvious from its name.

also remove dissolve by type menu since the option has been removed from the operator and was giving an error.
2012-11-01 05:07:15 +00:00
aeba4950c3 style cleanup 2012-10-27 10:42: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
f3ece5a108 style cleanup: trailing tabs & expand some non prefix tabs into spaces. 2012-10-21 05:46:41 +00:00
9f8070d047 code cleanup:
- define array sizes for functions that take vectors.
- quiet some -Wshadow warnings.
- some copy/paste error in readfile.c made it set the same particle recalc flag twice.
2012-10-20 08:02:18 +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
28c20e456f fix for many RNA definitions having soft/hard ranges swapped, make this BLI_assert() on debug builds. 2012-10-11 23:46:12 +00:00
a17e1eea23 refactor foreachScreen functions for clipping, now the projection clipping flag is passed down directly rather then converting the enum into a flag, also fix own recent crash lasso seleting in object mode with pose objects. 2012-10-10 04:03:22 +00:00
c3ca19800c refactor screen foreach functions to accept float[2] arguments rather then int pairs.
overall means less converting between float and int (and short in some cases).
2012-10-10 01:22:19 +00:00
e8872a8ea2 style cleanup: if(); 2012-10-07 09:48:59 +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
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
15ce5f95b3 joining mesh objects now keeps relative key setting of each keyblock. also joining absolute shapekeys now sorts by time. 2012-09-19 12:11:28 +00:00
0d5d2146eb code cleanup: make shape key api names consistent with our new convention. 2012-09-19 10:12:07 +00:00
5d2e4bb87e code cleanup: capitalize defines. 2012-09-06 01:31:15 +00:00
699b23ecdb fix for type mismatch with SWAP() macro. 2012-08-25 19:43:15 +00:00
9ff4fa6671 style cleanup 2012-08-04 12:30:16 +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
81a509fa40 fix error in node template and quiet warning. 2012-07-03 21:03:39 +00:00
37dc4006c7 First load of spell and typo fixes (mostly UI messages, but also one or two pieces of code using mis-spelled names). 2012-07-03 17:20:21 +00:00
00bbf5a72f Fix issue with resetting active nurb when sawing from edit mode
Issue was caused by loading editNurb into normal nurbs when saving,
this used to set active nurb to NULL.

This isn't actually needed, because active nurb would be set properly
on making editNurb and even if one accessed to active spline via PY API
when object is in object it'll be completely harmless.
2012-06-26 10:18:53 +00:00
7ed68ac4ef Fix #31909: "Make Segment" on path-curves gives wrong result
In fact fixed in easiest way -- always re-calculate knots array
on topology changes.

After some discussion with Ton we agreed on that having manually
editable knots is not intuitive and user should only define
cyclic/endpoints flags and knots would be re-calculated based
on this flags.

This means that it's unnecessary to have special logic for knots
manipulating in some topology changing tools and they could just
re-calculate knots for the whole nurb, without worrying that knots
could have been manually edited.
2012-06-24 11:27:28 +00:00
6cff0b71a7 style cleanup 2012-06-05 21:54:21 +00:00
4f90d757c7 add BLI_ghash_pop() which returns the value for a key and removes it at the same time, saves a lookup if you need to check if the item exists before removing. 2012-05-28 19:33:14 +00:00