Commit Graph

356 Commits

Author SHA1 Message Date
0096d180b9 Dof Object - set the depth of field to an object - set in the camera edit panel but the distance is calculated on the camera object only so linked cameras work.
Alt+Period - sets active pivot

some tooltips didnt make much sense, edited a few.
2007-09-23 18:27:01 +00:00
3a90f211d2 new view option, SolidTex, to draw textures in solid mode.
In the view panel as well as the shortcut Shift+T

this works in editmode as well as object mode

giving results like this
http://members.optusnet.com.au/cjbarton/temp1.jpg

where before you could only see textures in textured draw type like this
http://members.optusnet.com.au/cjbarton/temp2.jpg
2007-09-15 18:12:16 +00:00
b2a8199d4b added a transform panel to the UV/Image window - at the moment it sets UV and teh cursor location.
added a stap menu to the UV/Image window for snapping the selection and cursor.
reverted to drawing face dots in editmode when Limit Selection is enabled. even though its not needed for selection its consistent and dosnt look like modes are being changed.
2007-09-15 10:43:13 +00:00
2a6f7c349c changed how shading works in editmode
Texture Draw; no shading only textures (better for mapping work)
Shaded Draw; textured with shading (in editmode it used to be like solid draw mode)
ZClip Option; dont draw face center dots.
2007-09-14 11:39:53 +00:00
fcd2d30004 * minor changes, edited some tooltips (exr half and zbuf were not that helpful)
* UV coord buttons overlapped others since merging uv/face and editmode.
* added some quad join and triangulate into the Ctrl+F face menu.
* active face cant be hidden anymore.
2007-09-14 06:46:57 +00:00
b2b3b01894 Added UV face rotate and mirror to editmode and re arranged some of the editmode keys
The WKey menu was way too big and not well organized, re-arranged keys like this.

