Commit Graph

47594 Commits

Author SHA1 Message Date
Mika Saari
7ddf38a8b9 Fixing Bug: 3273, Removing my goto calls from font.c. 2005-10-28 15:36:09 +00:00
Matt Ebb
7cfa2ac608 Tiny cosmetic tweak to the outliner, making the
connecting line not so strong to see the other icons easier
2005-10-28 15:25:29 +00:00
Ton Roosendaal
146fea2668 Irc reported bug by Sapir: Shape Key factor slider in Edit Buttons crashed
when no ipo window was opened. Was using an old global pointer. fixed!
2005-10-28 14:24:07 +00:00
Matt Ebb
1bfc5181f0 Tweaks to the camera visualisation:
We decided that the dashed lines were too much,
making the view very busy with dashed parent lines,
lamps, etc. So now the camera lines are drawn solid,
but the arrow (now triangle by andy's demand!) is drawn
outlined for inactive cameras, filled for the active
camera.
2005-10-28 14:19:40 +00:00
Ton Roosendaal
f57481861c New: use ALT+ScrollWheel to step through frames. Like for Arrow keys, it
does not cycle (not jump back to start frame on the end).

Mac users can also use Apple+ScrollWheel btw!
2005-10-28 14:19:22 +00:00
Ton Roosendaal
926d5ebdab Error in creating Python dict for new Mesh API.
It was calling PyModule_AddObject() with unassigned pointer. Crashed on
exit here (python 2.3.2). Weird thing was that python 2.3.5 didnt complain

CVSr ----------------------------------------------------------------------
2005-10-28 13:51:08 +00:00
Ton Roosendaal
4069604736 Fixed gcc warnings for unused var and unitialiazed vars.
NOTE: I had to fix NMesh.c, Mesh_fromNMesh(), that is a real bad
function... it was returning a Py object as a Mesh (on error).
This is still not really solved (NULL return is not handled).
2005-10-28 10:09:46 +00:00
Ton Roosendaal
595447a85e Here's another milestone: Shape Keys now can be inserted in Actions and NLA
It works like for moving Object Ipos to the Action, press the Action icon
in the header of the IpoWindow, to the left of the mode selection menu.
It then creates an Action (if not existed) and moves the Shape Ipo to the
Action, using custom channel "Shape".

Main code change was that evaluating Ipo Curves for Relative Shapes had to
be recoded, but that's pretty minor and even much cleaner. (added "curval"
in the KeyBlock struct).
That this feature can work is thanks to the full modifier/derivedmesh
recode Daniel did, can't give him enough credits! :)

Also; small fixes in Outliner, for clicking on the Ipo icon (sets the Ipo
window to show that Ipo).
2005-10-28 08:11:15 +00:00
Ken Hughes
b729020276 - change description of AssignModes from "blah blah" to something meaningful. 2005-10-27 22:07:43 +00:00
Ton Roosendaal
e61aa11ade Nice one: Transform in NLA with the "Lock" feature, not only draws other
windows, but also evaluates (depgraphed) all Objects involved.
Try select all in NLA and drag around!
2005-10-27 20:53:47 +00:00
Matt Ebb
f0c1040ab7 A few tweaks to the old->new camera conversion code
after chatting with Ton. I've commented out the old file
title safe conversion for now, so we can actually use it in
files worked on now. Have noted to remember to
uncomment it before the new version number bump.
2005-10-27 19:47:01 +00:00
Ken Hughes
a9a545d784 Lots of BPy Mesh additions:
- added faces.uvSel attribute: can get/set selection status of UV vertices in
  UV Editor window
- make mesh.faceUV, mesh.vertexUV and mesh.vertexColor writable: users
  can now enable/disable UV faces, vertex colors, "sticky" vertices
- fixed bug with mesh tool methods: before it would only work if an object
  linked to the mesh was selected
- added mesh.quadToTriangle() and mesh.triangleToQuad() methods
- added selected() method to verts, edges, faces; returns list of indices
  of selected items
