Commit Graph

4503 Commits

Author SHA1 Message Date
Matt Ebb
095eb2400a * Fixed a little problem when using both F* keys and header buttons
to change buttons tabs wouldn't switch quite right.
2005-11-10 20:07:17 +00:00
Ton Roosendaal
0dc288371f Bug in previous commit today; sound buttons crashed...
And: renamed "Num" to "Amount" for particle buttons.
2005-11-10 19:51:20 +00:00
Ton Roosendaal
d89a7d530b Fix: editing curves, which are used to guide particles, update particles
now.
2005-11-10 19:27:31 +00:00
Ton Roosendaal
bfddf7f4af - Static particles now draw shaded too!
http://www.blender.org/bf/rt3.jpg
  It uses Material color and specular, like for the solid faces.
- Depgraph Fix for changing object layers, should re-evaluate dependencies
- Fix for setting curves to 3D by default (on adding a Guide field)
2005-11-10 19:00:10 +00:00
Toni Alatalo
4c76b74b00 added changing the extending / extrapolation type of the IPO curves of selected actions in the action editor (to the menu - code to handle hotkey (to rise a popup) is there too but unused & untested now). 2005-11-10 18:12:53 +00:00
Ton Roosendaal
44ed7f25b7 Static particles; rotating the emittor caused an error, this due to a
missing speed vector rotation. :)
2005-11-10 16:55:24 +00:00
Ton Roosendaal
f8845d5d11 The long awaited Particle patch from Janne Karhu
http://www.blender3d.org/cms/New_Particle_options_a.721.0.html

There's no doubt this patch had a lot of good ideas for features, and I
want to compliment Janne again for getting it all to work even!
A more careful review of the features and code did show however quite some
flaws and bugs... partially because the current particle code was very much
polluted already, but also because of the implementation lacked quality.
However, the patch was too good to reject, so I've fixed and recoded the
parts that needed it most. :)

Here's a list of of most evident changes in the patch;

- Guides support recoded. It was implemented as a true 'force field',
  checking all Curve path points for each particle to find the closest. Was
  just far too slow, and didn't support looping or bends well.
  The new implementation is fast (real time) and treats the paths as actual
  trajectory for the particle.
- Guides didn't integrate in the physics/speed system either, was added as
  exception. Now it's integrated and can be combined with other velocities
  or forces
- Use of Fields was slow code in general, made it use a Cache instead.
- The "even" distribution didn't work for Jittered sample patterns.
- The "even" or "vertexgroup" code in the main loops were badly constructed,
  giving too much cpu for a simple task. Instead of going over all faces
  many times, it now only does it once.
  Same part of the code used a lot of temporal unneeded mallocs.
- Use of DerivedMesh or Mesh was confused, didn't work for Subsurfs in all
  cases
- Support for vertex groups was slow, evaluating vertexgroups too often
- When a vertexgroup failed to read, it was wrongly handled (set to zero).
  VertexGroup support now is with a name.
- Split up the too huge build_particle() call in some parts (moving new code)
- The "texture re-timing" option failed for moving Objects. The old code used
  the convention that particles were added with increasing time steps.
  Solved by creating a object Matrix Cache.
  Also: the texture coordinates had to be corrected to become "OrCo".
- The "Disp" option only was used to draw less particles. Changed it to
  actually calculate fewer particles for 3D viewing, but render all still.
  So now it can be used to keep editing realtime.

Removed;

The "speed threshold" and "Tight" features were not copied over. This
resembled too much to feature overkill. Needs re-evaluation.
Also the "Deform" option was not added, I prefer to first check if the
current particle system really works for the Modifier system.

And:

- Added integration for particle force fields in the dependency graph
- Added TAB completion for vertexgroup names!
- Made the 'wait cursor' only appear when particles take more than 0.5 sec
- The particle jitter table order now is randomized too, giving much
  nicer emitting of particles in large faces.
- Vortex field didn't correctly use speed/forces, so it didn't work for
  collisions.
- Triangle distribution was wrong
- Removed ancient bug that applied in a *very* weird way speed and forces.
  (location changes got the half force, speed the full...???)

