Martin Poirier [Fri, 1 Oct 2004 15:23:41 +0000 (15:23 +0000)]
Projectfile (MSVC 6.0) update for new softbody files
Ton Roosendaal [Fri, 1 Oct 2004 14:49:38 +0000 (14:49 +0000)]
Accidentally previous commit went out, while i tried to abort it. :)
This is a fix for propert circular clipping for circleselect, when it
uses backbuffer selecting
Ton Roosendaal [Fri, 1 Oct 2004 14:48:12 +0000 (14:48 +0000)]
*** empty log message ***
Ton Roosendaal [Fri, 1 Oct 2004 14:10:30 +0000 (14:10 +0000)]
Added 2 files for softbody plus sconscript!
Ton Roosendaal [Fri, 1 Oct 2004 14:04:17 +0000 (14:04 +0000)]
OK. Here's the long awaited first step (V0.01!) of SoftBody. It is called
from within mesh_modifiers (kernel deform.c). It copies vertices to a
temporal particle system (struct SoftBody with BodyPoint structs) to do
physics tricks with it.
For each frame change the delta movements (based on standard ipo anim or
even other deforms (later) are applied to the physics system. How to apply
and calculate satisfying results is not my thing... so here I'll commu-
nicate with others for.
Since it's in the modifier stack, the SoftBody code can run entirely on
original data (no displists!).
Right now I've implemented 2 things;
- "Goal" which is a per vertex value for how much the current position
should take into account (goal=1 is without physics). This is a powerful
method for artists to get control over what moves and not. Right now i
read the vertex color for it.
- And some spring stuff, which now only works based on force moving it to
the originial location. This doesnt work with 'goal'... erhm.
- You can re-use physics vars from engine, used right now is (in Object)
- damping
- springf (spring factor)
- softflag (to set types, or activate softbody for it
- The SoftBody pointer in struct Object is only runtime, nothing saved in
file
To prevent all users going to complain it doesn't work, I've hidden the
functionality. :)
The buttons to set softbody 'on' only show now (psst psst) when the object has
name "soft" as first 4 characters. You can find the buttons in the F7 Particle
Interaction Panel (which should be renamed 'physics properties' later or so.
Demo file:
http://www.blender.org/bf/softbody.blend
Ton Roosendaal [Fri, 1 Oct 2004 10:10:09 +0000 (10:10 +0000)]
Header redraw added for 'select mode menu'. Also checked more files for it.
Reminder, the allqueue() function needs as last arg a '1' if you want header
to be refreshed too!
Ton Roosendaal [Fri, 1 Oct 2004 09:54:47 +0000 (09:54 +0000)]
- fixed error in lasso select (evaluated lasso coords one too many!)
- made ctrl+tab menu for selectmode only pop up in editmode mesh
- changed lasso code in zbuffer-select mode, that it also accepts lines
as lasso
Ton Roosendaal [Fri, 1 Oct 2004 07:51:12 +0000 (07:51 +0000)]
- Improved memory system for pupmenu(), which now stores 255 entries max.
Meaning menus come back to previous selection almost always. Also fixed
annoying bug that caused Mirror menu (M in editmode) to start at 2nd item
- New hotkey (test :) CTRL+TAB in editmode gives (and shows!) current
selectmode. I prefer this over cycling, since the menu is informing you
what happens.
- To enforce pupmenus to start at specific item, use pupmenu_set_active()
- pupmenu_col() to be done
Stephen Swaney [Fri, 1 Oct 2004 05:28:14 +0000 (05:28 +0000)]
Tweak the bpy 'import site failed' msg.
A half-hearted attempt to make the World's Scariest Warning Msg
just a tad less scary.
Ton Roosendaal [Thu, 30 Sep 2004 22:29:19 +0000 (22:29 +0000)]
- Made the 'zbuf clip select' in editmode default when reading on old file
- Added transparent wires in solid draw for editmmode, to denote selecting
clicks "through". Switching this and the zbuf-clip mode is actually nice!
- little annoyance; removed object centerpoint drawing in editmode.
Ton Roosendaal [Thu, 30 Sep 2004 20:38:35 +0000 (20:38 +0000)]
Recoded how 'handles' were implemented; these were extra wireframe edges
actually, adding vertices and edges to displist.
Now the subsurfer gives editvertices a pointer to the subsurfed vertex
location; allowing not only vertices in 'optimal' draw to show correct, but
also gives proper handling of borderselect and lasso for edges. :)
Jiri Hnidek [Thu, 30 Sep 2004 18:04:25 +0000 (18:04 +0000)]
- Added undo menu for MetaBalls in edit mode
Ton Roosendaal [Thu, 30 Sep 2004 16:35:40 +0000 (16:35 +0000)]
Solved crash with;
- linked duplicate mesh
- subsurf on
- subdiv levels at 0
- new selectmode face + select clipping
Also found error in backbface draw when faces were hidden
Ton Roosendaal [Thu, 30 Sep 2004 14:27:20 +0000 (14:27 +0000)]
Special request; Lasso Select (thanks andy for nagging! :)
Is committed now for further test;
What works:
- Hold CTRL while leftmouse-draw (gesture) for lasso-select
- Hold also SHIFT for lasso-deselect
- In Object mode it only selects on object centers now
- In Mesh edit mode it works on same level as borderselect
Not:
- other editmodes or objects in general
Also fixed crash with circle-selecting outside of window edge.
Also put back wire-extra draw for curves (previous trial broke mball wire)
Turned borderselect, circle, lasso into dashed lines for visual language.
Nathan Letwory [Thu, 30 Sep 2004 14:09:17 +0000 (14:09 +0000)]
wrong name!
Nathan Letwory [Thu, 30 Sep 2004 12:48:56 +0000 (12:48 +0000)]
add editmesh_undo.c and windowTheme.c/h so everything links nicely again
Ton Roosendaal [Wed, 29 Sep 2004 22:29:43 +0000 (22:29 +0000)]
Patch/proposal from matt ebb: on changes in material color/shading or lamp
it redraws 3d window appropriate. That it didnt do that was again some
convention from 1995 :)
Result is actually very nice, with cool visual feedback.
I've coded it very friendly, with checks for minimal redraws to do. If thats
still giving interactive flow issues, let me know!
Jiri Hnidek [Wed, 29 Sep 2004 22:28:14 +0000 (22:28 +0000)]
- added support for MetaBall undo in edit mode (Ctrl-Z ... undo) (Ctrl-Y/Ctrl-Shift-Z ... redo)
Jiri Hnidek [Wed, 29 Sep 2004 22:22:51 +0000 (22:22 +0000)]
- Fixed some small bug due to one of previous commit.
MetaBalls are displayed correctly in wireframe mode again
Ton Roosendaal [Wed, 29 Sep 2004 21:44:12 +0000 (21:44 +0000)]
- Previous commit broke selection of non-subsurf meshes :)
- fixed crash reported by SimonC on linked dupli meshes, editmode, set
subsurf on, crash...
Ton Roosendaal [Wed, 29 Sep 2004 21:11:13 +0000 (21:11 +0000)]
Two small fixes;
- draw extra wire on solid displayed curve objects (cyclic filled curves)
now doesnt draw wires of filled faces
- set glPolygonOffset much more narrow now, since we dont need it for zbuf
value selecting
Ton Roosendaal [Wed, 29 Sep 2004 20:38:23 +0000 (20:38 +0000)]
- Removed printf from previous commit
- fixed small counter error in backbuffer color codes, when edge+faces
are drawn
Ton Roosendaal [Wed, 29 Sep 2004 20:04:51 +0000 (20:04 +0000)]
Added code to selection-flush to make sure fgons are selected/deselected
when changing vertex/edge selection
Stephen Swaney [Wed, 29 Sep 2004 18:24:08 +0000 (18:24 +0000)]
fix doc errors pointed out by wavk:
get/setMode() should be get/setFlag(), bitfield order was incorrect.
spellchecked Curve.py.
Ton Roosendaal [Wed, 29 Sep 2004 18:08:04 +0000 (18:08 +0000)]
Pooh pooh! This backbuffer system for selection codes works much easier on
osx with AUX buffers, than on other systems with GL_BACK buffer...
Now i've added a check in force_draw to also redraw the backbuffer, if
needed. ANother weak point in the sublooping system in blender.
Ton Roosendaal [Wed, 29 Sep 2004 16:44:16 +0000 (16:44 +0000)]
Fix for reported error in circle selection...
It had a clumsy if() check... meaning it went to normal selection mode
when zbuffer-clipped selection failed.
Kent Mein [Wed, 29 Sep 2004 16:27:12 +0000 (16:27 +0000)]
Added Dump 3dView and Dump Screen to the File menu
with their shortcuts.
Kent
Ton Roosendaal [Wed, 29 Sep 2004 11:32:08 +0000 (11:32 +0000)]
Found potential crash in undo for Curve/Surface; the global var "lastnu"
wasn't restored on undo.
Ton Roosendaal [Wed, 29 Sep 2004 10:49:19 +0000 (10:49 +0000)]
Two fixes;
- borderselect draws cleaner info in bottom/left corner window
- OGL render (in view3d header) option didn't work on successive renders.
was due to removing hack that reopened the window each time. But now it
needed to be assigned correctly to blender's 'mywindow' system.
Ton Roosendaal [Tue, 28 Sep 2004 22:05:16 +0000 (22:05 +0000)]
Borderselect and circleselect now use backbuffer method too.
Maybe its time to make this a default now?
Ton Roosendaal [Tue, 28 Sep 2004 20:59:14 +0000 (20:59 +0000)]
Removed nantechnologies from identifierstring :)
Ton Roosendaal [Tue, 28 Sep 2004 16:18:22 +0000 (16:18 +0000)]
Cleaned the apply deform code in Blender. Now also using the modifier code.
Right now, it works for Meshes (all deformers including Curve) and for
Curve/Surfaces (only hooks).
More follows.
Ton Roosendaal [Tue, 28 Sep 2004 14:53:44 +0000 (14:53 +0000)]
Last of the beautifying for subsurf+optimal editing; selectmode 'face' now
draws on click the optimal outline correctly
Ton Roosendaal [Tue, 28 Sep 2004 13:58:23 +0000 (13:58 +0000)]
Crash fix;
- wireframe view
- editmode cube
- subsurf + optimal on
- set new selectmode 'face'
thanks sirdude & sgefant!
Ton Roosendaal [Tue, 28 Sep 2004 12:04:10 +0000 (12:04 +0000)]
More maintenance due to new selection code;
- fgons draw correctly again in face selectmode
- on select, fgons dont draw wrong selection dot
Ton Roosendaal [Tue, 28 Sep 2004 11:19:57 +0000 (11:19 +0000)]
Two small fixes thanks to test:
- backbuf draw vertices did still use pointsize 1.0, making them hard to
select
- wire frontbuf draw on select used un-initialized color
Ton Roosendaal [Tue, 28 Sep 2004 10:50:22 +0000 (10:50 +0000)]
Changed valence rule for edgeloop, so it treats fgons OK.
Ton Roosendaal [Tue, 28 Sep 2004 10:16:13 +0000 (10:16 +0000)]
Eek! Commit for 'making transform aware for mesh select mode' caused all
other editmodes to crash in transform()!
Ton Roosendaal [Tue, 28 Sep 2004 09:43:37 +0000 (09:43 +0000)]
Recode of 'zbuffer selection'. I first was too afraid using the backbuffer
selection method, since there's too much trash in drawobject.c and displists...
But, I couldn't stand the zbuf selection to miss edges too often. Right now
both methods are still in the code, and can be reviewed.
Please note for test:
- borderselect and circle-select still use old method
- new selection works directly on faces & edges
- subsurf optimal draw and selection works fine now
To detect the closest vertex or edge, i use the old 'spiral selection' code,
which is extremely accurate. If your mouse is close to an edge, it should
find it.
Most evidently I need to test speed... also, the disadvantage of backbuf
selection is the limited depth, which can be 16 bits (65 k faces) on systems.
Matt Ebb [Tue, 28 Sep 2004 05:04:55 +0000 (05:04 +0000)]
Picky, picky: Removed the question mark from the end of
'Quit Blender?' as per language guidelines
Stephen Swaney [Mon, 27 Sep 2004 23:04:10 +0000 (23:04 +0000)]
fully qualify variable names to fix bug under Solaris.
reported by Casey Corn.
Ton Roosendaal [Mon, 27 Sep 2004 20:19:16 +0000 (20:19 +0000)]
- fixed error in copying selection from faceselectmode to editmode
- removed ancient convention that switches to wire then
Ton Roosendaal [Mon, 27 Sep 2004 19:22:15 +0000 (19:22 +0000)]
Faceloop select recoded, also nonmodal (no loop). It works by clicking with
ALT on an edge, in face-select mode. Holding shift again extends selection.
Current UI access can need rethink though. But I also think the loop tools
deserve to be accessible without menu, for speed/workflow. So what's good
shortcuts!
BTW: both tools don't do triangle meshes (yet)
Ton Roosendaal [Mon, 27 Sep 2004 17:05:30 +0000 (17:05 +0000)]
Added edgeloop selection as mode-less loop-less option.
Hotkey: ALT+select (ALT+CTRL for single button mouse)
Hold shift to extend selection, or to deselect
It correctly does edges on boundaries and loose edges too.
Ton Roosendaal [Mon, 27 Sep 2004 15:08:12 +0000 (15:08 +0000)]
Transform() now is edge/face selection aware too.
Theeth; i've done the changes as local as possible, and lotsa comments :P
Ton Roosendaal [Mon, 27 Sep 2004 10:39:18 +0000 (10:39 +0000)]
Bug fix: on scene append of curve deformer displist causes crash...
Crash is solved now, but create displist fails.
Ton Roosendaal [Mon, 27 Sep 2004 10:12:45 +0000 (10:12 +0000)]
- improvement for edge/face select
- edges now sample on three locationsm gives more hits
- own version of glPolygonOffset remains cumbersome... but for select
now the selection routine gets more offset than draw.
- first attempt to clean drawobject.c and displists
- generic call for draw object in backbuf for select purposes, cleans up
a lot in the other calls.
- also to verify if we can (in future) use this for vertex/edge/face
select, but the whole drawobject code works against me... this is
for another refactory (incl. displist) and out of the focus for now
- subsurf.c: now creates new faces in order of original. Not used yet, but is
handy to recover the original order for selection/paint purposes.
Ton Roosendaal [Sun, 26 Sep 2004 19:55:02 +0000 (19:55 +0000)]
New drawmethod for creases editing (draw creases option) in editmode.
http://www.blender.org/bf/rt3.jpg
It draws a 2 pixel line, growing from center of edge, to denote sharpness.
This works nicely with the new selection modes.
Please note that subsurf-optimal still draws original edge then... but
this didnt work before neither. :)
Ton Roosendaal [Sun, 26 Sep 2004 18:33:29 +0000 (18:33 +0000)]
Fix for the beloveled bevel. ;)
Still could use cleanup for flags though.
Ton Roosendaal [Sun, 26 Sep 2004 17:53:21 +0000 (17:53 +0000)]
Two bugs:
- when adding creases in editmode, and separating that part, displists
did weird things... separate is hackish anyway
- draw faces (transparant) didnt do triangles correctly
Ton Roosendaal [Sun, 26 Sep 2004 17:15:52 +0000 (17:15 +0000)]
New strict 'hide' rules for editmesh & new selectmodes
- vertex hidden, always means edge is hidden too
- edge hidden, always means face is hidden too
- face hidden, only means face hides
This means, that in face mode you can hide a face, whilst in edge mode
the edges will still display.
Please note, that when you have no edges saved in a Mesh, it also doesnt
store the hide flags for it, causing in/out editmode too reset hidden
edges.
Ton Roosendaal [Sun, 26 Sep 2004 14:22:54 +0000 (14:22 +0000)]
Quick commit to fix crash in hide option editmode subsurf... the hide flags
still are not doing it OK... later!
Ton Roosendaal [Sun, 26 Sep 2004 13:45:25 +0000 (13:45 +0000)]
Added initialize code for zbuffer-select option, where it reads larger
parts of zbuffer on border/circle select.
Should speed up quite some.
Ton Roosendaal [Sun, 26 Sep 2004 13:44:15 +0000 (13:44 +0000)]
Fix for crashes when mixed faces/edges were hidden. Not all combos were
correctly checked on in subsurf.c
Nathan Letwory [Sun, 26 Sep 2004 10:56:38 +0000 (10:56 +0000)]
indentation commit -> use hard tabs (as decided in meeting)
Nathan Letwory [Sun, 26 Sep 2004 10:42:16 +0000 (10:42 +0000)]
Correct lib order for linuxers.
Nathan Letwory [Sun, 26 Sep 2004 09:14:46 +0000 (09:14 +0000)]
user_options_dict from appit() were missing bs_globals.
Nathan Letwory [Sat, 25 Sep 2004 20:45:44 +0000 (20:45 +0000)]
note to all: actually adding+commited new files does help a lot.
:]
Nathan Letwory [Sat, 25 Sep 2004 20:44:57 +0000 (20:44 +0000)]
This commit makes a structural change to SConstruct. Many of the functionality for it has been split of in a new package bs. This structural change is in preperation for changes Michel has planned against the option jungle.
More information on the wiki: http://wiki.blender.org/bin/view.pl/Blenderdev/SconsRefactoring
Stephen Swaney [Sat, 25 Sep 2004 20:30:40 +0000 (20:30 +0000)]
Another round in the Great BPy Cleanup:
Run everything thru indent to cleanup spaces vs tabs.
Clean up some of the comments by hand.
BGL.c was not touched due to all that macro wackyness.
There are no functional changes to the code.
Pre-indent versions of source are tagged with
tag bpy-cleanup-
20040925 , just in case.
Ton Roosendaal [Sat, 25 Sep 2004 17:57:46 +0000 (17:57 +0000)]
Two more fixes:
- face centers didnt recalculate at vertex-smooth, vertex-sphere and so
- on edge extrude (meaning the new faces), it now copies face data (material
index, smooth, tface) from the face that shared an edge
Ton Roosendaal [Sat, 25 Sep 2004 16:38:51 +0000 (16:38 +0000)]
Integer version of glReadBuffer with GL_DEPTH_COMPONENT...
reported were errors with ati-linux on using float here.
Code is still there, and can be easily switched back ( if(0) or if(1) !)
Ton Roosendaal [Sat, 25 Sep 2004 16:07:16 +0000 (16:07 +0000)]
Option 'all edges' didnt work anymore... fixed
Ton Roosendaal [Sat, 25 Sep 2004 15:15:26 +0000 (15:15 +0000)]
Zbuf-selection fix: while drawing vertices, it accepted writing in zbuf
for it too... giving (sometimes) no selection, and possible for linux the
solution too!
Ton Roosendaal [Sat, 25 Sep 2004 14:21:09 +0000 (14:21 +0000)]
Two small fixes for previous commit;
- new zbuf-clipped select was always on
- drawing the 'floor' now doesnt write in zbuffer when in editmode
Ton Roosendaal [Sat, 25 Sep 2004 13:42:31 +0000 (13:42 +0000)]
Two nice workflow improvements;
- Zbuffer clipped selection
Based on same algos as for drawing (blender polygon offset) vertices, edges
and faces now are clipped for draw and selection when Zbuffer is used.
Note that it works for endpoint vertices of edges, and for facecenters.
Also works for border and circle-select
- Optimal draw subsurfs
This now draws optimal with faces and edges selected/unselected, hiding the
original 'cage' (mesh) completely.
TODO: edge select, which still uses original (invisible) edge.
http://www.blender3d.org/cms/Mesh_editing_rewrite.425.0.html
Ton Roosendaal [Fri, 24 Sep 2004 18:17:23 +0000 (18:17 +0000)]
All kinds of fixes for new selection modes
- circle-select now works
- delete options for edge/face select work as to be expected.
should check on a better set of choices in menu though
- assign material / select material options work for new modes
- shift+f fill didnt leave proper select flags...
- border select on face-gones (fgons) works
- 'draw normals' and fgons works now
Ton Roosendaal [Fri, 24 Sep 2004 16:06:20 +0000 (16:06 +0000)]
New: Fake Polygons, or Face-polygons, or FGons nicked for now.
Just select a bunch of faces (selection should be valid flat poly) and
press FKEY. Works in fact as selection-group optimizing. Nice in solid
drawmode!
Further some small additional fixes in the whole debugging process.
Found old error in loopselect for triangles, subdivision code, and
selection still.
NOTE: subdivide still works on vertex level only.
Ton Roosendaal [Fri, 24 Sep 2004 12:40:37 +0000 (12:40 +0000)]
- basic code for fake-polygon support (called FGon in code). Disabled now
- hide flags now save correctly in mesh, to restore after going in/out
editmode
- after an extrude, faces/edges could have wrong select flags
(only in vertex select mode)
- new rule for addfacelist(); this now copies edges too, if an example
is provided. That prevents a lot of awkward code, still testing if it
goes as desired though...
Matt Ebb [Fri, 24 Sep 2004 11:45:42 +0000 (11:45 +0000)]
Fixed bug #1581, toolbox wasn't correctly opening the edit mode
transform properties panel.
Ton Roosendaal [Fri, 24 Sep 2004 09:51:16 +0000 (09:51 +0000)]
Very bad typo, causing wrong blocks to be freed when the undostack is
full. Gives crashes on exit...
Martin Poirier [Thu, 23 Sep 2004 23:03:19 +0000 (23:03 +0000)]
MSVC 6.0 projectfiles fixes for new editmesh and bpython files.
Ton Roosendaal [Thu, 23 Sep 2004 22:54:18 +0000 (22:54 +0000)]
Fix for loopcut, didn't work after reconstruct...
Ton Roosendaal [Thu, 23 Sep 2004 22:17:52 +0000 (22:17 +0000)]
Three bugfixes, thnx to irc testing! :)
- separate crashed
- wrong button for 'face dot' theme
- deselect vertex on mouseclick didnt work
Nathan Letwory [Thu, 23 Sep 2004 21:27:16 +0000 (21:27 +0000)]
make sure this also builds on Windows.
Ton Roosendaal [Thu, 23 Sep 2004 21:06:56 +0000 (21:06 +0000)]
Little thing; added recalc normals after subdivide, for face centers.
We have to check on this all over very well.
Ton Roosendaal [Thu, 23 Sep 2004 20:52:51 +0000 (20:52 +0000)]
EditMesh refactory + undo recode
The changelog is very long... it's on the web too:
http://www.blender3d.org/cms/Mesh_editing_rewrite.425.0.html
EditMesh refactor notes (user)
**** New selection modes
When entering Edit Mode for a Mesh, you now have the choice for three selection modes. These are shown as icons in the 3D header (hotkey is being searched for!).
- Vertex Select
Select vertices as usual, fully compatible with how previous version work
- Edge Select
Vertices are not drawn anymore, and selections happen by default on the edges. It is a true edge select, meaning that you can select three out of four edges in a face, without automatic having the 4th edge selected.
- Face Select
Instead of vertices, now selection 'points' are drawn in the face centers. Selected faces also get a colored outline, like for edges. This also is true face select, for each face individual regardless selection status of its vertices or edges.
While holding SHIFT, and press a selection mode, you can also combine the above choices. Now selection becomes mixed, and will behave as expected.
For example; in Edge+Face select mode, selecting the 4 edges of a face will select the face too.
The selection modes and optional drawing modes (like transparant faces, normals, or solid drawing) all work together. All of Blender's mesh editing tools now react to the correct selection mode as well.
Most noticeable it's in:
**** Extrude
Extruding in Edge or Face Select mode allows much more precise control over what's extruded and what should be excluded. Try for example a checker pattern selection, and extrude it.
New is the fixed translation when faces are extruded. This always follows the (averaged) face normal(s) of the old face(s), enabling much easier working in 3D views . A single 'G' (Grab) or 'R' (Rotate) or 'S' (Scale) will change transform modus as usual.
**** Other things to note
- Hiding edges/faces will also behave different based on Select Mode.
- while editing, normals of faces are updated always now
- Border select (BKEY) has 2 different rules for edges; when one edge is fully inside of the border, it will only select edges that are fully inside. Otherwise it selects each edge intersecting with the border.
- in face mode, adding vertices, edges or a circle is invisible...
- "Add monkey" now works as a normal primitive (rotated and on 3d cursor)
- Mesh undo was fully recoded, hopefully solving issues now with Vertex Keys and Groups
- Going in and out of editmode was fully recoded. Especially on larger models you'll notice substantial speed gain.
**** Todo
Add 'FaceSelect mode' functionality in EditMode, including zbuffered selection, display and editing of UV texture.
EditMesh refactor notes (coder)
**** Usage of flags in general
The "->f" flags are reserved for the editmesh.c and editmesh_lib.c core functions. Actually only selection status is there now.
The "->f1" and "->f2" flags are free to use. They're available in vertex/edge/face structs. Since they're free, check carefully when calling other functions that use these flags... for example extrude() or subdivide() use them.
**** Selection flags
EditVert: eve->f & SELECT
EditEdge: eed->f & SELECT
EditFace: efa->f & SELECT
- Selection is only possible when not-hidden!
- Selection flags are always up-to-date, BUT:
if selection mode >= SELECT_EDGE vertex selection flags can be incorrect
if selection mode == SELECT_FACE vertex/edge selection flags can be incorrect
This because of shared vertices or edges.
- use for selecting vertices:
eve->f &= SELECT
- use for selecting edges always:
void EM_select_edge(eed, 1) // 1 = select, 0 = deselect
- use for selecting faces always:
void EM_select_face(efa, 1) // 1 = select, 0 = deselect
- To set the 'f' flags in all of the data:
void EM_set_flag_all(int flag);
void EM_clear_flag_all(int flag);
- the old faceselectedOR() and faceselectedAND() are still there, but only
to be used for evaluating its vertices
**** Code hints for handling selection
If the selectmode is 'face'; vertex or edge selections need to be flushed upward. Same is true for 'edge' selection mode. This means that you'll have to keep track of all selections while coding... selecting the four vertices in a face doesn't automatically select the face anymore.
However, by using the above calls, at least selections flush downward (to vertex level). You then can call:
void EM_selectmode_flush(void);
Which flushes selections back upward, based on the selectmode setting. This function does the following:
- if selectmode 'vertex': select edges/faces based on its selected vertices
- if selectmode 'edge': select faces based its selected edges
This works fine in nice controlled situations.
However, only changing the vertex selections then still doesn't select a face in face mode! If you really can't avoid only working with vertex selections, you can use this call:
void EM_select_flush(void);
Now selection is flushed upward regardless current selectmode. That can be destructive for special cases however, like checkerboard selected faces. So use this only when you know everything else was deselected (or deselect it). Example: adding primitives.
**** Hide flags
EditVert: eve->h
EditEdge: eed->h
EditFace: efa->h
- all hide flags are always up-to-date
- hidden vertices/edges/faces are always deselected. so when you operate on selection only, there's no need to check for hide flag.
**** Unified undo for editmode
New file: editmode_undo.h
A pretty nice function pointer handler style undo. Just code three functions, and your undo will fly! The c file has a good reference.
Also note that the old undo system has been replaced. It currently uses minimal dependencies on Meshes themselves (no abuse of going in/out editmode), and is restricted nicely to editmode functions.
**** Going in/out editmode
As speedup now all vertices/faces/edges are allocated in three big chunks. In vertices/faces/edges now tags are set to denote such data cannot be freed.
ALso the hashtable (lookup) for edges uses no mallocs at all anymore, but is part of the EditEdge itself.
Jiri Hnidek [Tue, 21 Sep 2004 09:09:58 +0000 (09:09 +0000)]
- Cam fixed bug reported by Manuel Bastioni (thanks)
- I fixed one bug too.
Willian Padovani Germano [Tue, 21 Sep 2004 05:28:17 +0000 (05:28 +0000)]
- Blender: added option 'scriptsdir' to Blender.Get();
- small updates to the docs;
- Object: small fix to getMatrix: check during_script() to avoid undesired loops; added old behavior (pre 2.34) as option: .getMatrix('oldlocal');
- tentative fix for bug #1275: scene REDRAW scriptlinks were not being executed (the call to do so was missing):
http://projects.blender.org/tracker/index.php?func=detail&aid=1275&group_id=9&atid=125
added the call in drawview.c, in drawview3dspace(). This causes the scriptlink to be called for each visible view3d, but that's what happens with object redraw scriptlinks, too. Anyway, this is still a test. The place was chosen based on the idea that a scene redraw scriptlink is like an object redraw one, but for all objs in the scene at once.
- Window.Theme: new submodule, to get/set theme options in Blender;
- Added the script save_theme.py (Help menu for now), to save the current theme in Blender as an executable script (currently shown in the Scripts->Misc menu).
There's more work to do for themes, like defining a proper place for them in the interface, adding documentation (for now the added script and the ones it generates can give a pretty good idea of how to use the new module), probably extending themes to support SpaceScript and so on.
Matt Ebb [Tue, 21 Sep 2004 04:09:07 +0000 (04:09 +0000)]
Added Hos' NLA move up/down to the NLA Strip menu. Also enabled
'Strip Properties' there again.
Matt Ebb [Tue, 21 Sep 2004 03:35:36 +0000 (03:35 +0000)]
Added the panel context choices in the 'Panels' menu (buttons
window). Helps for vertical layouts where the tabs are off screen.
Alfredo de Greef [Mon, 20 Sep 2004 23:59:09 +0000 (23:59 +0000)]
test commit
Bugfix for anim crash with xml export and no export dir set.
Alternate relative path using blender function, but wouldn't be surprised
if it still is a problem in some cases for some (windows) users.
Stephen Swaney [Mon, 20 Sep 2004 16:22:32 +0000 (16:22 +0000)]
New bpy method for World module to set World for current scene:
my_world.makeActive()
Contributed by Campbell Barton (ideasman)
Kester Maddock [Mon, 20 Sep 2004 10:41:16 +0000 (10:41 +0000)]
Fix link ordering for blenderplayer.
Martin Poirier [Sun, 19 Sep 2004 19:27:57 +0000 (19:27 +0000)]
Matt's lamp submenu.
And reorganized the #includes in editobject by "modules"
Ton Roosendaal [Sun, 19 Sep 2004 17:44:20 +0000 (17:44 +0000)]
Removed all calls to object_wave in code, and moved it into the
mesh_modifier() in deform.c.
Now wave works on top of hooks, before lattice/curve deform and armature.
But together!
Martin Poirier [Sun, 19 Sep 2004 15:07:16 +0000 (15:07 +0000)]
Fix for scalling bug with Stretch To constraint (practicly same bug as Track To last week, but deeper ramifications since stretch to affects scalling).
Quick description of bug: scalling armature had a weird effect on stretch to bone size.
Martin Poirier [Sun, 19 Sep 2004 14:33:33 +0000 (14:33 +0000)]
Editmesh spliting project files fix (MSVC 6.0)
Matt Ebb [Sun, 19 Sep 2004 14:08:04 +0000 (14:08 +0000)]
Moved the 'Load UI' option from the File menu to the
fileselect window header.
Nathan Letwory [Sun, 19 Sep 2004 13:46:43 +0000 (13:46 +0000)]
Update project files to compile and link with newest changes (editmesh refactoring)
Ton Roosendaal [Sun, 19 Sep 2004 11:50:38 +0000 (11:50 +0000)]
Service: SConscript file!
Ton Roosendaal [Sun, 19 Sep 2004 11:47:49 +0000 (11:47 +0000)]
Part one of editmesh.c refactoring. The huge file has been split in
logical parts, and include files altered to denote internal and external
functions.
include/editmesh.h: internal calls for editmesh_xxx.c files
include/BIF_editmesh.h: external calls for these files
src/editmesh.c: basic alloc/lists and in/out editmode, undo, separate
src/editmesh_lib.c: basic utility calls for all editmesh_xxx.c (no UI)
src/editmesh_add.c: add prim, add duplicate, add vertex/edge/face (UI)
src/editmesh_mods.c: selecting, transforming (UI)
src/editmesh_loop.c: loop tools like knife, loop select, loop subdiv (UI)
src/editmesh_tools.c: other tools (extrude, spin, etc) (UI)
And a new file:
src/meshtools.c: tools for Mesh outside of editmode (normals, draw flags)
Jiri Hnidek [Sun, 19 Sep 2004 10:41:04 +0000 (10:41 +0000)]
- Cam (ideasman) improved speed of exporting
- I fixed indentation
Kester Maddock [Sun, 19 Sep 2004 01:33:08 +0000 (01:33 +0000)]
Convert and use actuators with no target object set.
Certain actuators (Add Object/Replace Mesh/Scene/Track To) used to always require a target, or they would not influence the scene. If the actuator target is always set from Python, this could be annoying.
Jiri Hnidek [Sat, 18 Sep 2004 21:04:23 +0000 (21:04 +0000)]
- Cam added function getUniqueName, which preserve overwriting of existing mesh.
- I removed fixed identing. It uses only tab for identing so Cam will not be fussed anymore:-).
Ton Roosendaal [Sat, 18 Sep 2004 20:15:37 +0000 (20:15 +0000)]
Evil commit! Nothing really changed except;
- EditVlak -> EditFace
- variables called 'evl' -> 'efa'
- functions with 'vlak' in it now have 'face'
Just thought was nice starter for editmesh recode...
Stephen Swaney [Sat, 18 Sep 2004 18:47:03 +0000 (18:47 +0000)]
One small part of the Great Bpy Code Cleanup.
Add cvs $Id tag to files
Chris Want [Sat, 18 Sep 2004 18:36:11 +0000 (18:36 +0000)]
For the Bass* people: pad plus/ pad minus moves nla strips up/down in
the nla editor.
Release note blurb:
Selected nla strips may be reordered down or up in the nla editor using
numpad plus/minus.
Ton Roosendaal [Sat, 18 Sep 2004 18:34:50 +0000 (18:34 +0000)]
- redo now also ctrl+y.
- made undo/redo display of previewrender nice
Ton Roosendaal [Sat, 18 Sep 2004 13:58:35 +0000 (13:58 +0000)]
Found little bug in undo system for editing Font objects. Causing
crash at undo after editing.