- mesh.getFromObject() now gets derived mesh data
- ported vertex group methods from NMesh (required change to Object.c)
- ported module dictionaries from NMesh
2005-10-27 19:37:37 +00:00
Ton Roosendaal
637895d29d Bugfix: Using the "Influence" slider for Constraints popped back to the
keyed positions when an Ipo was assigned to the Constraint.
2005-10-27 17:37:27 +00:00
Ton Roosendaal
bab1603861 Copy scene did not copy the markers... causing in memory errors on quit.
No real baddie, but still very good to fix!
2005-10-27 17:09:58 +00:00
Ken Hughes
3dbe0f0074 - Bugfix #3271: saveRenderedImage() was corrupting memory while trying to
build the filename (thanks for good bug report, Pablo)
2005-10-27 17:09:20 +00:00
Jiri Hnidek
0cf61613d9 - bug fix: clicking at button "Flip Normals" in button window didn't
display changes in 3dview and data wasn't added to undo stack too
2005-10-27 16:54:33 +00:00
Ton Roosendaal
2d960cea74 NLA & Action goodies;
-> Locked Strip length
When changing time of the animation curves in an Action, the strips in NLA
just remained the same length, causing very confusing situations.
By setting the strips to Locked (Nkey NLA window), it always updates the
strip length to make sure all keys are included, and not more. From now on
(not on old files) this is the default strip method.

-> ALT+C clear size
This menu has 2 options, the first clears the size, the 2nd remaps the
action (only when you didnt use the new Lock feature).
Both options are in the Pulldown menu too

-> Key drawing
The weird beveled button in Action/NLA didn't accurately show what time it
was actually on. I've replaced it with an Icon now, diamond shaped, in a
design derived from the TimeLine markers.
2005-10-27 16:25:35 +00:00
Jiri Hnidek
8fc7950455 When you add new face with F key, then blender set up smoothness due to
smoothness of faces in neighbourhood. It tries to set up normal of new
 face due to normals of faces in neigbourhood too.

 btw: this coding was inspired by andy's tutorial at conf in Amsterdam.
2005-10-27 15:19:57 +00:00
Ton Roosendaal
e1047fe69a Another missing .h file for fix for screen handlers 2005-10-27 14:12:16 +00:00
Ton Roosendaal
3c27069c86 Missing include for screen handlers (had to move to kernel level) 2005-10-27 14:11:25 +00:00
Ton Roosendaal
44a9e0538e This is a bit a patch... unforseen issue with the new Screen Handlers.
(Screen handler is used now to trigger animated screen).

When files get saved with Verse_Blender, it has the verse handler set,
which causes the handler system to run without a means to disable it with
release versions of Blender. This patch disables the Verse Handler to be
set on reading files.

Jiri; you will have to uncomment this code when you sync it with your tree!
2005-10-27 13:56:41 +00:00
Ton Roosendaal
00d643091c CTRL+I, pose mode, added accidentally a location constraint, when having 2
Bones selected.
2005-10-27 13:02:34 +00:00
Matt Ebb
dd409399ec Camera visualisation changes and features (from tuho)
* Made the in-camera view dashed border lines less jarring
and disturbing. We will give it some testing here, feedback
is welcome.
* Showing the title safe zone is now an option in the
camera edit buttons. It's not very useful if you're not
making stuff for video/broadcast so you can turn it off.
* Passepartout is now a flag per camera, rather than per
scene. It never really belonged in the render buttons or as
Scene data, though it could be up for debate whether it's
better as camera data or view data (i.e. in the view
properties panel). Old files get converted over nicely with
this so if you had passepartout on before, it stays on the
cameras.
* Added an option to show the current camera's name at
the bottom of the in-camera view, to help keep track of
which one you're seeing when using multiple cameras.
* In the 3D View (non-camera view) the active camera is
drawn with a solid line as before, while non-active
cameras are drawn with a dashed line, to help visualise
which one is active.
2005-10-27 11:28:43 +00:00
Alexander Ewering
c753365403 I hope this commit finally fixes loading of .blend files with text objects
that had been converted to curve with ALT-C.

Should fix bugs 2973 and 3269. Thanks Ken Hughes for a pointer into the
right direction.
2005-10-27 10:01:11 +00:00
Ton Roosendaal
f59827f346 More Orange NLA/Action fixes;
- NLA: Hotkey ALT+S resets (synchs) action start/end in selected Strips
- NLA: Panel for Strips allow setting negative "Action start"
- NLA: When transforming strips, the selected keys for that action don't
  get included (caused weird errors)
- Action: cleanup of drawing horizontal bars.
- Action: Pulldown menu option "Lock time" was in different location than
  for the other pulldowns
