Commit Graph

109 Commits

Author SHA1 Message Date
803697e30a Fixed editmode transform clipping for new Mirror modifier axis options. 2007-04-29 18:32:40 +00:00
c9a54805a5 === Transform ===
Fixed a bug with PET with connectivity, Mesh Face Select mode and Individual Centers.

Those three together could give negative factors, which is a big no no (this is due to some approximation in the connectivity code). Clamping the factor makes everything fine.

Bug reported by someone on BA
2007-04-14 20:56:24 +00:00
afdd54fa37 moved source and text to american spelling
* colour -> color
* centre -> center
* normalise -> normalize
* modelling -> modeling
2007-04-04 13:18:41 +00:00
796c87e869 Bugfix #6435
New option "rotate around selection" failed in editmode, when nothing was
selected.
Function calculateCenterMedian() missed that case.

Also added some zero initializing in code.
2007-03-24 11:56:10 +00:00
Ken Hughes
4e72e4ad2b Fix various gcc warning related to signed/unsigned parameters passed to
OpenGL functions.
2007-03-17 14:15:02 +00:00
4754e37539 === Transform ===
Reverting Aligorith's fix for bug Bugfix #5833 (the fix was incorrect, see bug report for details).

That means the translation part when rotating "free" bones in pose mode is still broken.
2007-02-05 18:00:03 +00:00
4d5bd6872b Bugfix #5833:
When rotating bones around the 3d-cursor in posemode with a rotated
armature, rotation was around strange points other than the cursor.

This bug has been around for quite a few releases now. Somehow, the
maths used to convert the world/global space locations to local locations
only worked on things in editmode, but not bones.
2007-02-05 01:28:14 +00:00
a1a7a65b46 == Retopo ==
Partial fix for bug #5766

* Moved the retopo call used during transforms to above the call to clip the transform (for the mirror modifier.) This stops retopo from moving a vertex across the axis.
2007-02-04 00:42:23 +00:00
d813fb3da8 Added undo push for retopo all. 2007-01-02 20:33:11 +00:00
1ad1522d10 === Transform Snap ===
==== Rotation Snap ====

Snap is no longer limited to Translation, it works in Rotation too.

There's some bugs left with rotation snap when using constraints, I'll be ironing that next.

==== Bug Fixes ====

* Fix manipulators to always use Grid.
* Fix initialization bug (took two transform call to do a correct snap init when changing between Grid and Snap)
2006-12-23 00:52:34 +00:00
88ef092876 === Transform Snap ===
(Implementing Matt's idea)

Grid and Snap are now exclusively controlled by the Control key (pun intented).

You can switch to Snap by selecting the snap option in the Transform menu (this option is only available in edit mode on a mesh. this option is per 3D view) (NOTE: There is currently no hotkey for that, anyone should feel free to add one).

When Snap is selected, holding down Ctrl during translations (grab) snaps to vertex.

All other situations which have no snapping code yet defaults to Grid.
2006-12-20 19:47:12 +00:00
c0e9d77188 Next level of Proxy support for animation: Proxy for duplicated groups.
Notes:
- Only referenced groups (from other files)
- Only 1 group (no more duplicates using same group yet)
- Only Proxy working well for Armature or Empty

Is going to be reviewed in Plumiferos team; but target is that this will
solve a major animation pipeline bottleneck :)

Usage; select group, alt+ctrl+p, pick an object you want to proxify.
2006-11-14 15:27:43 +00:00
feb210f08e Experimental feature, especially for the animation department:
THE OBJECT PROXY

Or simple said; local control of referenced data from libraries.
Having library files with references is a very common studio setup, and
Blender did do quite well in that area. Were it not that for character
setups it was impossible to use still.

This commit will enable a full rig+character to remain in the library,
and still have - under strict control - local access for animation edits.

Full log:
http://www.blender3d.org/cms/Proxy_Objects.824.0.html
2006-11-11 16:45:17 +00:00
8e97a2955b Merged Google Summer of Code sculptmode/multires/retopo tools.
From the tracker:
https://projects.blender.org/tracker/index.php?func=detail&aid=5018&group_id=9&atid=127
2006-11-06 01:08:26 +00:00
f0dcd2db75 == Transform ==
Embryon functionnality for snapping.

