Commit Graph

485 Commits

Author SHA1 Message Date
b4e97c01ff -> Enter/Exit editmode wait cursor flags
The wait cursor was being called during editmode enter and exit for meshes.
This was a problem for several reasons. First of all, python modules like
Mesh now make use of editmode features. These methods that wrap editmode
tools may be called many times during the execution of a script
and lead to the wait cursor rapidly flickering on and off.

The other problem was that the wait cursor wasn't being called for editmode
enter and exit of all data types. This is unified now.

-New Arguments

enter_editmode() should be passed a nonzero integer or simply EM_WAITCURSOR
if the wait cursor is desired. Currently only the python API passes a '0'
to enter_editmode()

exit_editmode() has several options and they are passed in as the bitflags
EM_FREEDATA, EM_FREEUNDO and EM_WAITCURSOR. These flags are defined in
BDR_editobject.h.
2006-09-28 01:55:44 +00:00
3147963237 Bugfix #4983
- Using NLA stride didn't work at all for Motion Blur render... appeared to
  be a typo even, using 'ctime' instead of 'stime'. :)
- When entering editmode on a striding Armature, the position of the
  armature was incorrect (missing depsgraph refresh)
- changes in constraint.c is just a small cleanup, unused 'ctime' arg.
2006-09-17 11:40:28 +00:00
a200194b8b Vertex Parent fix: it gives error if you select > 3 points now. 2006-09-16 13:28:06 +00:00
Ken Hughes
f108325904 ===Python API===
Bugfix for #4971: Scene.unlink() was incorrectly decrementing the datablock
user count whenever an object was removed from a scene, instead of only when
the object's count reached 0.  The Python code was modified to use the
existing free_and_unlink_base() function (with some modifications to allow
specifying a scene).  Also fixed a bug with the undocumented return codes
from the method; it now returns True if the object was found in the scene.
2006-09-08 18:31:09 +00:00
be4e97911d New: vertex-parent support for Lattice.
Works like vertex-parent for Mesh and Curve/Surface. Select one or three
vertices in edit mode, and use CTRL+Select to select another object.
Then press CTRL+P.
2006-09-08 12:05:36 +00:00
824fbff02c Fix to enable copying of the vertex group field for the Curve, Lattice,
Armature and Hook modifiers, and the flag field for the Mirror modifier. These
modifiers should all be copied correctly now.