So much... might have forgotten some notes! :)
2005-11-10 16:01:56 +00:00
Nils Thuerey
67d2dae4a9 - minor fix of snprintf defines for MSVC
- fix for 2d domains was part of the previous checking as well, btw. :)
2005-11-09 11:10:15 +00:00
Nils Thuerey
e3f681da67 - popup menu now aborts by default
- changed directory/prefix input (only 1 string instead of two, more similar to render output settings now)
- changed reading/writing of surface files
- slightly enhanced surface smoothness
2005-11-09 07:56:26 +00:00
Ken Hughes
564b629013 -- When storing a mesh, allow TFaces without defined UV coordinates to use
some default values instead of throwing an exception.  Also use only the
   first four UV coordinates supplied in the list.
2005-11-09 00:38:56 +00:00
Stephen Swaney
960a872431 Bugfix: #3377 Epy docs missing links
Link to sys was broken.  need to be  L{sys<Sys>} for name to match.
2005-11-08 22:11:19 +00:00
Ken Hughes
1ba15893bd -- changes and bugfixes from Cam:
-- calling mesh.getFromObject(obj) with mesh object now also
     copies material properties
  -- mesh.quadToTriangle() takes a parameter to duplicate both
     Ctrl-TKEY and Shift-Ctrl-TKEY actions
  -- assigning None to mesh.verts "clears" the memory allocated
     to the mesh (equivalent of Mesh.New(), but on an existing
     mesh)
  -- exception handler message for mesh.faces[i].uv = [..] more
     clear (uv attribute only accepts tuple, not list)
  -- fixed bug for meshs with deformed verts when deleting verts
     (deformed verts deleted and repacked correctly now, I think)
2005-11-08 21:50:30 +00:00
Ken Hughes
c217188a62 -- Previous commit using PyDict_Keys left new reference around. Change to use
PyDict_GetItem() instead, and clean up string manipulation.
2005-11-08 18:46:55 +00:00
Toni Alatalo
19b75ae86d uh next time i read properly before commit, and not only from the nice webcvs diff.. 2005-11-08 17:57:04 +00:00
Toni Alatalo
15beb7db42 a little tweak to make curve handles always copy the type from the previous handle 2005-11-08 17:47:57 +00:00
Willian Padovani Germano
33648819f7 BPython docs:
bug #3367 reported by Chris Want (thanks): ob.mat documentation was
wrong (was not updated); that attribute returns the world space matrix,
not the local one.
2005-11-08 17:23:20 +00:00
Joseph Gilbert
cd7ca03034 *work around for PyDict_Contains 2005-11-08 16:27:58 +00:00
Johnny Matthews
bcd723c0af Make preview line not draw over hidden areas for loopcut 2005-11-08 15:04:14 +00:00
Johnny Matthews
ea1d6d54d0 #3375
CutEdgeLoop now ignores hidden edges
2005-11-08 14:52:35 +00:00
Alexander Ewering
ece7963545 Just have been told fmodf is C99, so I replaced it with fmod and casts... 2005-11-08 12:56:32 +00:00
Alexander Ewering
bd6d3d1439 Replaced my noble-prize worthy "float modulo" implementation with fmodf(). 2005-11-08 12:53:36 +00:00
Alexander Ewering
5b81dcdfc1 Changed my mind and made the "Strobe" value a float - this way you can get
a strobe effect synced exactly to a beat, for example, by using non-integer
values.

Is it just me, or are there recently a lot of crashes in sequencer when
using audio strips?
2005-11-08 00:46:39 +00:00
Alexander Ewering
543f54aa1d New 'feature' for image/movie strips: Strobe
In the NKEY flying panel, you can set "Strobe" to something other than 1
for only displaying each nth picture of the strip. You know the effect
from movies :)