2005-10-26 21:13:00 +00:00
Ton Roosendaal
79f6a4b822 Orange bugreport:
The new "lock time" option for ipo/action/nla/time/sound windows did not
work proper... it could accidentally activate other windows, confusing the
2d settings.
2005-10-26 20:02:31 +00:00
Ton Roosendaal
f63e464c0e Orange bugfix;
Border select in Action window didn't get corrected for NLA time.
2005-10-26 19:42:32 +00:00
Ton Roosendaal
ccfc821412 Orange bugfixes in NLA editor;
- ALT+C "convert action into strip" didn't calculate the mouse position
  correct. Also changed menu a bit to tell which action it makes a strip
- Select action strips  now activates Object too
- Icons in Object 'row' (denoting NLA override or not) now draw blended
2005-10-26 19:34:32 +00:00
Ton Roosendaal
d5617f7f59 Default openGL material had a tiny ambient set, causing black to be not
black really! :)
2005-10-26 19:00:40 +00:00
Ton Roosendaal
968423bf07 Fix for vertex/weight paint, so it evaluates the subsurfed vertices for
applying paint. (Until now it used non-subsurfed vertices).
2005-10-26 18:48:53 +00:00
Ken Hughes
ed8be044d9 - make getMeshDerivedMesh() initialize flag setting for new vertices (needed
for BPy Mesh to get derived mesh data)
2005-10-26 17:36:02 +00:00
Ken Hughes
61ecf16197 -Bugfix #3207: ALT-C on a mesh with modifiers would cause memory corruption.
We make a copy of the mesh and perform operations on the new object using
   mesh_create_derived_no_deform() for the new object instead of the
   original.

   Would be really nice if Daniel would look this over to see if it's really
   fixed, or if I've just moved the problem somewhere else. :-)  I'm leaving
   the bug report open until the fixed is verified.
2005-10-26 17:33:31 +00:00
Johnny Matthews
94915fde5f Python API Additions
New
Ipo Drivers access in IpoCurve
key.getChannelIpo(index) returns the ipocurve of a given shape index

Docs included for usage :)
2005-10-26 16:30:50 +00:00
Matt Ebb
5463fe20b9 * fixed a problem where you couldn't select a timeline
marker on a frame < 0. Weirdly enough, it seemed to be
deliberate, with the line:
if(cfra < MINFRAME) cfra= MINFRAME; )

I removed this, but if whoever wrote it has a good
reason why it should be there, please let me know!
2005-10-26 13:43:55 +00:00
Ton Roosendaal
5d291535c6 Disabled CrazySpace when 'proportional edit' is on... I discovered both use
the eve->vn pointer to store temporal data. Need a better solution, do it
later. This just prevents crashing!
2005-10-26 10:49:19 +00:00
Ton Roosendaal
c648e790be New: CrazySpace [tm] correction
When Modifiers are used in Edit Mode to show the deformed result for
editing, all actual coordinates Blender works with are still the ones from
the original Cage. You can notice that with the Transform Widget or
helper lines while transforming.

Even worse, the actual transformations still happened on the original Cage
as well, making it very hard to edit. That caused the feature to be named
"CrazySpace" (baptized by Andy, afaik?).

This commit calculates the deformation transformation per vertex, and
inverse corrects it, so it's more intuitive editing this way.

Unfortunately all the deformation features of Blender don't use matrices
for defining deform, so the existing code cannot be re-used to retrieve
the correct deformation matrix per vertex. The solution I found is based
on calculating per face the transformation based on its first 3 vertices,
and store this transformation averaged in the face's vertices.
The solution can also only work on entire faces, because the full deform
can only be retrieved using 3 vertices. (using 2 vertices will miss edge-
aligned rotation, using 1 vertex can only retrieve translation).

By deriving the deformations per face, small errors will still happen,
especially on very low-poly Meshes with extreme deformations.

The only alternative I know now, is providing each vertex in
a mesh with 2 extreme small tangent vectors, which get deformed using the
existing code as well. That will mess up the existing deformation code too
much though, this solution has the benefit it works with each deform we can
up with later too.