This fix also means that converting modifiers to mesh with Alt-C now works
correctly (the convertmenu function copies the modifers before applying them,
so it wasn't always giving correct results for the above modifiers before).

The convertmenu function has also been changed to use DM_to_mesh instead of
converting to DispListMesh and using displistmesh_to_mesh, which means that
extra mesh data such as dverts is preserved.
2006-09-08 01:05:57 +00:00
4603f452c2 Animation department feature request: support for vertex groups in Lattices
In a quick glance: (temp image)
http://www.blender.org/bf/rt.png

Main reason is that Lattices are useful a lot for Armature deformation.
Lattices just provide much more precise and interesting control. However,
with only bone envelopes it's very hard to use.

Working with Lattice vertex groups is nearly identical to Mesh:
- on CTRL+P 'make parent' you can choose the deform option now
- In editmode, the buttons to control vertex groups are available
- In outliner you can select vertexgroups too
- Deforming Lattices with Armatures has all options as for Mesh now.

Note:
- No WeightPaint has been added yet. To compensate, the editmode
  drawing for a Lattice with vertex group shows weight values for the active
  vertex group.
- Lattice editmode doesn't undo/redo weight editing yet.
- Softbody for Lattice still uses own vertex weights

Implementation notes:
- derivedmesh weight_to_rgb() is now exported to drawobject.c
- been doing cleanups in code (order of includes, var declarations, etc)
- weightpaint button handling now is generic

I've checked on Brecht's proposal for Custom Element data;
http://mediawiki.blender.org/index.php/BlenderDev/CustomElementData
It could have been used, but that would mean the existing code for
vertexgroup handling and armature deform couldn't be re-used. I guess this
is really a later todo.
2006-09-03 12:16:14 +00:00
433f6c7043 Integration of the Google Summer of Code Modifier Stack Upgrade project. The
main features are:
* Modifiers can now be in any order in the modifier stack
* DerivedMesh now has a standard framework for custom element data to be passed
  through the stack with mesh data (being copied and interpolated as
  appropriate), so modifiers can access whatever data they need
* The modifier stack code has been refactored and a number of bugs have been
  removed
* The EdgeSplit modifier has been added:
  http://mediawiki.blender.org/index.php/BlenderDev/EdgeSplitModifier
* The DerivedMesh modifier has been added:
  http://mediawiki.blender.org/index.php/BlenderDev/DisplaceModifier
* The UVProject modifier has been added:
  http://mediawiki.blender.org/index.php/BlenderDev/UVProjectModifier

For more info, see:
http://mediawiki.blender.org/index.php/User:Artificer/ModifierStackUpgrade
(currently undergoing reorganisation)
2006-08-28 01:12:36 +00:00
2ee42ac01e Huge commit: VERSE
- All code is in #ifdef ... #endif
 - Only make build system is supported and you have to add:
    export WITH_VERSE=true
   to user-def.mk file
 - Blender can share only mesh objects and bitmaps now
 - More informations can be found at wiki:
    http://mediawiki.blender.org/index.php/BlenderDev/VerseIntegrationToBlender
    http://mediawiki.blender.org/index.php/BlenderDev/VerseIntegrationToBlenderUserDoc

  I hope, that I didn't forget at anything
2006-08-20 15:22:56 +00:00
d3028ec70d * Shrink/Fatten for bevelled curves
This is a much faster and easier way to give a bevelled curve a taper, without
using taper curves. Each point on a curve now has a 'radius' value that you can
shrink and fatten using Alt S, which will influence the taper when the curve is
bevelled (either with a bevob, or with front/back turned off and a bevel dept
set). Alt S shrinks and fattens the selected points in an interactive transform,
and you can set an absolute radius for selected points with 'Set Radius' in the
curve specials menu.

See demo: http://mke3.net/blender/etc/curve_shrinkfatten-h264.mov

This can be a quick way to create revolved surfaces (eg.
http://mke3.net/blender/etc/wineglass-h264.mov ) and it would be very
interesting to use this radius value in other tools, such as a 'freehand curve'
tool that would let you draw a curve freehand, with the radius affected by pen
pressure, or even using the radius at each point to control curve guides for
particles more precisely, rather than the continous maxdist.
2006-08-13 07:37:51 +00:00
83d4833fc1 Bug #4641
The ALT+C copy menu had a "Dupli" entry, but that didn't copy group-dupli
yet.
2006-07-08 09:30:23 +00:00
a966a72cd6 Many buttons assumed G.vd existed. found all? buttons that cheashed Blender and made them test for G.vd 2006-06-25 13:58:42 +00:00
92522f4202 * Added and tweaked some missing menu items 2006-06-19 03:31:30 +00:00
b58998729b Last minute patch from Chris Want
Nkey "Properties Panel" now has Dimension ("Dim") buttons too.
This reads from the actual bounding box value to see the size. Note that
dimensions for animated & deformed objects will change per frame.

(Cleaned up buttons layout for patch, and added support for Curve, Text and
Surface objects)
2006-06-12 20:01:18 +00:00
a6c97c90fb Rotation constraint update.
Small fix, but results are at least less frustrating now. It uses the
"compatible euler" function from inserting key positions here, preventing
euler values to be constrainted that differ weirdly.

I've tried several other approaches to get a definite rotate constraint,
but only constraining a single axes seems to me impossible magic still...
2006-06-03 17:21:45 +00:00
46927c0a57 * Whoops, committed something I shouldn't have in the last one. Reverting.
* Added 'Make Local' to the menus. Also a minor capitalisation tweak.
2006-06-01 09:03:43 +00:00
7198a6cf66 Bugfix #4211
"Copy Modifiers" (CTRL+C) only copied a single modifer, when a specific
type was choosen. Now it copies all modifiers with indicated type.
(Like: when you have a X, Y, Z mirror modifier).
2006-05-23 17:49:21 +00:00
db39cdd8dd Bugfix 4158
ALT+C convert for modifiers works again for Armatures etc.
Note; this is another victim of the very confusing derivedmesh...
2006-05-11 13:33:30 +00:00
1e0037045d Bugfix #3961
When using CTRL+L for materials, you can end up with non-existing material
indices in faces. The drawing code then was still happily drawing the old
situation (or something random, its a static array).

This commit checks the maximum amount of materials on an object, and draws
the last available material for a non-existing index. It uses an ugly
global yes, but this code is bad anyway. :)
2006-04-08 15:58:49 +00:00
Alexander Ewering
3be66f6d8d New option for convert-menu font->curve: "Curve (Single filling group)".
Since the text-object remake, it was not possible anymore to 'cut out'
text from, say, a box made by a polycurve, by converting text to curve
and then joining - only the first character would be cut out.

This is because of the filling groups (nu/dl->charidx)
I introduced for getting the vast speedup and the possibility
of overlapping characters.

The new convert menu option now assigns filling group 0 to all of
the nurbs generated.

Maybe filling groups should be exposed in the UI in general for curves -
there are various occasions where they are useful.

(Hint to the UI mafia! ;)
2006-04-04 09:14:07 +00:00
828cab295e Bugfix #4046
Copying constraints should refresh the dependency graph, otherwise the
new relations don't get calculated properly.
2006-04-02 12:45:55 +00:00
3be5302e40 Added proper initialize for curve pointer, fix for commit of march 24th. 2006-04-02 11:41:46 +00:00
Ken Hughes
b174a988ae Bugfix #3772: Allows "Center Cursor" for 3D curves to modify the curve
center's Z location.  An eons-old comment in the code said:

/* Curves need to be 2d, never offset in
 * Z. Is a somewhat arbitrary restriction,
 * would probably be nice to remove. */

I couldn't find any other reason for the restriction other than 2D curves
limit the point's Z component to 0, so added a check to only forve the
center Z to 0 when the curve is 2D.  If there are other reasons for the
restriction, then this commit may need to be rolled back.
2006-03-24 20:39:38 +00:00
dc90a417cb Slight change, when moving the active object out of localview, keep it the activew object. Face Select mode, vpain etc need to complain if act ob isnt visible before the modes are activated. 2006-03-18 15:53:06 +00:00
0b80330384 CTRL+C copy menu now has "Copy UV orco" for curves/surfaces 2006-03-14 11:29:06 +00:00
bbfc41b246 Commit from campbell of march 5 crashes when no object was active and you
do a move to layer...
2006-03-09 22:05:53 +00:00
d51a6020c8 -> Path Select Tool
Added a new tool to the 'W-Key' popup menu in mesh editmode, 'Path Select'.
When exactly two vertices are selected, 'Path Select' will find the shortest
path of vertices between them. There are two methods for determining
the shortest path, one that finds the path with shortest physical
distance, and one that finds the path with shortest topological distance.

Examples:

Original Selection
http://www.umsl.edu/~gcbq44/pathselect.jpg

Path Select - Edge Length
http://www.umsl.edu/~gcbq44/pathselect-shortestphysical.jpg

Path Select - Topological
http://www.umsl.edu/~gcbq44/pathselect-topological.jpg

The tool uses a straightforward implementation of Dijsktra's algorithm
and may be a bit slow on extremely large meshes. As a speedup you can
hide the parts of the mesh that you are not working on and they will
not be searched.
2006-03-08 03:28:17 +00:00
800e6400dc CTRL+C Copy Menu now includes modifiers for Curve objects. 2006-03-07 13:29:25 +00:00
d16254cc2c Rather then just complaining it cant be done, made M move objects out of the current localview.
This is quicker then switching to non localview, de-selecting and going back into localview.
  Test by pressing Mkey in localview.
2006-03-06 01:11:56 +00:00
8da71e806e Added CTRL+L link copy and SHIFT+L link select for group-duplicators. 2006-03-05 22:31:32 +00:00
524a2d24ac New copy option in CTRL+C menu: copy autosmooth settings. 2006-03-02 22:54:12 +00:00
3753d817ab Seam Cutting in Faceselect Mode:
- Mark Border Seam: mark edges on the border of face selection as seam.
- Clear Seam: clears seams in selected faces.
Hotkey: Ctrl+E

- Alt+RMB Click: mark/clear edge as seam
- Alt+Shift+RMB Click: mark/clear seams along the shortest/straightest path
  from last marked seam. The cost of the path also includes some measure of
  'straightness' next to the typical distance to make things work more
  predicatble and edgeloop friendly. Note that this cuts a path from edge to
  edge, not vertex to vertex. That gives some nice control over the direction
  of the seam.

Also includes:

- Removed old LSCM code.
- Fix updates glitches with DerivedMesh/Subsurf drawing in FaceSelect mode.
  Now there's a drawMappedFacesTex instead of drawFacesTex.
- Minimize Stretch menu entry called Limit Stitch.
- Removed the lasttface global, was being set before it was used anyway, so
  might as wel return from a function.
- Moved some backbuf sampling code to drawview.c from editmesh, so it can be
  used by Faceselect and VPaint.
- Use BLI_heap in parametrizer.c.
2006-02-08 21:01:00 +00:00
78c87abeed Wanted feature for curves: a render-time resolution. This option is
located under the 'def resolu' button. If not zero, it assigns this
resolution to a curve on render.
Also copies with ctrl+c menu.
2006-02-07 19:59:02 +00:00
21e7a5f142 Render fix: object-duplicators now give their layer setting to the
duplicates, enabling lighting and layer-render properly.
2006-02-02 19:31:15 +00:00
042d612df2 Giant commit!
A full detailed description of this will be done later... is several days
of work. Here's a summary:

Render:
- Full cleanup of render code, removing *all* globals and bad level calls
  all over blender. Render module is now not called abusive anymore
- API-fied calls to rendering
- Full recode of internal render pipeline. Is now rendering tiles by
  default, prepared for much smarter 'bucket' render later.
- Each thread now can render a full part
- Renders were tested with 4 threads, goes fine, apart from some lookup
  tables in softshadow and AO still
- Rendering is prepared to do multiple layers and passes
- No single 32 bits trick in render code anymore, all 100% floats now.

Writing images/movies
- moved writing images to blender kernel (bye bye 'schrijfplaatje'!)
- made a new Movie handle system, also in kernel. This will enable much
  easier use of movies in Blender

PreviewRender:
- Using new render API, previewrender (in buttons) now uses regular render
  code to generate images.
- new datafile 'preview.blend.c' has the preview scenes in it
- previews get rendered in exact displayed size (1 pixel = 1 pixel)

3D Preview render
- new; press Pkey in 3d window, for a panel that continuously renders
  (pkey is for games, i know... but we dont do that in orange now!)
- this render works nearly identical to buttons-preview render, so it stops
  rendering on any event (mouse, keyboard, etc)
- on moving/scaling the panel, the render code doesn't recreate all geometry
- same for shifting/panning view
- all other operations (now) regenerate the full render database still.
- this is WIP... but big fun, especially for simple scenes!

Compositor
- Using same node system as now in use for shaders, you can composit images
- works pretty straightforward... needs much more options/tools and integration
  with rendering still
- is not threaded yet, nor is so smart to only recalculate changes... will be
  done soon!
- the "Render Result" node will get all layers/passes as output sockets
- The "Output" node renders to a builtin image, which you can view in the Image
  window. (yes, output nodes to render-result, and to files, is on the list!)

The Bad News
- "Unified Render" is removed. It might come back in some stage, but this
  system should be built from scratch. I can't really understand this code...
  I expect it is not much needed, especially with advanced layer/passes
  control
- Panorama render, Field render, Motion blur, is not coded yet... (I had to
  recode every single feature in render, so...!)
- Lens Flare is also not back... needs total revision, might become composit
  effect though (using zbuffer for visibility)
- Part render is gone! (well, thats obvious, its default now).
- The render window is only restored with limited functionality... I am going
  to check first the option to render to a Image window, so Blender can become
  a true single-window application. :)
  For example, the 'Spare render buffer' (jkey) doesnt work.