(I put this into the NKEY panel rather than as a effect because effects
only affect single frames (?) while this rather has to do with the
timing... like "Reverse")
2005-11-07 23:13:00 +00:00
Joseph Gilbert
f09a3611be *armature api for python
- don't get too excited
- allows you to get armatures from a scene
- makeEditable()/saveChanges() puts the armature into out of editmode (pythonically)
- Armature.bones is a dictionary that contains all the bones in the armature and can be iterated
- getters are available for:
name,
roll (dictionary) keys are BONESPACE, ARMATURESPACE
head (dictionary) keys are BONESPACE, ARMATURESPACE
tail (dictionary) keys are BONESPACE, ARMATURESPACE
matrix (dictionary) keys are BONESPACE, ARMATURESPACE
weight
deform_dist
subdivisions
options (list of constants)
parent
children

Setter work only in editmode. Some are not fully implemented.
Type class is embedded in the module. This means the construct is called as follows:
Blender.Armature.ArmatureType()

import Blender.Armature as Armature
arm = Armature.Get('myarm')
for name, bone in arm.bones.items():
...print name, bone, bone.matrix['ARMATURESPACE']

more documentation is forth coming. This is an alpha for this api.
2005-11-07 20:03:32 +00:00
Joseph Gilbert
a39559ea11 *change to the way constants are printed 2005-11-07 19:36:50 +00:00
Joseph Gilbert
cce655b5e7 - warning fixes
* various warnings the python api is putting out
2005-11-07 19:34:44 +00:00
Alexander Ewering
f7c955b18e First part of sequencer attack:
Sequencer image preview finally supports zooming out. Yay!
2005-11-07 13:22:23 +00:00
Ken Hughes
979c28bf06 -- Clean-up of Effect and Particle modules; since particle was the only
remaining effect type, it didn't make much sense to leave things
   implemented in two separate files.  Changes include:
   * two bug fixes (the getChild() and getMat() methods were using floats
   instead of shorts)
   * performing clamping on input values
   * implementing attributes using tp_getset
   * merging Effect and Particle functions: the Particle module exists in
   name only, with the Particle.New() and Particle.Get() functions
   remaining for backward compatibility (they are in fact identical to
   Effect.New() and Effect.Get() functions)
   * update of doc/Effect.py (including remove all old references to wave
   and build effects)
2005-11-07 00:22:05 +00:00
Ken Hughes
0089c0bc53 -- Added Object.effects, a read-only attribute which returns a list of the
particle effects belonging to an object (based on patch from jms)
2005-11-06 22:29:49 +00:00
Ton Roosendaal
25dc3355f4 Bugfix #3358
Deleting a shape key object could crash, when ipowindow open and showing an
active key.

Also: patch from tracker to increase limits of buttons for background image
offset.
2005-11-06 19:02:14 +00:00
Erwin Coumans
dfce9d7d9b minor cleanup. Todo: Does 'testhandles' need to be called after every single ipo_insert_vert ? 2005-11-06 16:50:22 +00:00
Andrea Weikert
d1be55f41c Small fix to allow relative filenames for textfiles. 2005-11-06 16:32:54 +00:00
Ton Roosendaal
58ef9fb366 Modifier fix; new Armature modifier added sets the deform flags on.
(Note; until 2.40 release, these flags are also still in the Armature
Panel, that will disappear then)
2005-11-05 21:51:12 +00:00
Ton Roosendaal
8b8daec576 Another typo in ALT+C convert modifiers; it was copying data from the
wrong object, which worked until a few days ago when I fixed a bug
in add_object(). :)
2005-11-05 21:40:35 +00:00
Ton Roosendaal
ebfd6de1dc Bugfix #3249
Error in BLI_array_randomize(), an unused call in Blender until the
Build Modifier was added. It did a weird modulus I don't really grasp...
somehow that caused the bug (create a corrupt mesh). But why? Dunno...
2005-11-05 21:17:55 +00:00
Ton Roosendaal
ffdde59cf1 Bugfix #3342
Target-less IK, with a hinge bone that has an offset to its parent, didn't
get applied correctly after transform.
2005-11-05 20:02:04 +00:00
Matt Ebb
9bba0e889e * 3D View menus updates. mainly just adding missing functionality
that only had hotkey access before and tweaking organisation of new stuff.
2005-11-05 18:40:07 +00:00
Ton Roosendaal
bb1471878d Bugfix #3237
Selecting Edges in "Cut Away View" (ALT+B) did not work yet for wire view.
Solved it by calculating the closest coordinate for mouse to edge, and
check for that position if it's visible or not.
2005-11-05 18:23:26 +00:00
Matt Ebb
28c487a77c I think I committed something I shouldn't have. Hopefully
this will fix compilation.
2005-11-05 17:19:20 +00:00
Ton Roosendaal
1d85275036 Fix #3256
DXF: when an error message occurs during read, the main call returned
without clearing the used global vars... causing crash on calling again.