- Only snaps to grid on translations (grab)
- Transform constraints are supported but header display is wrong.
- Can be turned on/off in the Object/Mesh header menu under Transform Properties (tentative spot, will have to integrate better and in other object type menus too)
- Can be turned on/off during transform with ` (Back Quote, also tentative)

This is, of course, very much Work in Progress.

This implements part of the structural ideas for the transform cleanup I've been juggling around with.
2006-10-25 23:57:00 +00:00
2e7aa1dbf5 * Proportional edit mode 'random' falloff
This is another proportional edit falloff that slightly randomises the
influence. It's not strictly random, it's blended with linear falloff so that
it's a bit smoother. The nice thing is that it works with all transforms, axis
locking etc, including the special ones like to sphere, shrink/fatten/etc. It
can be used for all sorts of things like roughening surfaces. I most recently
used it to add a bit of randomness to the folds of some cloth. I
made a short demo video here: http://mke3.net/blender/etc/prop_random-h264.mov

Also included nicer icons for the falloff types.
2006-09-25 05:15:19 +00:00
Ken Hughes
7fdf88c0fe Bugfix: structure declaration in the middle of code was breaking compilation. 2006-08-23 00:42:48 +00:00
Nathan Letwory
7fd8ce8156 * Patch #4909 by Joseph Eagar (joeedh)
- this patch adds verse support for SCons, which can be enabled by
    giving WITH_BF_VERSE=1, ie. on command-line
  - this patch also adds a custom lib dir possibility. From the patch description:


 "To set a custom ../lib dir, put LCGDIR="path to lib dir, including the platform folder name!" in your user-config.py."

* Fixed win32-vc-config.py so that it links to the proper library. Reported by Brandano.
2006-08-22 13:04:07 +00:00
2ee42ac01e Huge commit: VERSE
- All code is in #ifdef ... #endif
 - Only make build system is supported and you have to add:
    export WITH_VERSE=true
   to user-def.mk file
 - Blender can share only mesh objects and bitmaps now
 - More informations can be found at wiki:
    http://mediawiki.blender.org/index.php/BlenderDev/VerseIntegrationToBlender
    http://mediawiki.blender.org/index.php/BlenderDev/VerseIntegrationToBlenderUserDoc

  I hope, that I didn't forget at anything
2006-08-20 15:22:56 +00:00
d3028ec70d * Shrink/Fatten for bevelled curves
This is a much faster and easier way to give a bevelled curve a taper, without
using taper curves. Each point on a curve now has a 'radius' value that you can
shrink and fatten using Alt S, which will influence the taper when the curve is
bevelled (either with a bevob, or with front/back turned off and a bevel dept
set). Alt S shrinks and fattens the selected points in an interactive transform,
and you can set an absolute radius for selected points with 'Set Radius' in the
curve specials menu.

See demo: http://mke3.net/blender/etc/curve_shrinkfatten-h264.mov

This can be a quick way to create revolved surfaces (eg.
http://mke3.net/blender/etc/wineglass-h264.mov ) and it would be very
interesting to use this radius value in other tools, such as a 'freehand curve'
tool that would let you draw a curve freehand, with the radius affected by pen
pressure, or even using the radius at each point to control curve guides for
particles more precisely, rather than the continous maxdist.
2006-08-13 07:37:51 +00:00
c21b1c78eb missed a call in transform editmode active pivot to calculateCenter2D, now it works as expected. 2006-07-03 09:23:08 +00:00
0e8e848588 Seperated out some functionality into 3 new functions.
EM_editselection_center
EM_editselection_normal
EM_editselection_plane
These functions are used by the manipulator to get data from an editselection. regardless of weather its a face/edge/vert.
2006-03-27 08:25:06 +00:00
75ce4ca859 Added rotate about centre for active Vert/Edge/Face in mesh editmode. also works for getting the V/E/F normal. Means we can now rotate about the last selected edge. 2006-03-27 05:28:36 +00:00
f9b1eb52ad Fix for bug #3997:
Rotating UV coordinates with snapping was image aspect ratio 'corrected'
for non square images. Only snapping for translation should be affected
by the aspect ratio.
2006-03-11 16:39:07 +00:00
e66b5e5cd5 UV Editor Tweaks:
- Set local sticky in the uv editor as default.
- Don't do live unwrap on fully selected charts or charts with no pins
  selected.
- Fixed bug with live unwrap not respecting transform cancel in some cases.
- "View Home" didn't work without an image.
- Move UV Calculation settings (cube size, cylinder radius, ..) into the scene
  toolsettings, instead of global variables
- Remove the name LSCM from the UI (and python docs on seams), and replace it
  with 'Unwrap', with upcoming ABF this didn't make sense anymore.
- Move the Old/New LSCM switch into the UV Calculation panel. New LSCM is the
  default now. Also renamed LSCM there to "Conformal".
- Made some room in the UV Calculation panel by removing the buttons to execute
  the UV calculation, only leaving the settings.

Fill Holes:

- LSCM now has an option to fill holes in the chart before unwrapping. This on
  by default, and enables two things:
  - Prevent internal overlaps (e.g. eyes, mouth) for LSCM unwrapping.
  - Allow the internal boundaries to move freely during stretch minimize.
- The possibility to switch it off is there because it is not always possible
  to define which the outer boundary is. For example with an open cylinder
  where there are two identical holes.
2006-02-05 14:12:45 +00:00
Chris Want
c8b48e70e6 Final merge of HEAD (bf-blender) into the orange branch.
Here are my notes on things to look out for as potential problem
spots:

source/blender/blenkernel/intern/displist.c:
+ is initfastshade(void) supposed to be empty? I had
to make it empty to get the merged tree to compile.

source/blender/python/api2_2x/Armature.c:
+ went with the version that had Armature_getLayers()

source/blender/python/api2_2x/Object.c
+ went with the version of Object_getPose() from bf-blender.
(#ifdef 0-ed the other version)

source/blender/python/api2_2x/Pose.[ch]
+ had problems linking due to no Pose_Init() ... copied these
two files straight from bf-blender.

source/blender/src/drawview.c:
+ view3d_panel_properties() had things shifted a few things shifted
a few pixels, otherwise, things were painless

source/blender/src/splash.jpg.c:
+ went with bf-blender version (orange is dead)

source/gameengine:
+ went with bf-blender version -- does not compile due to IMB_rect* stuff,
Ton should look into this.
2006-01-28 16:35:18 +00:00
8d05e14b0f Bug fix: #3684
When grabing a camera in camera view, the constraint center wasn't the center used for initgrabz, so it messed up a lot.
2006-01-14 20:52:39 +00:00
72d805f17d Orange: monday merger with bf-blender (loadsa bugfixes).
ALso: a bit tidying up in editaction.c and python Object.c
2005-12-19 18:56:08 +00:00
0a64b3e7c4 #3593
The user settings "auto rotate grid" or "auto scale grid" were never
implemented for new transform, apparently.
2005-12-19 11:01:44 +00:00
9633d7a241 Orange fix: previous commit from Brecht called unwrap_lscm_live_end()
without check for correct spacetype in use. :)
2005-12-04 14:37:18 +00:00
c2cff1cbcf More work on the new unwrapper code (orange branch):
- There is now a (temporary) dropdown box in the image window header for
  switching between the old an new unwrapper code. So to test the changes
  described below you need to enable the new unwrapper code.
- Pinning is now more predictable, if one uv is pinned, the others belonging
  to the same vertex are pinned also.
- Live LSCM is much faster, since the LU factorization, the most expensive
  part of the computation, is now stored and reused (was Jens' idea).
- Packing multiple uv charts is slightly improved, by doing a binary search
  over the texture width. This fixes the case where all the charts are
  packed at the bottom of the image.
- LSCM now uses an angle based formulation, and the results seem somewhat
  different (maybe slightly better?), didn't find out why yet.
2005-12-03 23:22:31 +00:00
c4a1d655ae True X-mirror mesh editing!
Set the option in EditMode, in 2nd mesh tools panel. It only works on
transform options now (grab/rot/scale), and of course assumes a near-
perfect symmetrical mesh. Mesh Object itself can be on any location
though (and rotated etc).
2005-12-01 19:04:57 +00:00
622f914776 New stuff & fixes in Blender OSA filtering.
While investigating alternative filters (Mitchell), I found two small
errors in the Gauss code, it clipped wrong and multiplied wrong, causing
settings other than filter size 1.0 to not work properly.

Took the last-minute liberty to add more filter types in Blender too.
Also wrote an extensive log about how sampling & filtering in Blender
works.

http://www.blender3d.org/cms/Samples_and_Filtering.723.0.html
2005-11-23 15:20:45 +00:00
3cd17c637a * LSCM live transform is finally here!
This is a combined effort from Jens, Ton who finished the code here on my machine, and myself putting in the little menu toggle and committing :).

Turn it on and off in the UV/Image window menu UVs -> LSCM Live Transform. It recalculates the LSCM within the transform loop when you're transforming pinned vertices, so it gives realtime feedback - a real time saver! Note: this is much more powerful than proportional edit, since it's properly calculating LSCM using the correct edge angles, etc.

I recorded a quicky demo video here: http://orange.blender.org/wp-content/themes/orange/images/media/lscm_live.mov (quicktime animation codec)
2005-11-22 15:00:32 +00:00
b0995a2a84 Mirror modifier with "do clipping" set crashed in transform when no
td->loc was set (like for crease).
2005-11-16 18:40:12 +00:00
b483454bd3 Mirror clipping bug; Martin used abs() which is for int! should be fabs(). 2005-10-30 17:32:17 +00:00
a0c1787957 Mirror cliping polishing:
- Better use of tolerance to check for elements already on seam
	- remove debug printfs
2005-10-29 15:24:24 +00:00
e766d8a781 Mirror cliping polishing:
- Work with multiple mirror modifiers
	- Take into accound elements already on the seam properly.
	- Use the proper mirror tolerance as limit
2005-10-29 15:05:23 +00:00
607777d949 *silly whistling*
See, in theory, I didn't make typos when coding.

Explanation:

iloc*loc will be negative when the sign changes between them, so we can snap if an element cross the limit.
2005-10-29 12:17:44 +00:00
bba0e61734 Bug in Ton's mirror clipping feature.
It was assuming the real half is always on the positive, which is not true all the time (the mirror modifier doesn't make that assumption).
It incorrecly snapped everything to 0 if the half is in the negative quadrant.

Fix was to do "if (td->loc[0] * td->loc[0] < 0" instead, only snapping if the sign changed.

NOTE: this is all "in theory", as scons is broken, but I'm pretty sure the bug was real and the fix is.
2005-10-29 12:12:12 +00:00
750e801683 New: Mirror Modifier now has option "Do Clipping", which prevents vertices
during Transform to go through the mirror. Note that it is *only* during
transform, and ESC restores the non-clipped positions of vertices.
2005-10-29 11:36:21 +00:00
9e19739944 Various stuff in one commit;
- Added (BKE_utildefines.h) POINTER_TO_INT(poin) and INT_TO_POINTER(int)
  defines, to help fixing issues with switch to 64 bits systems. This
  assumes that a) not more than 16GB mem is used and b) that address
  space is below the 1<<35 value. The latter has to be confirmed, but it
  seems to conform the current 64 bits generation of OSs (for mallocs).

  Needless to say; use long if you want to store pointers! This is for
  temporal fixing.

- Added editmesh version for mesh-octree lookups, not used yet.

- Fix: ESC on armature posemode restored the actions, should not happen

- Fix: If in NLA an action was 0 frame long, it caused draw error

- Fix: Click on name in Action Window now activates Bones

- Fix: "Snap to" options in Armature editmode now use X-axis mirror edit.
2005-10-22 18:47:38 +00:00
6e94b02616 Various Transform bugfixes.
- Trackball rotate was missing the NoConstraints flag
- Zooming didn't recalculate the 2D center correctly
- Zooming in transform was sending event to the 3D window even when working on UVs. (disabled when working on UVs for now, will need to send events to a 2D window handler eventually)
- In camera mode, when the selection was exactly on the camera, initgrabz was barfing, fallback to 1.0 now, which gives ok results.
2005-09-24 18:00:32 +00:00
cd9a35f1c6 Bug fix #2985
Envelope correction for moving bone-points in edit mode didn't reset on ESC
2005-09-03 12:14:59 +00:00
85efe767f0 Integration of new IK lib features in Armature Poses.
Best is to forget yesterday's commit and old docs. New docs are underway...

Here's how IK works now;

- IK chains can go all the way to the furthest parent Bone. Disregarding
  the old option "IK to Parent" and disgregarding whether a Bone has an
  offset to its parent (offsets now work for IK, so you can also make
  T-bones).
- The old "IK to Parent" option now only does what it should do: it denotes
  whether a Bone is directly connected to a Parent Bone, or not.
  In the UI and in code this option is now called "Connected".
- You can also define yourself which Bone will become the "Root" for an IK
  chain. This can be any Parent of the IK tip (where the IK constraint is).
  By default it goes all the way, unless you set a value for the new IK
  Constraint Panel option "Chain Lenght".
- "Tree IK" now is detected automatic, when multiple IK Roots are on the
  same Bone, and when there's a branched structure.
  Multiple IK's on a single chain (no branches) is still executed as usual,
  doing the IK's sequentially.
- Note: Branched structures, with _partial_ overlapping IK chains, that don't
  share the same Root will possibly disconnect branches.
- When you select a Bone with IK, it now draws a yellow dashed line to its
  Root.
- The IK options "Location Weight" and "Rotation Weight" are relative,
  in case there's a Tree IK structure. These weights cannot be set to
  zero. To animate or disable IK Targets, use the "Influence" slider.
- This new IK is backwards and upwards compatible for Blender files.
  Of course, the new features won't show in older Blender binaries! :)

Other changes & notes;

- In PoseMode, the Constraint Panel now also draws in Editing Buttons, next
  to the Bones Panel.
- IK Constraint Panel was redesigned... it's still a bit squished
- Buttons "No X DoF" is now called "Lock X". This to follow convention to
  name options positive.
- Added Undo push for Make/Clear Parent in Editmode Armature
- Use CTRL+P "Make Parent" on a single selected Bone to make it become
  connected (ALT+P had already "Disconnect").

On todo next; Visualizing & review of Bone DoF limits and stiffness
2005-08-28 12:23:06 +00:00
669c4dbecb Fixes, as reported by Basse
- Softbody Mesh didnt update when it was child of armature-posing
- Bone Stick drawing didn't draw selected in Solid + Object mode.
- WeightPaint + Subsurf (nice that it works!) didn't update on Bone
  selection
2005-08-26 17:48:46 +00:00
e12e2469c8 Bretch's patch for 2D transform. Thanks
Using new transform code to handle UV window.

With the ground work done, Transform could more easily be extended to handle IPO window now.

Tracker item: http://projects.blender.org/tracker/?func=detail&atid=127&aid=2946&group_id=9
2005-08-23 18:13:30 +00:00
a5bc9582cb Three little feats;
- Vpaint and Wpaint now use our own custom cursor, this was a very old
  plan anyway. It uses the 'knife' now, we need a good brush icon for it!
- On scaling bones in editmode, the deform distance info gets scaled now
  too when no "Envelope" draw mode was set.
- Disabled front buffer drawing of objects with CTRL+select in Edit Mode.
  Uses a regular redraw now (like for select in Object Mode btw)
2005-08-22 17:52:52 +00:00
29429d73f2 A couple of smaller fixes;
- Modifier Panel, name label for "Virtual" modifiers was too short
- On extrude Bones, "soft distance" now is always set based on length
  of the bone (also on CTRL+click, also when Envelope drawmode is not set)
- Added undo-push for "Apply Bone Envelopees to VertexGroup" in WeightPaint.
- Menu-buttons in floating panels sometimes gave drawing error
- InfoWindow buttons were always allocated & drawn, even when window was
  zero sized... waste of cpu, tsk!
2005-08-20 09:55:11 +00:00
6d60b0acfe More armature stuff;
- The "Skinnable" option for Bones now is taken into account for the
  Envelope drawmode. If not Skinnable, it also doesn't draw the soft
  deform area. Maybe bone should be hidden... dunno yet.
- Use CTRL+LMB in weightpaint mode to sample the weight in a mesh.
  Note; it returns the weight of the closest visible vertex, not of a
  Blended result.
- NKey Panel for Mesh edit now shows a menu with the VertexGroup name(s)
  of a selected Vertex, plus the Weight.

Fix:
- while scaling Bone points in editmode (Envelope drawtype), the Bone
  root scale was not copied from (or to) the parent tip. This was not
  visible (is not drawn) but deform did use it... causing weird errors.
  For those who saw this error today: just go into editmode, select all
  Bones, press Skey, enter. That fixes it :)
2005-08-19 21:37:29 +00:00