Commit Graph

226 Commits

Author SHA1 Message Date
Martin Poirier
2c4fd39142 Todo [#5743] Rotate dosnt work at high zoom
Fixed by only conditionally resetting the start of the triangle used to calculate the angle to when an angle is actually measured (so really small angle don't result in continuous deltas of 0 degree).

However, the smallest rotation angle is still limited by the precision of the acos function (here: 0.02 degrees, 0.02 / 30 with Shift pressed).
2008-05-13 13:20:47 +00:00
Chris Want
5d0a207ecb Patch from GSR that a) fixes a whole bunch of GPL/BL license
blocks that were previously missed; and b) greatly increase my
ohloh stats!
2008-04-16 22:40:48 +00:00
Campbell Barton
83c5401896 replace magic numbers with constants for (G.vd->persp), view naming was also using persp as a flag which worked but isnt correct. 2008-04-16 08:48:49 +00:00
Geoffrey Bantle
209ff9e663 -> Bevel transform crash fix
Transinfo transform event callback is not cleared once
a transform event is over, this casued handleEventBevel
to dereference a null pointer. Added a check for this,
but it seems the callbacks should be set to NULL when
transform loop is done?
2008-04-13 05:51:13 +00:00
Brecht Van Lommel
1fe5302cce Point Cache Refactoring
=======================

Caching and Baking:
- The point cache is now cleared on DAG_object_flush_update(), and not cleared for time dependency graph updates.
- There is now a Bake button instead of Protect. Also cache start and end frames were added to softbody and particles.
- The cloth autoprotect feature was removed.
- The Ctrl+B menu now also bakes cloth and particles next to softbody and fluids. Additionally there are now frree bake and free cache menu entries.
- The point cache api has been changed. There is now a PTCacheID struct for each point cache type that can be filled and then used to call the point cache functions.
- PointCache struct was added to DNA and is automatically allocated for each physics type.
- Soft body now supports Bake Editing just like cloth.
- Tried to make the systems deal consistently with time ipo's and offsets. Still not sure it all works correct, but too complicated to solve completely now.

Library Linking:
- Added some more warnings to prevent editing settings on library linked objects.
- Linked objects now read from the cache located next to the original library file, and never write to it. This restores old behavior for softbodies. For local simulation the mesh and not the object should be linked.
- Dupligroups and proxies can't create local point caches at the moment, how to implement that I'm not sure. We probably need a proxy point cache for that to work (ugh).

Physics UI:
- Renamed deflection panel to collision for consistency and reorganized the buttons. Also removed some softbody collision buttons from the softbody panel that were duplicated in this panel for cloth.
- Tweaked field panel buttons to not jump around when changing options.
- Tabbing e.g. Soft Body Collision into the Soft Body panel, it now only shows Collision to make the panel names readable.
- I tried to make enabled/disabling physics more consistent, since all three system did things different. Now the two modifier buttons to enable the modifier for the viewport and rendering are also duplicated in the physics panels. Toggling the Soft Body and Cloth buttons now both remove their modifiers.
- Fixed modifier error drawing glitch.

Particles:
- Particles are now recalculated more often than before. Previously it did partial updates based on the changes, but that doesn't work well with DAG_object_flush_update() ..
- Fixed memory leak loading keyed particle system. Now keys are not written to file anymore but always created after loading.
- Make particle threads work with autothreads.

Continue Physics:
- The timeline play now has a Continue Physics option in the playback menu, which keeps the simulations going without writing them to the cache.
- This doesn't always work that well, some changes are not immediately updated, but this can be improved later. Still it's fun to get a feel for the physics.