- Render with border, now default creates a smaller image
- No zbuffers are written yet... on the todo!
- Scons files and MSVC will need work to get compiling again

OK... thats what I can quickly recall. Now go compiling!
2006-01-23 22:05:47 +00:00
827895280f * Added a command to copy NLA strips to the Copy Attributes (Ctrl C) menus. Will be useful for updating versions of armatures, and transferring animation between them. 2006-01-18 13:44:51 +00:00
2af2c2c700 Orange: Display types and variable size for Empties.
This is using instructions from Ton, so hopefully the implementation is ok.
This is really needed here where we are using all sorts of wacky scales, and
empties look too big or too small. Of course we don't want to scale the
empties because there are often things parented to them.

New options are in edit buttons for empties to control the display style
and the size. New styles are easy to add, too. Just needs useful ideas and
minor effort from anyone who wants to.

Support for copying these values has also been added to the Copy Attributes
->Drawtype menu command.
2006-01-13 15:50:32 +00:00
e7285229b8 Tuesday merger of bf-blender into orange branch. 2006-01-10 22:10:14 +00:00
30633421d2 Fixed bug in convert function with Mesh objects.
Objects with no modifier could still be converted, but resulting meshes were corrupt and segfaulted Blender when cycling edit mode.
This tests each mesh object for modifiers before converting.