Last note about CrazySpace: it can only be used to tweak Meshes. Do not
even try to add vertices, extrude, or duplicate. Probably we should disable
this... but preventing user errors isn't always power-user-friendly, eh. :)
2005-10-26 09:56:52 +00:00
Ken Hughes
b970e55df2 fix access of pointer before its assigned 2005-10-26 00:54:53 +00:00
Andrea Weikert
ded4709a9d FIX: BLI_makestringcode called with bad pointer mainl->curlib
Moved call to before blo_join_main where pointer gets killed.
Otherwise Blender crashed when appending a file and selecting
relative filenames.
2005-10-25 20:19:31 +00:00
Ton Roosendaal
129097a097 Bugfix #3231
Constraint Ipos didnt work when the bone/channel had no Action Ipo...
just had to move a line of code. :)
2005-10-25 19:40:13 +00:00
Ton Roosendaal
8a21421e54 New; Rotation Constraint allows to only copy X,Y,Z axis rotations.
Note this is based on eulers, so might give the common issues. :)
For most cases it goes fine though, especially with only 1 axis constraint.
2005-10-25 19:13:04 +00:00
Ton Roosendaal
7fc4cf930c Bugfix #3232
When a file was loaded with curves in invisible layers, the displists
were not created.
2005-10-25 18:48:18 +00:00
Ton Roosendaal
ce85adc780 Bugfix; appending with using relative paths made all dynamic links from
other libraries local.

Also added some securities in the temporal 'sync pose' testing code. It now
asks with a menu to confirm the object to be replaced too. Later more!
2005-10-25 18:22:34 +00:00
Joilnen Leite
557f951ebc getMarked return change to dict
.
2005-10-25 18:12:27 +00:00
Chris Want
2efaa059b5 Fix for when knife tool (with path setting) is terminated with ctrl-Enter.
Also, updated the little helper line on the status bar to indicate that
terminating with ctrl-Enter leaves only the verts on the cut line
selected.

Johnny: Please review.
2005-10-25 17:43:22 +00:00
Ton Roosendaal
77ad2928c3 First commit, for test, for using Library files for synchronizing partial
data. This functionality is going to be in Outliner, for now only use
for testing while consulting me. :)

Usage: New option in SHIFT+F1 append window, "Sync Pose". When pressed, you
can append/load an *Object* of type Armature, this then replaces its
Armature and Pose with the selected Objects. After that it deletes the
appended object.

Note: it currently appends also Objects when used in Pose Constraints...
2005-10-25 15:58:51 +00:00
Ton Roosendaal
6894526265 Subdivide recode assistance!
- Added subdivide sck upport for vertex groups
- Brought back subdivide-smooth, but it doesn't work as good as before yet,
  it used to catch an exception for subdividing the middle vertex of a quad,
  with edge-based subdivide it's not that simple. Will check later.
- made "number of cuts" a static variable, so it doesn't jump back to 2
  all the time

Coder level notes:

- removed the old subdivide code (yay, over 30k code less!)
- did some minor layout cleanups in the new code (just consistant syntax)
- removed redundant code parts, to enable smooth & vgroup subdiv
- subdivide smooth can do multiple cuts too, but i like to see that only
  as option when our smooth formula is good!

Compliment:

I think Johnny really made comprehensible design and nice code here. Was a
joy to work with. :)
2005-10-25 13:57:37 +00:00
Alfredo de Greef
d21d255389 fix for bug #3193, winmat was not calculated properly because of
some previously uninitialized parameters.
2005-10-25 09:30:54 +00:00
Ken Hughes
edd998c042 -Bugfix #3254: Ipo.addCurve() didn't check if curve already existed before
creating (reported by Toni)
2005-10-25 04:46:49 +00:00
Brecht Van Lommel
4212796628 More bugfixing related to #3149:
Drawing of rotation limits and IK solving was wrong with pose mode
bone offsets.

Also added proper modifier stack update after uv unwrap and lscm.
2005-10-24 22:20:30 +00:00
Jens Ole Wund
0a3993ec0f cleaning up
- removed euler branch in favor for a 'better solver to come'
- removed some debug vars from lattices
- removed some garbage related to 'borrowing' collision from particles
note SB collision is completly decoupled from particle stuff to allow
: 1. SB collision targets can be 'anything evaluated by modifier stack' but won't be subsurfed (for performace reasons / possible though / see comment in code)
: 2. SB <-> SB collisions
: 3. ( 1. implies that SB collision targets may be animated, hooked,  curve deformed ,  .. ! )
2005-10-24 22:13:32 +00:00