Todo:
- Point cache can get out of sync with and undo and changing a file without saving it.
- Change the point cache file format to store a version (so old point cache files can be either converted or at least ignored), and to do correct endian conversion.
- Menu item and/or buttons for Ctrl+B.
- A system("rm ..") was changed to remove() since the former is very slow for clearing point caches. These system() calls were already giving trouble in a bug in the tracker, but really most use of this system("") should be changed and tested.
- The Soft Body Collision and Clot Collision panel titles don't mention there's point cache settings there too, doing that makes them unreadable with the default panel setup.. but may need to make the names longer anyway.
2008-04-10 11:39:20 +00:00
Joshua Leung
bc518579a6 Fixed compiler warnings. (unused vars) 2008-03-27 05:12:14 +00:00
Jean-Luc Peurière
32b5138e64 update to trunk r14199 2008-03-21 17:00:40 +00:00
Brecht Van Lommel
cdc74b9081 Bugfix: scaling in posemode didn't translate bones properly. 2008-03-19 15:50:50 +00:00
Martin Poirier
ade184e819 [#8586] 2.46 RC1 - Soft falloff problem
Manipulator event handler was out of sync with transform event handler.

The real hotkeys to increase/decrease the area of influence are Alt PAD+ / PAD- and PageUp / PageDown (has been that way in non-manipulator transform for years now).
2008-03-17 15:46:07 +00:00
Martin Poirier
6a2e538d98 == Align ==
Use pupmenu menu to select align orientation. Faster workflow than always having to change the current transform orientation beforehand.
2008-03-16 16:00:00 +00:00
Jean-Luc Peurière
a68a7f42b0 resolved conflict state with HEAD r14096
blenderbuttons still bad

not let this compile
2008-03-13 23:54:02 +00:00
Martin Poirier
cbfbe53ebe == Align to Transform Orientation ==
New rotation alignement fonction

Rotates objects/Pose bones to match the selected transform orientation.

Can be used to align to view, active object (normal) and custom transform orientations.

Accessible in the Object -> Transform submenu and through the hotkey Ctrl-Alt-A (which was previously a fall through for Apply but only Ctrl-A and Ctrl-Shift-A did anything special).

Can be eventually made to work in edit mode (not too hard).
2008-03-10 00:27:17 +00:00
Joshua Leung
ac750cf7a2 * Numeric input now works better for TimeSlide
* Removed a compiler warning
2008-03-09 03:41:13 +00:00
Joshua Leung
19ec73c908 Bugfix:
Time-Slide transform tool in the Action Editor now works as well as it did before the Action-Keys transform refactor. However, numeric input is now broken as a side-effect of this.
2008-03-08 11:08:24 +00:00
Geoffrey Bantle
e03ab146ae -> Bevel tools and Bmesh kernel
The following is a commit of Levi Schooley's bevel code and 
the bmesh library it depends on. The current editmode bevel has 
been replaced with a new per edge bevel function. Vertex beveling is 
also availible.

To set weights for the modifier to use, use the ctrl-shift-e shortcut on either edges 
or vertices.

Recursive beveling is turned of for the time being.
2008-02-23 22:11:16 +00:00
Jean-Luc Peurière
09bb791249 making the new transform methods work on Os X
getndof return a 7 floats array, but only the first 6 are axis
the last one is a delta and seems to be much smaller on windows systems
this value should be ignored for the moment
2008-02-18 16:31:25 +00:00
Martin Poirier
83ddab60b7 == Transform Orientations ==
Merge Normal orientation calculations with Custom Orientations, to make it work the same all accross the table:
- One or more faces: use average face normal (first edge of faces define tangent)
- One edge: use edge itself as normal (vertex normals define tangent)
- One vertex: use vertex normal (tangent is perpendicular to normal and z-axis)
- Two vertices => edge orientation
- Two vertices => face orientation

*I tested quite a bit but please report any bugs this might have caused.*

ADDED FILE WARNING: source/blender/src/transform_orientations.c
2008-02-17 22:19:02 +00:00
Joshua Leung
0ce7e6c7b1 Bugfix: Limit Constraints
Rot/Scale-Limit Constraints with 'For Transform' option would sometimes act on location values too.
2008-02-17 06:17:01 +00:00
Martin Poirier
6e35a3c7f9 === Manipulator ===
Numinput working with the manipulator.

Someone suggested that on ba and it doesn't really hurt anyone/anything.
2008-02-09 19:00:12 +00:00
Brecht Van Lommel
a003d87a24 Bugfix for closely zoomed in rotation transform, with the rotation
center far out of the view, gave integer overflow and wrong results,
now uses doubles to avoid the overflow.
2008-02-06 17:29:16 +00:00
Martin Poirier
91439e7604 === Custom Transform Orientation ===
Switch away from using selected list in editmesh, since it isn't always up to date.

This fixes the bug where CTO where not created correctly with box/lasso selecting elements and many others.
2008-02-03 18:24:13 +00:00
Martin Poirier
4069449918 == Transform Snap ==
Snapping for Resize
First draft, there might be some things to iron out.

Minor terminology fixes in CTO (custom transform orientation).
2008-02-03 00:42:00 +00:00
Martin Poirier
39689cbf73 typo in text 2008-01-28 01:02:38 +00:00
Martin Poirier
ef1295e723 === Custom Transform Orientation ===
Adding the possibility to use 2 or 3 vertice to define an edge or face-like orientation.
Adding the possibility to use 2 connected edges to define a face-like orientation.
2008-01-27 19:26:17 +00:00
Martin Poirier
ee19d9a24e === Mirror Tool ===
Fix call order mix up.

That's what I get for doing "cleanup" before a commit.

Tested as working ok with this.
2008-01-25 04:38:08 +00:00
Martin Poirier
450b3664e1 === Mirror Tool ===
Making the mirror tool axis selection interactive instead of using a popmenu.

Mirror is now just a constant -1 scaling transform, which enables you to choose the mirror axis through hotkeys (x,y,z) and with MMB. It also means it's easier to select the correct axis if you're not sure which is which and gives access to all the orientation supported in transform (including custom user orientations).

Mesh and Object header menus still have the individual axis as options but have an added "Interactive Mirror" which just enters transform and lets user pick the axis there. Ctrl-M enters "Interactive Mirror" too.

In a nutshell, this changes adds more possible mirroring axis and unifies the mirror axis selection process with transform constraint axis selection.
2008-01-24 20:11:54 +00:00
Joshua Leung
1db590092f == Limit Rotation Constraint - Affects Transform ==
Now, the Limit Rotation Constraint can be made to work on the Transform values like the Limit Location/Rotation constraints. Use the "For Transform" button to activate.

Note: this does not really work as well as for the other constraints, as it currently does conversions between eulers/quats and matrices. This results in loss of rotation data.
2008-01-21 07:54:31 +00:00
Martin Poirier
65d61c2cb6 === Custom Transform Orientation ===
Added orientation overwriting old ones didn't change correctly (weren't returning the correct index).
2008-01-17 22:57:00 +00:00
Joshua Leung
65c4a2f9ff == Limit Scale Constraint - Affects Transform ==
Now, the Limit Scale Constraint can be made to work on the Transform values like the Limit Location constraint. Use the "For Transform" button to activate.

