Commit Graph

1813 Commits

Author SHA1 Message Date
Campbell Barton 0e1891648e fix for own mistake in recent adjustments to transform, local without individual-origin wasn't working. 2013-04-08 08:43:16 +00:00
Campbell Barton fcf137dbd7 style cleanup 2013-04-08 04:39:09 +00:00
Sergej Reich 42e8f3e889 rigidbody: Fix/workaround for transforming rigid bodies with parents
Since we use the rigid body transform when transforming rigid bodies
things like parents and constraints add an offset because rigid body
transforms are in global space.

Now we just don't take rigid body transform into account on simulation
start frame so there are no problems when doing the initial setup.

The problem still exists when simulation is running of course.
To properly fix this we'd have to solve parenting and constratins while
taking rigid bodies into account before and after transform.
We'll have to see if it's really needed, would like to avoid it though.
2013-04-07 14:09:29 +00:00
Sergej Reich fd6a962168 transform: Code cleanup
Reduce scope of a variable.
2013-04-07 14:09:27 +00:00
Campbell Barton 93ac968db3 code cleanup: include order 2013-04-05 17:56:54 +00:00
Campbell Barton 1c3c4f3954 code cleanup: use bool's for vgroup and editmode. 2013-04-05 14:58:30 +00:00
Campbell Barton de50c12dba skip unneeded calculations when calling calculateTransformCenter()
which gets called whenever the view is rotated when rotate-around-selected preference is enabled.
2013-04-04 21:40:39 +00:00
Campbell Barton 19dd08a482 metaballs were not scaling/rotating about their own centers when V3D_LOCAL was used. 2013-04-04 09:59:06 +00:00
Campbell Barton ef1af9f9c4 fix [#34802] Individual Transformation Confusing in Edit Mode
Individual transformation now works in editmode mesh faces/edge, armature bones and metaballs.
2013-04-04 09:20:46 +00:00
Campbell Barton 82636ab0fb improved method of getting the tangent axis from a bmesh triangle,
rather then getting the longest edge, get the edge which which is most different from the 2 others ends up giving more useful results: for an isosceles triangle it returns the base weather its longer or shorter then the other sides.
2013-04-04 08:47:07 +00:00
Campbell Barton 2804caff4c code cleanup: use bools, (float)sin/(float)cos -> sinf/cosf, more meaningful var names. 2013-04-04 04:22:38 +00:00
Campbell Barton 9a901691ee pass snap arguments so the ruler doesn't have to temp overwrite scene vars.
also expose snapObjectsRayEx() for more convenient ray-casting about the scene.
2013-04-03 09:48:21 +00:00
Campbell Barton beb4d385bb use floats for transform snapping distance comparisons 2013-04-03 07:36:37 +00:00
Campbell Barton 3f8bb2b079 remove unused GLUquadricObj in draw_manipulator_rotate() 2013-03-29 11:44:52 +00:00
Bastien Montagne 5262fcd4d3 I18n: various fixing.
* Reflect changes stated in prev commit about contexts in py code.

* Add a "Plural" context, to handle cases where english does not mark plural at all (e.g. shorten labels of only one adjective). Not so happy with that, but can't see any other way to do it, for now.

* Abuse "ID_CURVE" context for all falloff curves (this should solve some confusion issues, e.g. "sharp"...).
2013-03-28 15:41:43 +00:00
Ton Roosendaal 6e076c4164 Better fix for "To Sphere" crashing in Image editor. It appeared to be in use for
mask/uv modes.
2013-03-26 10:28:19 +00:00
Campbell Barton b0ef03565d fix [#34698] Axis Locking works incorrect
don't do projection when constraints are used.
2013-03-26 03:36:18 +00:00
Ton Roosendaal c347b48784 Bug report, IRC:
Operator "To Sphere" should only be allowed to be called in 3d view.
Crashed in Image editor.
2013-03-25 18:41:28 +00:00
Bastien Montagne 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
Campbell Barton 9379dcb507 code cleanup: unused defines, shadowing and unintended enum-as-variable. 2013-03-22 14:31:03 +00:00
Campbell Barton 0b40266afc revert edit from r55461, causing build error on some systems. 2013-03-21 14:46:37 +00:00
Joshua Leung 67e54eb819 Bugfix: Transform autokey warning indicator text was getting clipped prematurely
After quite some time debugging going back through previous commits for this
feature and digging around the internals of the blenfont,I finally found the
culprit. It turns out that there was just a single line missing between
BLF_width_default() and BLF_width_and_height_default(), which caused the widths
returned to understimate the space required or so, causing text clipping. The
offending line probably correcting for different DPI scaling values.
2013-03-21 11:14:53 +00:00
Campbell Barton 8655be437d code cleanup: use bool where values are true/false, for view3d and related functions. 2013-03-20 23:14:18 +00:00
Campbell Barton 3dababa7ec code cleanup: name mesh functions more consistently, also use bools for mesh args. 2013-03-17 19:55:10 +00:00
Campbell Barton baf3bb37a9 - ghost-sdl builds again.
- without python builds without warnings.
- replace MAXFLOAT -> FLT_MAX in some areas, MAXFLOAT overflows (lager then float range).
- add cmake option WITH_GCC_MUDFLAP to enable libmudflap use.
2013-03-16 20:49:46 +00:00
Antonis Ryakiotakis 9d060b0333 Add missing operators from paint modes:
All modes:
-----------
Shift-S sets smooth stroke mode

Texture Paint/Vertex Paint:
----------------------------
R springs brush rotation control menu
Ctrl-F sets brush user rotation

Vertex paint mode was getting transform events with R, made sure no
transform events are handled for paint modes.
2013-03-15 10:45:43 +00:00
Campbell Barton ffc8ecc587 use BLI_strncpy_rlen() rather then BLI_snprintf() when no formatting is needed.
also replace sprintf with strcpy when no formatting is done.
2013-03-14 10:39:18 +00:00
Bastien Montagne 6d070e47c1 Fix [#34621] I18n Switch Issue When Gimbal and Rotation Manipulator On.
Real issue was that transform manipulators' code was calling TRANSFORM_OT_trackball with data (PointerRNA) from VIEW3D_OT_manipulator. That op has constraints props, while trackball has not. This created some kind of "ghost" properties, that showed up in redo panel.

Why this only segfaults in BLF_pgettext in 32bit builds remains a deep mystery (currently dusting out my 32 vbox to try to understand it...). BLF_pgettext is supposed to be pretty secure. :/
2013-03-13 15:27:54 +00:00
Ton Roosendaal 1d9b80fc3b Bug fix #34620
SHIFT+T (texture space transform) crashed in editmode. Not checking NULL pointer.
2013-03-13 15:11:45 +00:00
Bastien Montagne ad9e675ee1 Fix [#34628] Shift-V (vertex slide) does no longer show "vertex slide:" for the user.
Own stupid mistake in r55214 refactor.
2013-03-13 14:56:17 +00:00
Bastien Montagne e89cf301cb Some small fixes found while investigating on bug [#34621] I18n Switch Issue When Gimbal and Rotation Manipulator On 2013-03-13 12:12:13 +00:00
Campbell Barton aaa8a13c49 code cleanup: use const events for modal and invoke operators. 2013-03-13 09:03:46 +00:00
Campbell Barton 153b63e0fd style cleanup 2013-03-12 21:46:33 +00:00
Bastien Montagne b3ff0d6d2a Temp fix for stupid -Wformat-security issue.
Also makes more use of BLI_snprintf, and makes more consistent code acrross all "header strings" generation in transform.c.
2013-03-12 13:18:39 +00:00
Campbell Barton eefee7a25e replace sprintf -> strcpy where its not needed. 2013-03-12 12:47:57 +00:00
Campbell Barton 2433404e4b add inline function mul_project_m4_v3_zfac() to get the z-depth value from a vector & mat4x4 2013-03-09 15:39:24 +00:00
Campbell Barton abd1748e48 code cleanup: move runtime var zfac out of RegionView3D. rename initgrabz() -> ED_view3d_calc_zfac() and have it return the zfac to use. 2013-03-09 11:40:42 +00:00
Campbell Barton ddddb7bab1 code cleanup: favor braces when blocks have mixed brace use. 2013-03-09 03:46:30 +00:00
Campbell Barton d695d7c2ff code cleanup: use bool's for snapping functions. 2013-03-08 18:28:26 +00:00
Campbell Barton f43153dd93 avoid floating point exceptions in snapObjects(), was attempting to scale up FLT_MAX. 2013-03-08 15:10:57 +00:00
Campbell Barton c36f20a7d2 style cleanup 2013-03-08 04:00:06 +00:00
Campbell Barton dfa8540cdf use bool for rna funcs. 2013-03-07 02:44:55 +00:00
Campbell Barton 0d5b028d43 patch [#34103] use boolean in path functions and add comments.
path_util_1.patch from Lawrence D'Oliveiro (ldo)
2013-03-04 19:27:51 +00:00
Campbell Barton 9b5edeb881 code cleanup: view3d_clipping_test was making a vector copy for no reason. 2013-03-04 07:15:09 +00:00
Campbell Barton 4f4e45540d fix for harmless glitch rotating the camera in camera mode, having the center point so close to the viewpoint caused the helper line to erratically move about because of float precision. 2013-02-28 11:29:27 +00:00
Campbell Barton 2afca3e317 fix [#34426] Manipulator handles drawn incorrectly by depth
original patch by Philipp Oeser (lichtwerk) with own changes.
2013-02-28 06:12:06 +00:00
Campbell Barton 98f7f73644 fix [#34415] Edge slide results in segmentation fault on certain mesh 2013-02-26 03:20:10 +00:00
Sergej Reich 8d1f84d4b6 rigidbody: Don't set object to rigid body on dummy transform
Fixes [#34420] rigid objects not resetting original properly after running a simulation.
2013-02-25 22:36:50 +00:00
Bastien Montagne 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
Brecht Van Lommel 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