ALso: added warning when trying to assign a taper or bevel using Object
itself. (report from opengl tracker :)
2005-11-05 17:14:55 +00:00
Matt Ebb
f12697395b * Buttons window tab cycling
Repeated presses of the F* key to go to a buttons context will
now cycle through the sub-tabs within. For example, when at
a different buttons window context, pressing F7 twice will cycle
through to the Physics buttons tab, pressing F10 three times
will cycle through to the Sound buttons tab, etc.
2005-11-05 16:35:32 +00:00
Ton Roosendaal
11e60da19e Fix #3343
Right after leaving Armature editmode, and entering posemode, the active
bone was not selected (when only the head or tip was selected). This caused
a confusing display of an active but not selected Bone... and not proper
behaviour of UI (buttons) and inserting keys.

Fix #3348

Mirror Modifier, button "Merge Limit" didn't react on left/right click.
2005-11-05 16:32:13 +00:00
Ton Roosendaal
f4d0767b36 fix #3357
- Armature editmode, x-axis mirror edit, didn't mirror alt+s scaling of
  B-Bones

ALso: found out that alpha drawing for Envelope Bones in editmode wasn't
set properly.
2005-11-05 15:52:32 +00:00
Ton Roosendaal
74791c9ed5 Bugfix #3355
calling "Apply deform" from toolbox, with no active object, crashed.
2005-11-05 15:45:26 +00:00
Andrea Weikert
629d954ef3 Fix for #3316: do not convert slashes in the relname in BLI_make_file_string
Also fixed signature to const char* to indicate which parameters can be changed
to make it a bit safer, because constant strings are passed into this function
and changing them caused a crash.
2005-11-05 13:09:43 +00:00
Jiri Hnidek
1d1fd7cd70 - small optimalisation of Matt's code, Markers are copied in one loop,
Matt, admire function BLI_addhead() ;-)
2005-11-04 21:45:44 +00:00
Ken Hughes
a602dcfe5f - JMS's patch which adds GetParticlesLoc() method. I've modified the code
so that it resides in the Effects module instead, with the intent of
  soon merging Effect.c and Particle.c into a single file (and somedat
  removing references to the Effects.Particle submodule)
2005-11-04 20:34:38 +00:00
Ton Roosendaal
4b598feab2 Combined bugreport, bugfix and patch from Vidar Madsen.
He noted that static particles don't work with force fields yet, and
added a fix for it. This however didn't work for the depgraph yet, and
didn't correct the static particle's local space to world coordinates for
the fields. Nevertheless, while reviewing this small patch I thought it
would be fun to add now.

So: static particles now update realtime on forcefield relations. Warning
for potential slowdowns! Also note that work on the real particle patch
still has to be done... something I really will do, but in time. To get
particles correctly integrated in the animation system, quite some new
development has to be done still.
2005-11-04 12:38:46 +00:00
Matt Ebb
1f2a7efd70 Small thing, just filling a gap that we really need here -
Added duplication of markers in the timeline with Shift D
(in the frame menu too)
2005-11-04 11:23:22 +00:00
Ton Roosendaal
8a0befc3fd Bug #3338
While using automatic IK, a pending redraw event could draw the buttons
window again, reveiling the temporal IK buttons. Using them, after grab,
caused a crash.

Also: noticed that the undo push for transform is called too early, so it
saves the state before 'special_after_trans' was called.
Also: in editmode armature, changed shift+A "Bones" in "Bone".
2005-11-03 21:13:20 +00:00