For clarity, this means that when scaling with a Limit Scale Constraint with this option on, the relevant values in the Transform Properties will stop changing once the Limit defined in the Limit Constraint is reached.
2008-01-14 11:23:03 +00:00
Martin Poirier
d660e29365 === Custom Transform Orientation ===
Custom Orientations can be added with Ctrl-Shift-C (hotkey suggestions are welcomed), this adds and select the new alignment. Custom Orientations can also be added, deleted, selected from the Transform Orientations panel (View -> Transform Orientations). Standard orientations (global, local, normal, view) can also be selected from this panel.

If you plan on using only a single custom orientation and don't really need a list, I suggest you use the hotkey as it adds and selects at the same time.

Custom Orientations are save in the scene and are selected per 3D view (like normal orientation).

Adding from an object, the orientation is a normalized version of the object's orientation.
Adding from mesh data, a single element (vertex, edge, face) must be selected in its respective selection mode. Vertex orientation Z-axis is based on the normal, edge Z-axis on the edge itself (X-axis is on the XoY plane when possible, Y-axis is perpendicular to the rest). Face orientation Z-axis is the face normal, X-axis is perpendicular to the first edge, Y-axis is perpendicular to the rest.
(More logical orientations can be suggested).

I plan to add: 2 vertice (connected or not) => edge orientation , 3 vertice = face orientation

Differences from the patch:
- orientations no longer link back to the object they came from, everything is copy on creation.
- orientations are overwritten based on name (if you add an orientation with the same name as one that already exists, it overwrites the old one)
2008-01-13 18:24:09 +00:00
Campbell Barton
0d0fe50a70 trackball rotate patch from bebraw so using the Shift key works as expected. 2008-01-02 21:40:05 +00:00
Martin Poirier
b0b3a69c19 == Transform: Warp ==
Adding special hotkey (MMB) to reverse the direction of the warp.

Normal input is 0..360 mapped to the horizontal position of the mouse on the 3D view (the 3D view becomes a sort of giant horizontal slider), pressing MMB reverses the value to 0..-360 and back if you press it again.

