implementations
- updated drawobject selection code to use DerivedMesh (last DispListMesh
usage in drawobject.c that needs to be replaced! Woot!)
- interface could still be a lot cleaner, mostly calculating indices for
the various things to pass to selection color routine is hacky.
- Switch to using DerivedMesh interface for draw_mesh_object.
- Code builds a "fake" DerivedMesh for Mesh/EditMesh which ends
up making code a lot clearer.
Plenty of work to be done - the DerivedMesh is still very specialized
to how the code draws which means it is not a very general interface
and is a little messy. Should work though I hope.
into drawobject.c (just used for calculating weight
map)
- removed two_sided (replace with glLightModeli calls)
- huge rewrite of drawobject.c for meshes, extracting simple
drawing functions and then reworking to bring some order
and clarity back to the code.
A lot was changed here so it is likely I missed a few
things in testing although I tried to be very careful.
Please let me know if you find any changes in drawing.
- center of rotation for camera in cameraview rotate has to remain the
camera center itself, drawing the dashed helpline then doesn't work,
since it's behind the camera clipplane. Just disabled that line.
- made MMB switch for cameraview grab to become quadratic, for a dolly
this feels OK, and makes it possible to move in small and large scenes.
- restored SHIFT modifier for translation and scaling. This based on old
convention that allowed precision editing on top of the transform you
already applied before pressing SHIFT.
Solved it with a new flag (T_SHIFT_MOD), since the G.qual cannot be
used. Transform() innerloop has to detect the SHIFT event itself.
Also coded it with storing the mouseposition while SHIFT event happened.
Hope Martin can approve! :)
- Martin's last commit made Manipulator Translate not work, it passed on
a zero translation to the constrainter, causing NaN's. Nicely catched the
exception.
- Fixed 'Trackball' to accept number input too
- 4th rotation widget styling, activate with Scene buttons, Anim panel, "rt"
on "4".
- drawing constraint lines replaced with widget compatible styling.
(functionality unchanged)
Fix;
- click on center for Rotate widget didn't switch to local/normal in all
cases
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)
To use; press the (temporal) icon in header. Switching widget types is by
pressing G, R or S once, if current widget type is different it switches,
otherwise it goes to normal Transform().
Widgets need a bit test for picking accuracy, correct drawing etc.
The rotate widget has a center button for 'trackball' rotate. That latter
can also be used for hotkey-based rotate.
In current code, all widgets remain in "Global" space, also in editmode.
Also widget updates while using normal transform has to be done.
2 Bugfixes:
- rotate in PoseMode had error for 2d 'around' center
- transform in postemode could crash, due to typo (& or |)
Silly 2.36 bug! In FaceSelect mode, other solid objects didn't show. Bad!
Additional; when using Halo material, and setting 'X Alpha', and disabling
Halo option, the 'Only Shadow' option turned on... uses same bit...
No time for real fix here, so for now the bit is always cleared after
disabling Halo.
- fixed warnings in compile (transform.h struct defines)
- drawPropCircle was on wrong location in editmode
- removed prop circle drawing for old transform (sorry, but we're going to
move soon anyway!)
- removed spaces from transform.c
It used to be a simple hack, scaling lens with 100, and moving the camera
to the back with an equivalent amount.
Because of the hack, making it 100% compatible with older files I could not
achieve (yet?). To help reminding users, I've added a print when reading
old files with Ortho cameras.
Full description of how it works can be found here;
http://www.blender3d.com/cms/Render_changes.515.0.html
Cleaned code somewhat (half the size!) and applied some changes:
- made it compatible with selection flags for new mesh editing (edge/face)
- renamed 'face angles' to 'edge angles' and made it display angles for
2 selected edges too
- removed the confusing convention that always drawed the info if one
of the vertices of edge/face/angle was selected. now it only displays on
minimum of 1 full edge or face selected.
- made it react to "zbuf occluded selection" option (for zbuffered text)
- made it also colorize text for white theme color (TH_TEXT)
On larger meshes this info still draws very confusing. The idea of displaying
the info on 1 vertex selected was probably to show values while grabbing,
although that didnt really work for angles. One idea could be, for transform,
that it draws all lenghts/angles/areas that get changed during transform
All in all, still useful addition tho!
Render:
- New; support for dual CPU render (SDL thread)
Currently only works with alternating scanlines, but gives excellent
performance. For both normal render as unified implemented.
Note the "mutex" locks on z-transp buffer render and imbuf loads.
- This has been made possible by major cleanups in render code, especially
getting rid of globals (example Tin Tr Tg Tb Ta for textures) or struct
OSA or using Materials or Texture data to write to.
- Made normal render fully 4x32 floats too, and removed all old optimizes
with chars or shorts.
- Made normal render and unified render use same code for sky and halo
render, giving equal (and better) results for halo render. Old render
now also uses PostProcess options (brightness, mul, gamma)
- Added option ("FBuf") in F10 Output Panel, this keeps a 4x32 bits buffer
after render. Using PostProcess menu you will note an immediate re-
display of image too (32 bits RGBA)
- Added "Hue" and "Saturation" sliders to PostProcess options
- Render module is still not having a "nice" API, but amount of dependencies
went down a lot. Next todo: remove abusive "previewrender" code.
The last main global in Render (struct Render) now can be re-used for fully
controlling a render, to allow multiple "instances" of render to open.
- Renderwindow now displays a smal bar on top with the stats, and keeps the
stats after render too. Including "spare" page support.
Not only easier visible that way, but also to remove the awkward code that
was drawing stats in the Info header (extreme slow on some ATIs too)
- Cleaned up blendef.h and BKE_utildefines.h, these two had overlapping
defines.
- I might have forgotten stuff... and will write a nice doc on the architecture!
In unified render, halos can give black/colored overflows. Found it this
happens with halos that are behind the camera clipping range. Halo clip
just had some weird code for panorama corrections...
In the provided .blend of report found 3 more glitches;
- after render particle system with Material Ipo, values for material were
not restored correctly
- Meshes with particles didn't draw axis (draw extra) on correct location
- Same as above, axis didn't draw in selected color.
- Mesh editmode; SHIFT+F fill didnt set default vertex color
- Parented spotlight had wrong (black) dashed line to parent when selected
- Constraint line draw while transform wasn't reset, causing sometimes to
draw when using the (ugly) G.moving flag...
for our interactive 3d artists!
- AL+Z (potato) texture view now draws objects without Texture Faces
compliant with (new) default in engine. Meaning lit faces, using
Material RGB for diffuse and specular. It used to draw these as 'shaded'
which is quite useless.
Per definition, Potato mode is supposed to show what engine draws.
(Note; this only for Mesh objects)
- Added a couple of more calls to ensure Shaded drawmode updates on
changing RGB sliders, moving lamps to layers, or switch layers
This based on feedback from Mal, who'll also give it all good tests.
- Mesh editmode, draw 'bleeding edges' works again for subsurf (not optimal)
- New draw method (again!) for armature-add-bone loop. Should work now! Is
also nice for cpu this version
- Draw screen edges (black lines inbetween windows) should not draw leftmost
Deformed meshes (by armature for example) didn't get drawn correctly
for vertex paint, weightpaint, UV faceselect. Was OK in 2.34 :)
Additional to that I found out vertex paint doesn't correctly use the
'Area' option, when a mesh was deformed. That was an oldie.
Plus; made tooltips for 'Area' and 'Normals' in Paint Panel clear.
borkened this... )
- Improved rule for adding face (FKEY); it now checks first for existance
of 4 connected edges, if that exists a face is created anyway, otherwise
it does the convex test. Alexander correctly noted that for subsurfs
non-convex quads should be allowed anyway. Hope this rule satisfies it.
- Curve Join now moves all curves to 2D (if its 2D)
- FGon extrude keeps FGon flags correctly
- After Append undo-push added
- In almost all Ipo editing commands; undo-push added
- Icons in outliner now all consistant grey
- Zoffs button had to 20 high (hmetal :)
hopefully prevents weird results in grabber... error was that the
editNurb was not used for triangulating.
Also; added drawing the wire as extra in solid display editing curves...
that for unfilled curves as well.
Deleting only-faces from fgon still draws wires hidden in editmode.
Added extra: when mesh has no faces, it draws wire in solid view, also
doesn't draw the 'fat' outline for selection.
- in Solid draw mode, curves without faces draw as wireframe now
- in Solid draw mode, curves without faces don't get fat outline on select
- in Solid draw mode, editing curves shows filled now!
- 1702; edge selection should be evaluated properly before adding face
- 1704; crash in separate, two causes here:
- separate didnt make selection flags consistant (needed badly
there because of evil code)
- after adding quad (Fkey) the face was not selected, but its
vertices were... that can give bad bad crashes
- Individual faces
Keeps Mesh manifold, so removes old faces always. Also uses a
transform based on different vectors per vertex.
- Only edges
Just extrudes the edges (not really 'individual', the edges still
share the vertices. Uses same transform as normal extrude for that
reason
- Only Vertices
Uses normal transform after extrude
Also changed code a bit, to detect whether to call a normal-based
transform after extrude, or whether to call normal grabber. For example
when you just extrude 1 edge, it uses normal grabber.
Note; extruding an entire sphere goes OK with 'individual faces'. for
other extrudes you should press 's key' when in transform. Just cannot
predict (yet) when one method has preference over another.
- ALT+B loop edge select loop
- SHIFT+R loop face select loop
(both work with ALT+select too)
- CTRL+R loop cut
- Kkey menu, loop select/cut and knife
- and ALT+select on edge always selects a loop now
The outliner is a hierarchical diagram displaying a list of data in Blender
and its dependencies. The 'databrowse' doesn't really show it, and Oops is
too chaotic still. And most of all, the former two don't offer much tools.
After discussions on irc, Matt came with this design proposal;
http://mke3.net/blender/interface/layout/outliner/
Which is closely followed for the implementation.
The current version only shows all 'library data' in Blender (objects,
meshes, ipos, etc) and not the 'direct data' such as vertex groups or NLA.
I decided to make it inside the Oopw window, as an option. You can find the
option in the "View" pulldown, or directly invoke it with ALT+SHIFT+F9
Here's a quick overview of the Outliner GUI:
- Header pulldown has options what it can show (Visible = in current layers)
- click on triangle arrow to open/close
- press AKEY to open/close all
- Leftmouse click on an item activates; and does based on type a couple of
extra things:
- activates a scene
- selects/activates the Object
- enters editmode (if clicked on Mesh, Curve, etc)
- shows the appropriate Shading buttons (Lamp, Material, Texture)
- sets the IpoWindow to the current IPO
- activates the Ipo-channel in an Action
- Selected and Active objects are drawn in its Theme selection color
- SHIFT+click on Object does extend-select
- Press DOTkey to get the current active data in center of view
TODO;
- rightmouse selection; for indicating operations like delete or duplicate
- showing more data types
- icon (re)design...
- lotsof options as described in Matts paper still...
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