Ctrl+V - Vert Menu  (remove doubles, smooth...)
Ctrl+E - Edge Menu - left as is
Ctrl+F - Face Menu - (flip normals, shading, Rotate and Mirror UV's/Colors)

Wkey menu only has subdivide in it now.

filesel.c - only show the relative paths option if the file is saved, (flag on by default caused the image to silently fail loading on my system, and gave permission errors on a users), also removed a warning.
2007-09-12 10:35:48 +00:00
f6aa903e10 * added functions to copy between UV and vertex color layers.
* added CustomData_set_layer_active_index and CustomData_set_layer_render_index
  since they did not accept values from CustomData_get_active_layer_index and CustomData_get_render_layer_index
* fixed some warnings
* made the colored edge in active face draw mode only display when texture mode enabled.
2007-09-12 02:13:35 +00:00
c08ef3e1d6 Added active drawing in editmode (may need some more work), this hilightes the last selected vert/edge/face, which is needed for moving some of the UV tools into editmode.
Added copy menu for editmode for copying from the active faces material, image, UV's vcols etc,
improved on the current vertex color copy by averaging the 4th color when copying color from a tri to a quad.

And added edge crease and length copy

cerrently verts dont have a copy menu but eventually copy weights would be good.
2007-09-11 14:36:03 +00:00
0bd32f3ac6 Changes to "Face Select" mode
* Does not indicate that UV's exist, nor does it add UV's when used.
* Only accessible for texturepaint, vertexpaint and weightpaint from a button in the header (Paint Selection Mask)
* Not accessible from the mode menu, this is only an option that applies to paint modes.

This dosnt effect DNA, face select (G_FACESELECT) can be enabled at any time but is only used when paint modes are enabled.

Other changes
* UKey is uv unwrap in editmode, Ukey for undo was editmode only anyway.
* UVCalc in editmode adds a UV Layer if there is not one alredy.
* texture draw in editmode does not draw the face dots (they are get in the way of texturing)
* some missing updates were added.
* removed manipulator from when paint modes are enabled since the manipulator is not drawn in the 3d view.
2007-09-10 19:32:44 +00:00
e8a808da24 UV Editing is now done in editmode rather then UV/Face Select mode.
Notes
* you cant edit UV's in the image window in "UV Face Select" mode. (removed UV from the name)
* going into Face Select mode no longer adds UV's and does not need UV's to work.
* The UV Calculation menu is now in editmode (Alt+W)

Todo..
* Image replace - partly broken in stable also.
* Rotate/Mirror UV/VCol are still only in Face Select mode.
* Hide/Reveal is not quite right, (issue with editmode flushing)
2007-09-10 12:26:36 +00:00
19f15f6ab3 Patch #7081:
Submitted by: David Bryant

This patch adds 2 new drawtypes for empties (circle draws a 2d-circle on the x-z plane, and cube draws a regular cube), and allows empties to be used as custom bone shapes.

I've modified the patch a bit to fix up weird formatting, optimising the circle-drawing method, but the cube-drawing function has been maintained. In the process, I also moved the mesh-specific code in draw_object_instance to draw_object_mesh_instance so that empties can be used by whatever else might use draw_object_instance too.
2007-08-28 11:29:54 +00:00
f118bebc36 Textured drawing in Edit Mode
=============================

- In textured drawmode it now draws the texture, with solid mode lighting.
- UVs and vertex colors for subsurf are not computed incremental yet, so
  editing in textured drawmode then may not be as fast as the other modes.

Implementation Notes:
- Added textured drawing functions to the editmesh and subsurf derivedmeshes.
- Removed some unused, legacy subsurf code that directly used Mesh.
- Restructured texture drawing a bit to make it more clear and allow for
  editmode drawing.

(Peach feature request)
2007-08-28 08:53:36 +00:00
c4114780d4 Little code cleanup.
bsystem_time was being called with an extra variable, which was useless. Most of the places that called it, were passing NULL for that variable anyway.

I've also cleaned up that function a bit, but the underlying problems with that part of the code still exist (EVIL GLOBALS that are exported for frame_to_float), for mblur and fields rendering features. That remains for another time.
2007-08-05 09:21:29 +00:00
af55d208f4 == Constraints System ==
After just over a week of coding, I've finished doing a major refactor/cleanup of the constraints code. In the process, quite a few old kludges and ugly hacks have been removed. Also, some new features which will greatly benefit riggers have been implemented.

=== What's New ===
* The long-awaited ``ChildOf Constraint'':
This allows you to animate parent influences, and choose which transformation channels the parent affects the child on (i.e. no translation/rotation/scaling). It should be noted that disabling some combinations may not totally work as expected. Also, the 'Set Inverse' and 'Clear Inverse' buttons at the bottom of this constraint's panel set/clear the inverse correction for the parent's effects. Use these to make the owner not stick/be glued to the parent.
* Constraint/Target Evaluation Spaces:
In some constraints, there are now 1-2 combo boxes at the bottom of their panel, which allows you to pick which `co-ordinate space' they are evaluated in. This is much more flexible than the old 'local' options for bones only were.
* Action Constraint - Loc/Rot/Size Inputs
The Action Constraint can finally use the target's location/rotation/scaling transforms as input, to control the owner of the constraint. This should work much more reliably than it used to. The target evaluation should now also be more accurate due to the new space conversion stuff.
* Transform - No longer in Crazy Space (TM)
Transforming objects/bones with constraints applied should no longer occur in Crazy Space. They are now correctly inverse-corrected. This also applies to old-style object tracking.

=== General Code Changes ===
* solve_constraints is now in constraints.c. I've removed the old `blend consecutive constraints of same type' junk, which made the code more complex than it needed to be.
* evaluate_constraint is now only passed the constraint, and two matrices. A few unused variables have been removed from here.
* A tempolary struct, bConstraintOb, is now passed to solve_constraints instead of relying on an ugly, static workobject in some cases. This works much better.
* Made the formatting of constraint code consistent
* There's a version patch for older files so that constraint settings are correctly converted to the new system. This is currently done for MajorVersion <= 244, and SubVersion < 3. I've bumped up the subversion to 3 for this purpose. However, with the imminent 2.45 release, this may need to be adjusted accordingly.
* LocEulSizeToMat4 and LocQuatSizeToMat4 now work in the order Size, Rot, Location. I've also added a few other math functions.
* Mat4BlendMat4 is now in arithb. I've modified it's method slightly, to use other arithb functions, instead of its crazy blending scheme. 
* Moved some of the RigidBodyJoint constraint's code out of blenkernel, and into src. It shouldn't be setting its target in its data initialisation function based + accessing scene stuff where it was doing so.

=== Future Work ===
* Geometry to act as targets for constraints. A space has been reserved for this already. 
* Tidy up UI buttons of constraints
2007-07-15 03:35:37 +00:00
b7c8eb39ed == Sculpt Mode ==
Removed the draw_flag field from SculptData, moved the two draw flags over to SculptData.flags
2007-06-24 23:02:58 +00:00
88cca5dc1a draw_mesh_fancy was using the original meshes stats rather then the derived mesh (that is being drawn)
This should not change teh way it works currently, however modifiers that add faces or edges need this so they render properly.
2007-06-12 05:59:37 +00:00
0b0f0b0ffb == Bug Fixes ==
[ #6620 ] Problems to select faceloops in Select Only Visible mode
[ #6131 ] Vertex snapping broken in shaded face + edge select mode

Second bug was already "fixed", but that caused the other problem. Forced me to look more deeply into it find the real cause. So, faceloop problem is fixed by revert, the other is fixed by drawing vertice selection colors when in transform (previously was only when vert select was on).
2007-05-01 23:03:17 +00:00
99135b0674 dont use tface hide or select anymore, since maintaining 2 sets of hide/select data for each face is annoying.
using mface->flag for both.

Also found that the cdDM_drawMappedFaces and cdDM_drawFacesTex_common could get normals mixed up when rendering hidden faces. because hidden/invisible faces used continue without advancing to the next normal.
2007-04-29 13:39:46 +00:00
243d1a28c0 Casting fixes for 64 bits. Incomplete commit, discussion on proper casting
has to be finished.
2007-04-29 10:49:02 +00:00
afdd54fa37 moved source and text to american spelling
* colour -> color
* centre -> center
* normalise -> normalize
* modelling -> modeling
2007-04-04 13:18:41 +00:00
Ken Hughes
4e72e4ad2b Fix various gcc warning related to signed/unsigned parameters passed to
OpenGL functions.
2007-03-17 14:15:02 +00:00
86a20402b6 * Visualise material 'Shadeless' a bit better in the 3D View solid mode.
Now it draws as if Ref = Emit = 1.0 - not as accurate as shaded mode,
  but it's better than before, and at least it allows transparency.
2007-03-09 04:19:59 +00:00
3320a39e0d Bugfix #5969
Sculpt: option "Partial Draw" was hanging, causing wrong mesh drawing
outside of sculptmode (and no visible faceselect etc).
2007-02-09 14:05:12 +00:00
39d1d30350 Bugfix #5786
Shaded drawmode, objects with negative scale, did not draw correct.
Error already since 2.37 (commit of may 2005)
2007-01-23 10:03:45 +00:00
9ba6bd556f Fix for bug #5778:
Crash entering faceselect mode in shaded mode.

The cause here is the new system that only preserves data through the
modifier stack as needed. The DerivedMesh and shaded colors could get
freed while still being used elsewhere.
2007-01-22 03:57:41 +00:00
Ken Hughes
727ef00b6b Bugfix for #5487 again:
glDrawArrays() also crashing for some line strips, so replaced with
regular glBegin() and glEnd().
2007-01-19 16:20:58 +00:00
Alexander Ewering
71a503f31d Further tweaks to the textframe drawing code... it was unnecessarily
complicated...
2007-01-15 22:31:22 +00:00
Alexander Ewering
2526702368 Partial Bugfix #5713:
Textframe heights now draw exactly as set in the buttons.
2007-01-15 22:18:42 +00:00
e835a0ea55 Removed draw_mode from SculptData, replaced with draw_flag, which currently controls whether to use partial redraw and whether to draw the brush circle. Added new menu option for display of brush circle. 2007-01-14 04:55:51 +00:00
7d11a67a4e Bugfix #5487 (among others)
glDrawArrays() for a closed line loop (polygon) crashes in some platforms,
but why we couldn't find any reason for.
Replaced code with regular glBegin() and glEnd().
2007-01-10 15:25:02 +00:00
f4ee0f4b4c fixes in rigidbody constraints rigidbody -> IPO baking:
copy system with rigidbody constraint will link new constraints to new objects (instead of old)
fps from blender will be used when baking (left shift/ctrl/alt + P)
2007-01-07 04:54:29 +00:00
0762a5a975 Fixed bug #5582, Subsurfed Multires'd objects don't display properly with interactive display unset. Added a new function for sculptmode that checks to make sure that not only are there some modifiers active, but that they are actually enabled for realtime editing. 2007-01-04 06:11:45 +00:00
59e44e4afa added sharp edge theme color 2007-01-03 05:50:17 +00:00
10137426a6 Bugfix #5487
New glDrawArrays() code used an array size of '1' for drawing Surface
curves/polys. Seems to crash in Linux...
2006-12-26 08:46:58 +00:00
dd5077060e Cleanup of the SDNA SculptData struct. Moved a lot of data that isn't saved into a separate SculptSession struct (outside of SDNA.) 2006-12-25 08:52:57 +00:00
e61dec0767 Defocus Composite Node, by Alfredo de Greef
Log:
http://www.blender3d.org/cms/Composite__Defocus.836.0.html

An incredible quality composite effect, might be slow but worth waiting
for!
2006-12-21 18:11:07 +00:00
47bc3d1208 Added names to UV and vertex color layers, and display them as a list.
Added support for multiple UVs in the render engine. This also involved
changing the way faces are stored, to allow data to be added optionally
per 256 faces, same as the existing system for vertices.

A UV layer can be specified in the Map Input panel and the Geometry node
by name. Leaving this field blank will default to the active UV layer.

Also added sharing of face selection and hiding between UV layers, and at
the same time improved syncing with editmode selection and hiding.

Still to do:
- Multi UV support for fastshade.
- Multires and NMesh preservation of multiple UV sets.
2006-12-21 13:47:27 +00:00
5ffa4dd55a Warning fixes for previous Image commit, also fixed verse_image.c 2006-12-20 18:29:23 +00:00
0e6518731f Use degrees instead of radians for rigidbody constraint axis (euler angles). Radians can't specifiy 90-degree angles precisely, the input is only 3 decimals accurate... 2006-12-18 07:51:12 +00:00
92379ec21f contribution from RCRuiz:
drawing of rigidbody constraint pivots, and allow passing of full constraint frame.
2006-12-16 05:50:38 +00:00
12c0fb9312 Bugfix: Object "restrict render" option was missing in vectorblur
Plumiferos request: Made individual duplicated group objects still check on
the restriction flag, *after* the group-duplicator itself was checked for.
So it works both. (Matt; was urgent feature, hope you're OK? These options
showed in outliner for groups anyway :).
2006-12-12 16:47:18 +00:00
4f8079d49c Modifier Stack: Limit calculation to required data.
This commit upgrades the modifier stack to only calculate the data which is
needed, either by modifiers further down the stack or by other functions at
the end of the stack (e.g. drawing functions).

This speeds up modifier stack recalculation, especially where vertex
groups and UV coordinates are concerned. For example, a mesh with an Armature
modifier followed by a Subsurf modifier would previously have required the
Subsurf modifier to interpolate all the vertex groups in the mesh, slowing
down modifier calculations considerably. With this update, vertex group data
is not propagated beyond the Armature modifier, so calculations are faster.

Note that this depends on the order of modifiers in the stack. If the Armature
and Subsurf modifiers were swapped in the above example, the Subsurf modifier
would have to interpolate vertex groups, as they are needed by the Armature
modifier.
2006-12-05 17:42:03 +00:00
0cc76d831c Large change to the way sculptmode drawing works. The default is now to draw
using the standard drawing functions. Enabling the "Partial Redraw" item in the
sculpt menu will turn on the optimizations which stores unmodified parts of the
color buffer and only redraws the polygons that are within the modified area(s).

The Partial Redraw option uses the accumulation buffer to store the copy, and
unfortunately this is not accelerated on older cards. There are alternatives,
e.g. drawing to an auxiliary buffer or downloading the data from the graphics
card with glReadPixels, but there's no guarantee that these will run at an
acceptable speed on older graphics cards either. For the cards that do
accelerate the accumulation buffer (for nvidia cards, I would assume that is at
least FX5200 and up, and maybe earlier) it provides a very significant speedup.
2006-12-04 05:36:50 +00:00
b36b940807 Changed sculptmode drawing to pay better attention to materials.
This fixes bug #5274, changing from uvmode to sculpt changes lighting model
2006-12-01 01:40:53 +00:00
d2c2df2728 Small fixes for outliner stuff
* Fixed #5294 unselectable objects catching repeated selection clicks in front
of other objects
* Invisible objects stay invisible when other objects are edited
2006-11-27 21:52:34 +00:00
476af8c06a * Dupli objects (dupliverts, dupligroup, etc) now get invisibility based on their
parent object, not the original instantiated objects. i.e, if an object is invisible,
its child dupli objects will be too.
2006-11-21 03:22:34 +00:00
3d29a7c7ef * Tweak to show invisible objects if they are being edited in edit mode 2006-11-21 01:11:59 +00:00
c57d5bca73 Step one in migrating to use glArray calls in Blender
- Curve/Nurbs/Font/MBall now all draw arrays.
- had to flip abgr to rgba in shaded drawing
- Mesh drawing can't be easily done; the indices for faces are not in
  in one chunk. Also need a way to gether trias/quads, per material.

Speedup results are mixed. Something between 2-4 times. Especially for
text it seems to help.
2006-11-20 21:25:02 +00:00
5428f2eb6c * Object level restrictions in outliner
This adds the ability to restrict an individual object from:
- being visible in the 3D View
- being selectable in the 3D View
- being renderable
with 3 columns of buttons in the outliner.

These restrictions are further down the hierarchy than layers, so for example if an object is in an invisible layer, it will be invisible regardless of whether the object's own visibility setting is on or off. This works on a different conceptual level than layers, being better for more quick interaction (like temporarily making a mesh unselectable while you're posing its armature), rather than so much for scene organisation.

The 3 columns of icons can be turned off in the Outliner View menu.

Along with this is some small cleaning up in interface_icons.c and outliner.c.
2006-11-20 05:12:58 +00:00
e435fbc3c5 Added custom vertex/edge/face data for meshes:
All data layers, including MVert/MEdge/MFace, are now managed as custom
data layers. The pointers like Mesh.mvert, Mesh.dvert or Mesh.mcol are
still used of course, but allocating, copying or freeing these arrays
should be done through the CustomData API.

Work in progress documentation on this is here:
http://mediawiki.blender.org/index.php/BlenderDev/BlenderArchitecture/CustomData


Replaced TFace by MTFace:

This is the same struct, except that it does not contain color, that now
always stays separated in MCol. This was not a good design decision to
begin with, and it is needed for adding multiple color layers later. Note
that this does mean older Blender versions will not be able to read UV
coordinates from the next release, due to an SDNA limitation.


Removed DispListMesh:

This now fully replaced by DerivedMesh. To provide access to arrays of
vertices, edges and faces, like DispListMesh does. The semantics of the
DerivedMesh.getVertArray() and similar functions were changed to return
a pointer to an array if one exists, or otherwise allocate a temporary
one. On releasing the DerivedMesh, this temporary array will be removed
automatically.


Removed ssDM and meshDM DerivedMesh backends:

The ssDM backend was for DispListMesh, so that became obsolete automatically.
The meshDM backend was replaced by the custom data backend, that now figures
out which layers need to be modified, and only duplicates those.


This changes code in many places, and overall removes 2514 lines of code.
So, there's a good chance this might break some stuff, although I've been
testing it for a few days now. The good news is, adding multiple color and
uv layers should now become easy.
2006-11-20 04:28:02 +00:00