I've used MMB mostly because it's unused in Warp, easily accessible and already used to switches mode for Shear (shear x/y).

Indirectly suggested by a user question on ba.
2007-12-26 03:06:59 +00:00
Joshua Leung
1fe2c51966 == AutoIK - Fixes for MouseScroll Setting ==
* Added display of current chain-length setting to the header, when transforming with Auto-IK on

* Removed debug print accidentally left in 

* Fixed compiler warning in buttons_object.c
2007-12-16 00:59:06 +00:00
Joshua Leung
faf638238d == Auto-IK ==
-- Peach request (from wiki feature request list) --

When translating a bone using Auto-IK, you can now use the ScrollWheel on the Mouse or the Page Up/Down keys to adjust the chain length. 

Notes:
* Up decreases the length, while Down increases it.
* The previously used chain-length is stored per scene
* Currently, it might be too sensitive. Also, it would help to have some kind of indication of the current chain-length somewhere...
* The chain length specified this way determines the MAXIMUM chain length possible for all chains (if 0, then the default chain-length is used). Chains are clamped to have a chain length which does not exceed the default chain length. This restriction may be removed following further feedback...
2007-12-15 07:35:16 +00:00
Joshua Leung
df1db20737 == LimitLoc Transform - Tweaks ==
* Made 'cob' be a stack var instead of allocating memory (as suggested by Martin)
* Adjusted the position of "Trans" button in panel, and changed its name/tooltip to better describe its function

* 'Active' constraint now draws brighter than other constraints... this is still not clear enough though.
2007-12-06 02:57:47 +00:00
Joshua Leung
5c13e82140 Two transform tweaks:
* [Peach Request] AutoIK now respects axis locking (rotation locks).
- Temporary DOF-Locks are turned on for those bones that are part of an AutoIK chain while transforming. These locks get cleared after transforming.
- This works for all bones except the root bone of the chain, which doesn't seem to be able to be locked.