Resulting metaballs meshes were not visible in wireframe.

Also made the selection context nicer, All new converted objects are selected while objects that are converted are deselected.
2006-01-10 02:01:24 +00:00
bdef14bf81 Orange fix: Lamp ipos were also not duplicated when indicated... old stuff
here! :)
2006-01-09 15:56:47 +00:00
b9eabd976d Orange bugfix:
On duplicating an object with material ipos that has drivers, the new ipos
(if material and ipos were copied) didn't get the correct pointer to the
new driver object (if that was copied!)
2006-01-09 12:18:42 +00:00
f47899fc0f Orange; merger with bf-blender.
(Merging is *not* fun work, especially not with bugfixes in main branch
for code that got cleaned up in the other! Poor Hos... :)
2006-01-03 21:43:31 +00:00
af7e7ab587 Changing the names of the shape copying tools to something that doesn't offend the orange team ;) 2006-01-03 15:22:11 +00:00
80f903ed73 Small commit, hopefully the last Duplicate change.
Made pythons duplicate not redraw, documented adduplicate()
2006-01-02 23:26:54 +00:00
8b0c3de7d9 Changed adduplicate() to take the dupflags as an argument. so faking the Alt Key isnt needed anymore in Blender or python.
Changed Pythons Object.Duplicate() to take keyword parms to enable duplication of spesific data.
Eg- Object.Duplicate(mesh=1) # to duplicate mesh data also.
2006-01-02 10:40:13 +00:00
1276dd73ef Some bugreports from the orangers for Shape Vert Copy :)
1. Selection is now not lost on cancel
2. Subsurf now Updates
3. MMB copys at 100% immediately
4. Full copy removed from menu since due to #3
2005-12-23 15:20:27 +00:00
04e24d868e Additional Shape Vert Copy Tools in editmode WKEY
Copy Shape Verts Blend (interactive blending copy)
Propagate Verts (copys selected verts from current to all other shapes)

UI for interactive needs work and Propagate verts needs tidying up, propagation does not show yet until TAB :(
2005-12-22 21:59:56 +00:00
15766e1612 Copy Shape Verts
In mesh editmode, while editing a shape, select some verts, W Key, "Copy Shape Verts". You will be presented with a list of shapes and once chosen, the selected verts will be moved to the position of the verts from the chosen shape. Most handy use would be reverting part of a shape back to basis e.g.

Making eyebrow shapes, add a key and model the eyebrow shape symetrically with the x-mirror tool
Go out of editmode, copy that shape
Go into each shape and revert 1 side to basis

If the mesh has had verts added/removed since last entering editmode, you need to TAB-TAB first before copying
2005-12-21 21:37:11 +00:00
be0b59ea6d Orange; update commit on WIP project for Noodle editing. :)
- Grabbing works (Gkey) or tweak (LMB) or use RMB click-drag for grab
- Shift+d works
- Akey: select all
- Drawing links works too now!
2005-12-18 23:08:22 +00:00
4f235db6e6 Tuesday merger of Orange branch with bf-blender 2005-12-13 20:32:39 +00:00