Commit Graph

1426 Commits

Author SHA1 Message Date
3f7f07faf5 style cleanup 2013-04-18 01:52:38 +00:00
9cceec40c4 use modified vertex coords for calculating display thickness and intersections.
internal improvement to editmesh_bvh.c

- optionally pass cage-coords as an arg, rather then calculating the coords in BKE_bmbvh_new(),
  since all callers already have coords calculated.
- de-duplicate coords creation function from knife and bmbvhm, move into own generic function: BKE_editmesh_vertexCos_get()
2013-04-18 01:20:04 +00:00
adfa7c8afa Don't use auto vectorization for MinGW-w64. It may be a source for
trouble. Also fixed a few harmless warnings.
2013-04-17 11:16:53 +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
fa919d23bc move editmesh_bvh.c into blenkernel. 2013-04-16 05:23:34 +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
da5e0ea8fe bmesh operators: use operator type-flag to specify which operations require normal-calculations and which operations require selection flushing.
eg, no need to flush selection after 'Smooth' tool, no need to recalculate normals after 'Select Similar'.
2013-04-14 06:22:34 +00:00
ba283d6c9b modify snapObjectsRayEx() to use a pointer to 'ray_dist' rather then passing the dist, this is to better support multiple calls to ray-cast where only closer distances are accepted. 2013-04-14 05:37:43 +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
ba845f6313 fix for own recent addition of transform indervidual-axis in editmode, not working if the object was rotated. 2013-04-12 02:16:44 +00:00
94c9010e24 make scene.ray_cast() behave like object.ray_cast(), add distance arg to snapObjectsRayEx(). 2013-04-11 10:17:06 +00:00
bf77ad00b3 py api:
ray cast function, very useful to be able to cast rays into the scene for scripts.

  hit_co, hit_no, success = scene.ray_cast(start_co, end_co)
2013-04-11 09:57:26 +00:00
5eb37f9e5c correction to own recent changes to exitmode using axis-matrix, fallback to old behavior for editmodes where the axis-matrix isnt set (curve, surface, lattice) 2013-04-10 23:05:35 +00:00
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
fcf137dbd7 style cleanup 2013-04-08 04:39:09 +00:00
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
fd6a962168 transform: Code cleanup
Reduce scope of a variable.
2013-04-07 14:09:27 +00:00
93ac968db3 code cleanup: include order 2013-04-05 17:56:54 +00:00
1c3c4f3954 code cleanup: use bool's for vgroup and editmode. 2013-04-05 14:58:30 +00:00
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
19dd08a482 metaballs were not scaling/rotating about their own centers when V3D_LOCAL was used. 2013-04-04 09:59:06 +00:00
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
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
2804caff4c code cleanup: use bools, (float)sin/(float)cos -> sinf/cosf, more meaningful var names. 2013-04-04 04:22:38 +00:00
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
beb4d385bb use floats for transform snapping distance comparisons 2013-04-03 07:36:37 +00:00
3f8bb2b079 remove unused GLUquadricObj in draw_manipulator_rotate() 2013-03-29 11:44:52 +00:00
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
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
b0ef03565d fix [#34698] Axis Locking works incorrect
don't do projection when constraints are used.
2013-03-26 03:36:18 +00:00
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
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
9379dcb507 code cleanup: unused defines, shadowing and unintended enum-as-variable. 2013-03-22 14:31:03 +00:00
0b40266afc revert edit from r55461, causing build error on some systems. 2013-03-21 14:46:37 +00:00
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
8655be437d code cleanup: use bool where values are true/false, for view3d and related functions. 2013-03-20 23:14:18 +00:00
3dababa7ec code cleanup: name mesh functions more consistently, also use bools for mesh args. 2013-03-17 19:55:10 +00:00
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
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
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
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
1d9b80fc3b Bug fix #34620
SHIFT+T (texture space transform) crashed in editmode. Not checking NULL pointer.
2013-03-13 15:11:45 +00:00
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
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
aaa8a13c49 code cleanup: use const events for modal and invoke operators. 2013-03-13 09:03:46 +00:00
153b63e0fd style cleanup 2013-03-12 21:46:33 +00:00
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
eefee7a25e replace sprintf -> strcpy where its not needed. 2013-03-12 12:47:57 +00:00
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
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