* Limit Location constraint can now optionally affect Translations too (i.e. NKEY panel values won't change). 
- LimitRot,LimitScale support (for their respective transforms) will be done at a later date
- This only works if the constraint is using World/Local space (the other spaces are not supported yet).
- I've added a temporary button in the LimitLoc panel to enable this option (it is disabled by default). This button will be properly assigned a place in that panel sometime.
2007-12-05 11:19:36 +00:00
Brecht Van Lommel
7da56f4a9b Particles
=========

Merge of the famous particle patch by Janne Karhu, a full rewrite
of the Blender particle system. This includes:

- Emitter, Hair and Reactor particle types.
- Newtonian, Keyed and Boids physics.
- Various particle visualisation and rendering types.
- Vertex group and texture control for various properties.
- Interpolated child particles from parents.
- Hair editing with combing, growing, cutting, .. .
- Explode modifier.
- Harmonic, Magnetic fields, and multiple falloff types.

.. and lots of other things, some more info is here:

http://wiki.blender.org/index.php/BlenderDev/Particles_Rewrite
http://wiki.blender.org/index.php/BlenderDev/Particles_Rewrite_Doc

The new particle system cannot be backwards compatible. Old particle
systems are being converted to the new system, but will require
tweaking to get them looking the same as before.

Point Cache
===========

The new system to replace manual baking, based on automatic caching
on disk. This is currently used by softbodies and the particle system.

See the Cache API section on:
http://wiki.blender.org/index.php/BlenderDev/PhysicsSprint

Documentation
=============

These new features still need good docs for the release logs, help
for this is appreciated.
2007-11-26 22:09:57 +00:00
Joshua Leung
45a53c4749 Bugfix #7654: Keyframe translation in (Action/NLA) wasn't working correctly for scaled actions
Scaled action times were getting calculated twice, which meant that translating a keyframe resulted in the keyframe "not following the mouse position".
2007-11-23 11:07:57 +00:00
Joshua Leung
9cd76a6609 == "Extend" Transform Mode for Action + NLA Editors ==
Peach Request:
Now the Action and NLA editors have the "Extend" transform mode first seen in the Sequence Editor. Just use the EKEY to start transforming.

It works like Grab, except it only moves the keyframes/side of NLA-strip that was on the same side of the current-frame marker as the mouse was when transform started.
2007-11-06 11:41:09 +00:00
Joshua Leung
cfd9d390fc Several fixes:
* DNA_action_types.h - fixes for typos that broke compiling (own error)

* transform.c - fix for implicit definition of a function (missing header)

* outliner.c - commented out a few unused vars (as a result of constraints refactor)

* editsima.c - fixed uninitialised var warning

* drawview.c - bugfix #7598 load without ui crashes if there is no camera. Patch provided by Daniel Genrich (genscher)
2007-10-22 06:28:39 +00:00
Joshua Leung
2cc41ad890 == Action/NLA Transform ==
Added a new auto-snapping mode: snap to nearest marker. 
This mode can be toggled using the ALTKEY.
2007-10-22 05:32:17 +00:00
Peter Schlaile
a0390e5cc3 == Core ==
This adds fractional FPS support to blender and should finally
make NTSC work correctly.

NTSC has an FPS of 30.0/1.001 which is approximately 29.97 FPS.
Therefore, it is not enough to simply make frs_sec a float, since
you can't represent this accurately enough. 
I added a seperate variable frs_sec_base and FPS is now 
frs_sec / frs_sec_base.

I changed all the places, where frs_sec was used to my best knowledge.

For convenience sake, I added several macros, that should make life
easier in the future:

FRA2TIME(a) : convert frame number to a double precision time in seconds
TIME2FRA(a) : the same in the opposite direction
FPS         : return current FPS as a double precision number 
              (last resort)

This closes bug #6715 
Standard framerates not supported / breaks sync -- 23.967 29.967 etc.

https://projects.blender.org/tracker/?func=detail&aid=6715&group_id=9&atid=125

Please give this heavy testing with NTSC files, quicktime in/export
and the python interface.
Errors are most probably only spotted on longer timelines, so that is
also important.

The patch was tested by Troy Sobotka and me, so it most probably should
work out of the box, but wider testing is important, since errors are
very subtle.

Enjoy!
2007-10-21 15:42:08 +00:00
Campbell Barton
5b755bade2 ipo error kept popping up and lock ipo didnt redraw the sequencer view (note, still not realtime, but at least it redraws now) 2007-10-16 18:04:56 +00:00
Joshua Leung
088c3083a3 Bugfix:
When transforming on one axis in a 2d-editor, it no longer mentions 'global' in the header print.

Un-related note: the mmb constraint selection in 2d-editors is currently quite wonky, as the current code for this only suits the 3d-view.
2007-10-09 07:49:54 +00:00
Joshua Leung
f9535b4eb5 Bugfix #7482:
Trackball transform did not work correctly for "individual centers" pivot mode in face-select mode. It was missing a case that would allow this happen.
2007-10-09 06:21:26 +00:00
Joshua Leung
3a6494c4b8 Bugfix #7489:
Warp Tool (Shift-W) suffered from 'division-by-zero' (TM) problems when there was only one element (selected object or selected vertex) to transform.
2007-10-09 05:54:31 +00:00
Joshua Leung
d6c4abb56f Removed a variable that wasn't really needed
(Note: gcc doesn't give any more compile warnings about the new code here, but other compilers may)
2007-10-07 09:21:28 +00:00
Joshua Leung
c60cc6ac85 == Anim Editor Transform ==
Restoring the 'force redraw' functionality, which is only active when the 'lock' icon on the header of the respective editor is turned on.
2007-10-07 08:44:14 +00:00
Joshua Leung
d5fe701370 == Bone Size Transform Tool ==
Fixed a few bugs with the Alt-S transform tool when the armature drawtype is set to B-Bone:

* Transform constraints seem to have been turned off for this sometime in the past few weeks. Re-enabled this.
* Numeric input for this tool was not working correctly. You could only set the value of the x-axis width only. Also, giblish was being displayed for the other channels
* The char array used in the BoneSize function was smaller than the one used in the headerBoneSize (new function added for this transform mode instead of reusing some old one).

Also, I've added some menu entries for both Alt-S tools in editmode, which did not exist in the past. How were the users supposed to figure this out???
2007-10-02 10:45:22 +00:00
Joshua Leung
27b239f89c Bone/Envelope Size Bugfix:
When in envelope draw-mode for an armature, it would not be possible to change the envelope distance of a bone using Alt-S if the distance was 0.
2007-10-02 06:30:33 +00:00