Age | Commit message (Collapse) | Author |
|
- switched almost all uiDefBut(..., TOG|BIT|..) to use UiDefButBit and the
name of the actual bit define instead of just a magic constant, this makes
searching the code much nicer. most of the credit here goes to LetterRip
who did almost all of the conversions, I mostly just checked them over.
|
|
|
|
|
|
- Added option to the IK buttons, to have it use the 'tip' as end of the
IK chain. I never really understood this old convention (IK didn't work
on the Bone itself).
Old files still will read OK though. But I made the "To Tip" a default
when adding new IK constraints.
- Hotkey CTRL+I: add IK, with option to have it adding an Empty target,
or use a selected Bone as target. With the new non-modal PoseMode, it
gives instant access to playing with the IK chain.
- Hotkey ALT+I: clears IK, on all selected Bones
- Hotkey ALT+C: clears Constraints on all selected Bones (incl IK)
|
|
*NOTE*: Some UI decision done in this commit will most likely be revised, all flame shall go in /dev/null. Constructive discussions of course welcomed.
This commit merges manipulator orientation selection back in "traditional" transform.
That's how it works:
- The dropdown in the 3D view header is always visible
- The orientation chosen will be used when choosing an axis with MMB and for the *second* key press of X,Y,Z
However, Local orientation doesn't use the one calculated by the manipulator. This is to ensure that multiple object local and armatures in pose still works as before.
- Alt-Space (to change the orientation) works during transform
New Transform orientation: View, using the view axis.
Fixes for the following bugs:
- Constraint projection code "jammed" if input vector was <0,0,0>, reported a couple of times on IRC. Thanks to Basse for the example file.
- Transform on texspace crashed on objects without texspace data (camera, lamp, ...). This was reported in tracker.
- Numinput with lock constraints didn't work correctly. Reported on elysiun
Probably some others that I'm forgetting
I also moved a couple of functions around in an attempt to make things clearer.
|
|
- PoseMode now is a state Armature Objects can be in. So, while in PoseMode
for an Armature, you can just select another Object or Armature.
- The old PoseMode options (transform, insert keys etc) are accessible
with making the Armature Object 'active' (and have object in PoseMode).
- At this moment no multiple Poses can be transformed/edited at the same
time.
- The old hotkey CTRL+TAB, and view3d header menu, still work to set an
Object's PoseMode
It was quite a lot recode, so tests & reports are welcome.
Oh, as a bonus I added Lasso Select for Bones in PoseMode! It selects using
only the line between root and tip of the Bone.
|
|
The problem is that the shear shortcut that was originally chosen was
eaten up by the shortcut to switch to the scale blezmo. Changed the
shortcut to CTRL + ALT + SHIFT + S which is painful but seeing as how
shear in object mode has limited use, I don't think it will cause any
real problems. I also updated the menu entry to match.
This was assigned to Martin but he's busy so I did it... and if I did it
wrong... blame him for not fixing it sooner ;)
|
|
- Add Armature or Bone (SHIFT+A) now adds by default a single Bone, view
aligned and of unit-size 1.
- Then use E-key (extrude) to draw chains, this option now doesn't popup
the "OK" requester anymore, so works fast
- Another new method is using CTRL+click to add Bones
This makes it working identical to the other edit modes in Blender. The old
modal loop for drawing bones just wasn't working well either.
Related to this; have a real set of useful Armature primitives?
2) Removed event REMAKEALLIPO, which was added in NaN days for testing, and
proved to be extremely slow. Code is moved now to editnla.c.
Thanks Tom Hendrick to pointing to this nasty buggy feature!
|
|
The B-Bones!
(where the B can be read as 'block' or 'bezier' or 'b-spline')
- set option on/off in edit buttons, armature panel
- scaling of B-bones only works in editmode, use ALT+S to make bones fatter
or thinner. Also works for constrainted transform
- In pose mode, you now have a buttons panel with per-bone settings too
Here you can find the "segments" button, which allows bones to
interpolate between previous/next bones, including roll.
- Buttons to control interpolation ("In" and "Out" are disabled, doesn't
work satisfying yet
NOTE: this doesn't give deform yet! Main purpose for now is to test if this
drawing method serves to animate/pose armatures well.
Still need to review proper interpolation methods... maybe bezier is too
limited.
|
|
Ton has been pushing me to get this in and finish it up with help, so here is a run down of the commit
Revised Features
Subdivide now is Edge based, allows for multicut
Loopcut was recoded, now has multi option
Knife tool now has multi option
New Features
Edgeslide
Edgering select
Removed Features
Alt-B Edgeloop selection (use alt-RMB in edgemode)
Shift-R Faceloop selection (use alt-RMB in facemode)
Old Subdivide (Except for smooth which is left in until new one works)
Todo
Subdivide Smooth Math is broken - could use some help here (look for alter_co in editmesh_tools.c)
Tweak mouse control of Edgeslide is hackish ATM
Add Non-proportional movement to edgeslide
Add smooth option to new loopcut
I probably left something out.
See here for more info
http://wiki.blender.org/bin/view.pl/Blenderdev/EdgeSubdivision
|
|
This is mainly useful for scripts that generate/load datablocks for their own use and don't want to burry the user under an avalanche of datablocks he/she doesn't care about.
This adds a user pref "Hide .data" which now acts as a default value when opening a new fileselector.
It is also used when creating data select pop menus.
The "ghost" button in a fileselect window is independant from the userpref. It can be turned on/off individually without affecting
Note: When turning the option on/off, it sometimes take a couple of times before the pop menu registers it. Probably some caching thing. Will have to look at it.
Default value is Off.
|
|
Ipocurves with "Auto" handles now have option to remain horizontal on the
extrema (tops & valleys). Use ALT+H to set this per selected curve.
Note this is a per-curve feature, not per-handle.
If it works satisfying I can check on making this the default new added
curve.
|
|
This fixes the active object in place when orbiting the view.
Choppy 15fps demo can be seen there: http://www.elysiun.com/~theeth/bf/around_active.html
Image Memory Grabage Collection
This adds memory handling to the image code. An image is tagged each time it is used.
During a collection cycle (frequency of cycles is user defined), if an image is older
than a user defined limit, its buffer gets deallocated. This also applies to gl memory buffers.
Images that are loading in GL memory needs to go through two time outs before being fully deallocated: the first time out deallocated the gl memorry, the second the buffer in ram.
Notes:
Image buffer loaded from python gets tagged as permanent upon load. That tag is removed when python stops using the image.
I might have missed some tagging spots, especially in the rendering pipeline. Someone with more knowledge about this code should check to be careful.
Tagging is done on every access, for rendering, this will probably be a performance hit. A scheme should be developped to only tag when the rendering is completed.
Collecting is called in draw_object, most likely not the best place to do it.
Safe from undo, since using undo deallocates memory anyway (like when loading a blend file with one currently opened)
Userpref DNA changes:
I've changed a couple of flagging variables from short to int. Some because they needed more space, others to keep SDNA happy.
Info window changes:
I've grouped a couple of buttons in aligned blocks and changed the color of mutually exclusive options to make them clearer.
Matt didn't do any changes on that in tuhopuu, so hopefully I'm not stepping on anyone's feet with this.
Also changed double constants into floats with f in a couple of places (mostly space.c) to make compiler happier.
|
|
Aim was to get a total refresh of the animation system. This
is needed because;
- we need to upgrade it with 21st century features
- current code is spaghetti/hack combo, and hides good design
- it should become lag-free with using dependency graphs
A full log, with complete code API/structure/design explanation
will follow, that's a load of work... so here below the list with
hot changes;
- The entire object update system (matrices, geometry) is now
centralized. Calls to where_is_object and makeDispList are
forbidden, instead we tag objects 'changed' and let the
depgraph code sort it out
- Removed all old "Ika" code
- Depgraph is aware of all relationships, including meta balls,
constraints, bevelcurve, and so on.
- Made depgraph aware of relation types and layers, to do smart
flushing of 'changed' events. Nothing gets calculated too often!
- Transform uses depgraph to detect changes
- On frame-advance, depgraph flushes animated changes
Armatures;
Almost all armature related code has been fully built from scratch.
It now reveils the original design much better, with a very clean
implementation, lag free without even calculating each Bone more than
once. Result is quite a speedup yes!
Important to note is;
1) Armature is data containing the 'rest position'
2) Pose is the changes of rest position, and always on object level.
That way more Objects can use same Pose. Also constraints are in Pose
3) Actions only contain the Ipos to change values in Poses.
- Bones draw unrotated now
- Drawing bones speedup enormously (10-20 times)
- Bone selecting in EditMode, selection state is saved for PoseMode,
and vice-versa
- Undo in editmode
- Bone renaming does vertexgroups, constraints, posechannels, actions,
for all users of Armature in entire file
- Added Bone renaming in NKey panel
- Nkey PoseMode shows eulers now
- EditMode and PoseMode now have 'active' bone too (last clicked)
- Parenting in EditMode' CTRL+P, ALT+P, with nice options!
- Pose is added in Outliner now, with showing that constraints are in
the Pose, not Armature
- Disconnected IK solving from constraints. It's a separate phase now,
on top of the full Pose calculations
- Pose itself has a dependency graph too, so evaluation order is lag free.
TODO NOW;
- Rotating in Posemode has incorrect inverse transform (Martin will fix)
- Python Bone/Armature/Pose API disabled... needs full recode too
(wait for my doc!)
- Game engine will need upgrade too
- Depgraph code needs revision, cleanup, can be much faster!
(But, compliments for Jean-Luc, it works like a charm!)
- IK changed, it now doesnt use previous position to advance to next
position anymore. That system looks nice (no flips) but is not well
suited for NLA and background render.
TODO LATER;
We now can do loadsa new nifty features as well; like:
- Kill PoseMode (can be option for armatures itself)
- Make B-Bones (Bezier, Bspline, like for spines)
- Move all silly button level edit to 3d window (like CTRL+I = add
IK)
- Much better & informative drawing
- Fix action/nla editors
- Put all ipos in Actions (object, mesh key, lamp color)
- Add hooks
- Null bones
- Much more advanced constraints...
Bugfixes;
- OGL render (view3d header) had wrong first frame on anim render
- Ipo 'recording' mode had wrong playback speed
- Vertex-key mode now sticks to show 'active key', until frame change
-Ton-
|
|
http://projects.blender.org/pipermail/bf-blender-cvs/2005-June/003769.html (which I in my commithappyness did before properly checking)
|
|
|
|
|
|
to precisely align the glyphs to pixel coordinates as used in the Pixmap
version. It now looks fully identical here.
|
|
Using the Play button in timeline, now uses an event-driven system to
update the animation system and signal windows to redraw. Meaning the
full UI remains responsive!
Check the new Pulldown "Playback" to set which windows you like to see
updated. Same settings is used for LMB 'dragging' frames in Timeline.
Implementation notes;
- the Icon for 'Pause' (or stop) has to be made yet, I commit this from
my laptop... all was coded during a 2 x 5 hour train ride to germany
- the anim playback system (ALT+A too) now uses correct "frames per
second" as maximum speed. Buttons can be found in 3 places in the UI,
also added it as pulldown item
- The system works with 'screen handlers', which has been coded with
using Python (networked) events or verse in mind too. A doc on that
will follow.
- the buttons code has been made 'resistant' to animated UIs too,
preventing flashing of hilites.
- All subloops (like transform) stop playback, with exception of MMB
view manipulations.
As extra; found tweak to make Textured AA fonts draw without distortion.
Looks perfect here on laptop now (like Pixmap fonts) and is 20x faster.
|
|
- Splited off the event treatment into a fonction of its own
- Splited off the initialisation phase into a function of its own (will have to do it for the manipulator function too)
Calling transform now works like this:
initTransform(mode, context)
- possible post init calls, constraints mostly
Transform()
- eventually, the postTransform function, so that Transform is just a simple big loop which could in the end just be tied in the blender event system instead.
- Added a state variable in TransInfo to replace the ret_val local variable. Possible values are: TRANS_RUNNING, TRANS_CANCEL, TRANS_CONFIRM
- Tied MMB and the hotkey select for constraint together, so selecting an axis with MMB and pressing the axis key after that goes to local mode on that axis. Much less confusing.
|
|
- Made Blender.event var (previously only used by script links) hold ascii value -- where it applies -- of current event during events callback registered with Draw.Register(gui, events, button_events). Useful for gui scripts like Campbell's Python console. No problem using this var to hold the value, since in gui scripts it was not used (always None).
- Updated Window and Window.Theme with new theme vars and the Time space.
- Script links:
-- Added "Render" event for script links (runs twice, second time as "PostEvent", for clean-up actions). Now FrameChanged links don't run when a single pic is rendered.
-- Added "Enable Script Links" button in the script buttons tab. Now this bit gets saved in .blends along with the rest of G.f, so users can define per .blend if they are on or off by default. "blender -y" also disables all slinks as happened before with OnLoad ones only.
-- Other small changes in the script buttons tab:
When a link is added (button "new"), it becomes the active one for the window, no need to press a button to reach it.
Also, a pupmenu showing all available texts is shown when "new" is pressed, so users can choose a text w/o having to type. Cancel the popup to leave the string button empty (link exists, but has no script assigned). A pulldown would be better UI-wise, but it's kinda weird to show both scripts and normal texts (Blender doesn't differentiate them) in a script links pulldown. With a popup we can show only texts ending in ".py" (not done in this commit, need opinions) and if the script has no or another extension, case of many in old and current .blend's, there's still the string box for writing its name.
-- Implemented Ton's space handler script links:
Right now only for the 3d View, but it's trivial to add for others. There are two types: EVENT, to receive 3d View events from a chosen window and DRAW, to draw on the window. Ton's idea was to give scripts a controlled way to integrate better within Blender.
Here's how it works:
- scripts must have a proper header, like:
# SPACEHANDLER.VIEW3D.EVENT
and then they are shown in 3d View's View menu, "Space Handler Scripts" submenu. Check (mark, click on it) a script to make it active.
EVENT handlers should consult the Blender.event var to get the current event, which can be compared with values from the Draw module:
import Blender
from Blender import Draw
evt = Blender.event
if evt == Draw.AKEY:
print "a"
elif evt == Draw.LEFTMOUSE:
print "left mouse button"
else:
return # ignore, pass event back to Blender
Blender.event = None # tell Blender not to process itself the event
DRAW handlers are free to draw to their owner 3D View. OpenGL attributes and modelview and projection matrices are pushed before running the handler and poped when it finishes.
To communicate between EVENT and DRAW handler scripts we have the Blender.Registry module, as always.
Still need to code some nice example, which should also serve to test properly space handlers. Simple tests went fine.
- doc updates about the additions.
=======
Note: the UI part of the space handlers and script links is of course open for changes, I just tried to make it understandable. Probably we won't use the scriptlinks icon for "None Available" (check 3d View -> View -> Space Handler Scripts), though it hints at what space handlers are. The tooltips may not be accepted either, since other menus don't use them. Opinions welcomed.
|
|
- TimeLine: Marker grabbing works now. Use GKEY or select+drag, as usual
Holding CTRL will step with 1 second (corrected for ntsc dudes yes!)
Also added this in header pulldown
- Time values and Time grid draw fixed for Seconds display. It used to
draw steps of 2/5/10/20/50/100 etc. frames. Now does steps in seconds.
Again corrected for "Frames/Sec" value.
- "Frames/Sec" button redraws TimeLine, Secquencer, etc
- Bug fixed in editing Theme for TimeLine (was editing Image Select...)
- Added Grid color to Theme choices for Ipo, TimeLine, Sequencer, NLA,
Action, Sound. Was missing!
|
|
- Using Arrowkeys to change frames didn't give proper redraw
- Option "Record" now tied to the User-preset "Auto key insert". It is
no user preset anymore even, I thought to leave a button in the User-
presets for the time being though...
|
|
Main change is that it's an own Space type now, not part of the Audio
window... the audio window should restrict to own options. This way
functionality is nicely separated.
Since it's the first time I added a new space (since long!) I've made an
extensive tutorial as well. You can find that here:
http://www.blender3d.org/cms/Adding_new_Space_Window.557.0.html
Notes for using timewindow;
- Add time markers with MKey
- CTRL+M gives option to name Marker
- Markers cannot be moved yet...
- Pageup-Pagedown keys moves current frame to next-prev Marker
- Xkey removes Markers
- If an object has Ipos or an Action, it draws key lines
- CTRL+Pageup-Pagedown moves current frame to next-prev Key
- Press S or E to set start/end frame for playback
Notes about the implementation in Tuhopuu:
- Add new Marker now selects new, deselects others
- Selecting Marker didn't work like elsewhere in Blender, on click it
should deselect all, except the indicated Marker. Not when holding SHIFT
of course
- Not exported functions are static now
- Removed unused defines (MARKER_NONE NEXT_AVAIL)
- Drawing order was confusing, doing too many matrix calls
- Removed not needed scrollbar, added new function to draw time values.
(Has advantage the MMB scroll works not confusing on a scrollbar)
- Added proper support for 'frame mapping'
- The string button (name Marker) had a bug (checked str[64] while str
was only 64 long)
- String button itself didn't allow "OK on enter"
- Made frame buttons in header larger, the arrows overlapped
- Removed support for negative frame values, that won't work so simple!
|
|
Proportional edit:
- Proportional mode added to header as button/menu. Including new option
to have only connected geometry influenced.
- Added icons for proportional & proportional modes
- Make proportional edit data part of Scene, so all gets saved.
The Global flag G_PROPORTIONAL was removed
- Made sure #defines get used properly, also tweaked order for proportional
so it starts with regular 'smooth' by default.
- Use ALT+O in editmode to switch to new proportional 'connected' mode
Other UI stuff:
- in EditMode, the layer buttons get hidden... the amount of icons in
3d header grows to fast. :)
- made less ugly icons for the Manipulators. Still can be better.
- Added alpha-filter for pre-processing Icon-image, giving nicer display
of icon-antialising on dark or bright backdrops
- disabled Manipulators when in editmode, and current layers don't show
the edited data.
- Added the value used to define Normal size (editmode draw) in Scene too,
so it gets saved.
|
|
Works as follows;
- press the 'show bake settings' button (no space left... :)
- define start/end frame for bake, and an interval step.
The baked result interpolates nicely (Bspline, 4 keys) so in general a
step size of 2 or 3 still gives OK results.
- Press "BAKE". This will do a full animation + playback. Press ESC if it
you don't want it.
Once Baked, the BAKE button becomes a FREE BAKE. As reminder the softbody
buttons get blocked with error() menu.
This saves OK in a file. Renders any frame, including fields and moblur.
You can also set a "Timeoffs" for the softbody. And yes, this should be
in the NLA once... :)
NOTE! With this commit, files saved with the old (first commit) version by
Jens Ole won't read the settings back... he stored all sofbody variables in
Object, which was moved to a new struct when I did my first commit on SB
(over a month ago)
Also note that I moved particle deflecting & softbody to a new include.
|
|
Works like a charm... well it now replaces the old base-sorting hack. :)
Next stage will be to define how to further integrate it. Plus some
minor code cleanups... static/internal functions versus external, etc.
|
|
- added in new transform the (not so useful but yah) old feature that
does scrollwheel zoom during transform
- had to change transform call arguments for uv-window/sequence/oops to
match new transform for mouse callback
TODO (for martin?)
- pulldown menu support to call with local axes compliant as for pressing
it with hotkey
- mirrormenu() still uses old transform stuff...
|
|
Here you can see the notes and pictures:
http://www.blender3d.org/cms/Manipulator_Widgets.548.0.html
The alternative rotate widgets are still under rt=2 and rt=3.
Still enough work todo here, but hope it's a good step forward!
|
|
zoom levels can be found in the View > View Navigation menu. Also Ctrl+MMB
zooming was added.
Added the E-key, LSCM unwrap popup back again.
|
|
- Moved Weld/Align out of transform code, now it's a menu.
- Removed confirmation popups for LSCM unwrapping in the uv editor, didn't
make sense anymore now we have undo.
- Extended select linked, to work more like it does in edit mode:
- L: select linked uvs/faces under the mouse
- Shift+L: select/deselect linked uvs/faces under the mouse
(like shift+click for selecting single uvs/faces)
- Ctrl+L: how L worked before
- More accurate uv selection: when selecting one uv from a group of uvs that
are in the same position, it now selects the uv belonging to the face the
mouse is over, instead of a random uv.
- 'View Selected' (numpad .-key) for both faceselect mode and the uv editor.
|
|
Also includes some 2d vector operations (subtract, dot, normalise).
|
|
With a few tests I have discovered that when quitting Blender the filelist
in SpaceFile doesn't get free'd.
storage.c:
I have replaced strdup for the relname member in BLI_builddir with BLI_strdup.
and malloc with MEM_mallocN for the string member in BLI_addstrings().
filesel.c:
Of course also had to replace free with MEM_freeN in freefilelist().
In freespacelist (space.c) I added call to freefilelist for the SPACE_FILE
space type.
|
|
While in camera view, going to local axis rotation (R, X, X) the view
became instable. Was still using the view3d view matrix, instead of
initialized TransInfo->viewmat.
Martin; you could check on the mouse motion in this case, for some reason
it only uses horizontal motion?
ALso; renamed button in InfoWindow "Disable sound" to "Disable Game Sound".
|
|
Behavior is a bit different. Instead of showing the weird two value thing like the old transform did, it always show the weight variation in +/- that is applied to every edge. Works a bit like scale. Move away from center to increase, move closer to decrease (between -1.0 and 1.0).
Works with PET (not using connection yet).
Also removed some missed global Trans variable abuse.
|
|
PET is now checked as a transform flag during transform. Much cleaner that way for NOPET context (extrude, duplicate)
Added Sphere as a new PET falloff mode (icon and all) and reordered them around in a more logical fashion (IMHO).
Also brought back Subsurf toggle with Shift-O (was supposed to be for PET object mode but that was canned).
|
|
slipped in my last commit a bit, so might as well finish it.
Accesible with Shift-P (was free), the behavior is much like Shrink/Fatten. Pull mouse toward you to pull toward center, push away to push away. Constraint and PET works with it too, of course.
|
|
- made more general calls with args for drawing types
- made it accept transparency for all modes (used while transform now)
- added argument to detect 'combo' mode, gave offsets to translate/scale
handles in combos.
- added 'pie chart' on view-aligned rotate for widget
- made trackball for rotate widget rt==4 behave compatible
- removed redundant code for 'ghosting'
|
|
For tex space edit, crease (soon) and future use.
Manipulator assumes no context.
|
|
- Added icons for the Widgets to blenderbuttons pic
- Added in header - if widget in use - three buttons to choose widget type
(hold shift for combo widgets)
- Hotkey CTRL+space now switches widgets on/off
I also noticed negative scaling doesn't work satisfying yet;
- for scale widget, using center didn't work correct anymore (fixed)
- negative scaling didn't even get applied! (fixed)
- but; scaling somethig negative now flips back to positive... ????
Last one i need Martin P for! Note that I had to change Mat3ToSize....
|
|
remains translate though. Can be activitated as 4th CTRL hotkey cycle.
|
|
anymore. Was giving some problems with cameras looking perfectly down.
Also removed all NEWTRANSFORM defines, using the new code all the time now.
|
|
moving mouse around :)
- Shift+D duplicate uses new transform
|
|
Akey in ipowindow didn't deselect anymore. Or worse... each main refresh
in ipowindow selected all ipos!
Was related to trying to fix mess from jK's commit last year... now its
scientifically ok again! :)
|
|
That was blocking immediate hotkey access for normal blendering.
- New, experimental, hotkey to switch: CTRLKEY! Added code in such a way
it detects a CTRL key press and release without using it as modifier.
Pressing CTRL will cycle through the 3 manipulator types.
- Fix for yesterday's commit; click on centerpoint for switching
orientation happened too on a click for other widgets. Not nice...
|
|
|
|
- added 'ghosting' for while using translate/scaling widget
- added 'pie chart' ghost to denote angle while using rotate widget
- added settings to tweak widget in User menu (InfoWindow) "View & Control"
- Size: total widget size as percentage of window size
- Handle: as percentage of widget radius
- Hotspot: for clicking handles, in pixels
- Fized Size: option to make Widget size independent of window size
Not sure if all of these are useful to keep, but makes for good testing
in this stage.
Also: made #define to use new transform to be set TRUE by default now. :)
|
|
|
|
NOTE: BLI_winstuff.h was meant to be a wrapper around windows.h to handle
undefining various crap that windows.h defines. Platform specific headers
should only have to be included in a few places. This reduces the number
of inclusions of BLI_winstuff.h to 16 which is a much more reasonable
number (than the 144 or whatever it used to be)
|
|
Needed when NEWTRANSFORM was not defined.
|