Object duplicators didn't draw when not selected. Was one 'else' to many in
the code!
Also noticed that duplicators couldn't be transformed when they have Ipos,
was an improper call to do_ipo in duplicator code... also made sure the
transformation info in the object is stored/restored before duplicating.
Using Proportional edit on a Lattice with option "Outside" crashed.
Was caused by not checking for the hide flag while counting amount
of transformed elements in Lattice.
When using 'protection flags' for XYZ rotations, inserting keys in
Poses resulted in wrong interpolations (doing -270 degrees instead of
+90 for example). This caused by converting quaternion to euler and
back...
Solved it by correcting the quaternion in the end for the rotation
sign of the original quaternion.
NOTE: Pose animators should be aware that inserting rotations keys of
180 degrees or larger will still make the key rotate along the shortest
path.
Extrude faces assigned arbitrary colors to the new faces when an edge
shared 2 faces with different colors. Now only assigns colors for the
selected faces.
a good revision :)
This now cycles through all number/text buttons in a Panel. At the moment
it skips buttons with tab completion (object names, bones, constraints)
Press SHIFT+TAB to cycle backwards (any modifier will do btw).
This adds Radiance HDR image file support. So now at least we can save
the 'fbuf' (4x32 bits float colors) in Blender.
It doesn't change anything for internal support in imbuf for floa colors,
so when reading .hdr files it still converts it to 32 bits RGBA.
As an extra I've added that saving images with F3 now also adds the
optional extension, when the F10 "Extensions" option is set.
One important note; I don't know the proper license for the code, it was
provided without... will await feedback from Alfredo about it. For now
I've added the standard Blender GPL header.
-> Scene set was not drawn in greyish wire anymore
Also made sure all colors as used for scene set and dupli's now use a
proper call to the ThemeColors, so it blends between choosen wire color
and background color.
Oops drawing speedup:
* Doesent draw splines that are totaly out of the view (big speedup)
* Changes the spline resolution based on its size on the screen (smaller
speedup)
* Draws highlighted lines ontop of unhighlighted lines, makes it easy to see
where selected data links to.
* Text changes size with zoom.
* Text draws better at small sizes.
This fixes an error in the striding system, which was by default correcting
path position backwards in time, which could give errors when a stride bone
moves in the beginning of a path faster than the path moves. (Can you
follow that? cool!)
The patch checks for this case, it corrects by default forwards in time,
unless we're at the end of a path. As bonus this fix will also ensure the
character stays on the path closer.
Textbuttons now allow a selection too (like any textbutton in other UIs).
By default, on activating a textbutton, the entire button text is selected
when you enter the button. A single arrowkey or LMB click reveils the
cursor then. Here's more user notes:
LMB click: If inside the button, places the text cursor at the clicked
position. If outside the button, confirms/finishes editing
LMB drag: Selects the text between the start and end point of the drag.
Backspace: Deletes selected text, or backspaces a character
Shift Backspace: Deletes all, as before.
Delete: Deletes selected text or forward deletes a character
Shift LeftArrow: Extends the selection left
Shift RightArrow: Extends the selection right
LeftArrow: If there's a selection, move the cursor to the left edge of the
selection, otherwise move the cursor left a character.
RightArrow: If there's a selection, move the cursor to the right edge of
the selection, otherwise move the cursor right a character.
UpArrow/Home: Move the cursor to the beginning of the line
DownArrow/End: Move the cursor to the end of the line
Ctrl Left arrow and Ctrl Right arrow to jump between directory separators
had a shadow in memory there was an issue ..
yes, spring calculation should care for scaling in object matrix
so here it is
note: for meshes the bp array is abused for caching -->
only 1 matrix multiplication compared to 2 per spring
(Non deformed) lenghts. Code for lattice (by Jens Ole) was already there
btw, was replaced accidentally by Daniel during his modifier craze :)
ALso added comments in code to clarify the softbody initialize flow, which
happens in 2 stages now. Goal weights and springs are read from the
original data, the vertex coordinates from the modifier data.
represents whether shadows are on for that lamp or not. Now, it properly
takes into consideration what type of lamp it is, and whether it can have
whatever type of shadow.
Things like this, and the inner spot circle representing the Spot Blur should
really be documented somewhere, I'll make a note.
* Decreased the size of the hemi lamp arcs.
Patch prvovided by Guillermo, code was - afaik - from Rob Haarsma.
This changes the toolbox (space menu) to have the first level aligned
vertically. Works much easier that way, and since the items open either
left or right, it doesn't flip order of the contents for it either.
To allow people to test (and to compare) it's a user menu setting (in
View & Controls, "Plain menus"). I've turned this on by default though,
since I propose to not have it a user setting. User setting can be
removed later.
Fixed two bugs in patch:
- if saved in user settings, first time usage of this toolbox opened in
wrong location
- Button for "plain menus" was writing a short in an int
(causing this new menu not to work for big endian systems)
As a bonus I've added the long wanted hotkey support for opening and
closing sublevels of pulldowns with arrow keys!
I didn't add the commenting out of correcting pulldown menu order, which
is based on location of the originating button in the UI. This uncommenting
didn't solve anything, since button definitions itself can be flipped too.
(Example: the data brose menus in top bar need to be corrected).
I can imagine the order flipping is sometimes annoying, but it still has
reasons to be there;
- the most important / most used items are always closest to the mouse.
(like opening properties panel, or "Add new" for material.
- it follows muscle memory and 'locus of attention' (mouse position).
- menus are configured to open to the top for bottom headers, and to the
bottom for top headers. We can expect the UI is configured consistantly
for headers, so in general the menus will appear consistant as well.
Where menu flipping fails is especially for alphabetic listings, like in
the menu button of fileselect. However, that one should be configured to
open by default to the bottom, so ordering is consistant as well.
If people like to check this themselves; uncomment the lines in the top
of the function uiBlockFlipOrder() in src/interface.c
This commit is based on the patch & cool design work of Matt. It includes
the new Lamp drawing style, and replaces the Object center dots with a
similar styled OpenGL drawn dot.
Important side-note is that removing the old glDrawPixels() for centers or
lamps will not only make Blender faster, but also prevents crashing on a
couple of cheaper 3d cards (as reported for S3 and Intel on-board cards)
Notes:
- The new default only draws Object centers when selected or active. If
you like to see them always, use the View Properties Panel. You can also
save that in the .B.blend
- The size for centers (and lamps) is in the User settings "View & Controls"
- Unselected Lamps, and their offset lines from zero Z, are drawn in a new
Theme color
Changes and additions in Matt's patch:
- Lamps and centers are drawn fixed size, in pixels. Also the 'sun' lamp
draws screen aligned now.
- Center dots now also draw in blue to denote Library linkage or to show
that an Object has been linked to other scenes.
- When objects are empty (no vertices) they will always draw a center dot.
Otherwise these objects would never be selectable anymore!
- Added theme setting for center size, and initialization
- Removed the old redundant code for drawing centers
- Cleanup of drawing routines, made center dots faster
- Started removing calls to glBlendFunc(). Regular alpha drawing should
become standard, and the (very) occasional exception should return this
to default after usage.
causing Blender to crash. (reported by Levon, thanks!)
Bugfix: InfoWindow, pulldown menu said "Dump 3D window", whilst this can be
any window type... renamed it to "Dump Subwindow" next to "Dump Screen".
marker wasn't on the first or last possible position. Caused by clipping.
As bonus; added Cardinal interpolation option too, which is just that
little bit different! (Cardinal goes through the controlpoints, bspline not)
curves. On sharp 'peaking' curves the handle was calculated
using both X and Y distance. This could result in overshooting.
New code only evaluates the X distance, resulting in much more moderate
sized handles.
Thanks Gabio for the demo file!
us.id when objects were destroyed but not always incrementing when
created. The intent of modifying us.id is to make Python a "user" of the
data so it persists even when it is deleted from Blenders UI. The original
commit was unintentional but Ton thought the idea was OK.
- bug: posemode, bones were drawing names and axes even when hidden
- bug: using softbody guides actually worked on themselves, causing
an infinite loop
- feature: when a pose/bone is completely locked for transform, a grab
will change into rotate by default.
Well, it already worked a bit, but without weight options or edge
stiffness. You now can set the weights using the "Properties" Panel in
the 3D Window (allows multiple selections too) or with Wkey in Edit Mode.
Bezier curves have this too.
NOTE: Lattice SoftBody Goal created yesterday won't work anymore!
I've had to recode weight support for Nurbs Points, using a new weight
variable... this because the existing W variable was in use for Nurbs
already. Also Lattices have this new Weight variable, so the code is nice
uniform. Sorry for the artists who already created complex Lattices... :)
NOTE2: Surface Objects don't support edge stiffness yet
NOTE3: I've removed ancient screen coordinates from the Bezier struct,
which makes - even with added weight and padding - the struct smaller!
Demo file:
http://download.blender.org/demo/test/2.40/softbody_curve_lattice.blend
Animating detailed clothes with softbody becomes messy, so now we'll
try it this way. :)
It simply uses the W (weight) value, as already available in each Lattice
Point. Only had to make it editable;
- NKey panel
- or press W in editmode
Further there's a minimalistic W button in the softbody Panel!
Hess.
In a comment on maillist I already mentioned a weird 0.5 in the code,
which I added to ensure correct rounding to integer frame numbers.
With a variable step size however, this won't work properly. You could
see it in the patch, because the ghost steps were animating.... they
should remain frozen, looks much nicer then. So I've added some fmod
voodoo here.
Vertex-parenting a forcefield to a softbody caused eternal loop :)
It is partially because of the timing system (=weak) but actually also
because derivedmesh calls could also not build meshes all the time!
The locality is restricted to action or user-transform only. Or as it goes
in the code now: by setting a constraint local, it executes the constraint
before it calculates the influence of Action or user transforms.
ALso note that this works in Evil Eulerians. Meaning that when you only
want to copy the X,Y or Z compenent of a euler, it can give unpredictable
results when the other euler values are set, this because euler axis
rotations work on top of each other.
Previously, using the "Stride Bone" tried to get that Bone motionless on
the path by correcting the internal time of the Action. This however caused
too many problems, especially with irregular walks.
The new system also tries to keep the Stride Bone motionless, but this by
moving the entire armature, and not changing the timing of the Action.
Give much nicer results. :)
To make editing Strides easier, I've added a new option in the NLA
panel to disable the path. This way you can quickly switch to editing the
action itself (keying the stride bone) and viewing the result.
- update for the old mathutils rewrite
- update for some other methods ive added
- added explaination of wrapped data
- added a .css file for epydoc gives nice blender/python colors :?
- Bone Ghost drawing now skips axes and names
- "Snap to cursor" now works for parent-less bones in PoseMode
- Prevented assigning in buttons of negative zero (was confusing)
- Copy Location Constraint didn't update Object when it was copying from a
Bone
- Deleting bone in editmode, and connecting bones crashed due to evaluation
of deformation code (only allowed for pose).
on top of each other. Was 100, which gave noise like this in this image;
http://www.blender.org/bf/hairnew.jpg
Made it 200, which solves it for a million hair polygons;
http://www.blender.org/bf/hairnew1.jpg
Also note that hair renders go much faster and better if you insert a real
solid head in it, that will prevent hairs on the back to be inserted in the
buffers. ANd don't make the head Ztransp!
I've been going over the zbuf.c code, which is indeed very ancient,
with a load of old optimizing and redundant code in use.
Added more 'modern' Span support, which fills per face two arrays
with the scanline information in it. That way you can zbuffer a quad in one
run as well. It was also exactly that code that's copied all over in zbuf.c
For now, to prevent issues for the release, the 'render a quad in 1 run' is
only in use for the strand render. Tests reveil a speedup of about 33%.
Will work on this recode later... which would also result in making zbuf.c
threadsafe.
And: bugfix #3398
When using the new 'render emitter' for particles, the orco array for
particles was accidentally used by mesh too.
doc;
http://www.blender3d.org/cms/Hair_Strand_Rendering.722.0.html
- added width control for strands
- made tangent (anisotropic) render an option
(so you can render strands more solid, like metal/wood)
Also:
- ALT+A anim playback with static particles made cursor flashing
in case the paste buffer+length of text was bigger than MAXTEXT ->
fixed this, also a error is shown to the user now. editfont.c needs
still some cleaning but will discuss about this with kaito and intrr.
"Additive" Guides. See also:
http://www.blender3d.org/cms/New_Particle_options_a.721.0.html
This Guide type uses the falloff distance to also define how much the
particle (or hair strand) goes over the path, allowing to create local
extremes, or only local particle generating or hairgrowth. Nice for
spiky haircuts!
Note that the current default generates particles based on the original
amount of vertices and faces, this for vertex group support (which is not
subdivided with modifiers). That means that particles generated on
subsurfed faces still have minor approximation errors.
Note for DerivedMesh users; I've added a new API call:
float *mesh_get_mapped_verts_nors(Object *ob);
Which returns an array of 2 * 3 * float size, containing the vertices and
normals, deformed and subsurfered, but only the original me->mvert amount.
Works in all non-editmode cases.
Is in use now for vertex/weight paint and particles.
- "Disp" option allows to go back to zero, effectively disabling the entire
particle generating.
- When parenting guides to an emitter the depgraph sees a cyclic relation,
which caused not updating the particles correct on loading it.
- Moved creating guide Cache completely outside of the particle loop,
should make it faster to use with large amounts of particles and objects.
When using the pulldown menus for exiting weightpaint, it did not free
octree tables for weightpaint, giving an error message on re-entering
weightpaint.
* add some protection against accessing MVerts/MEdges/MFaces which have
been deleted
* correct cut-and-paste bug in faces.delete() method
* correct some compiler warnings
underline stuff) as well.
Attempt at fixing editmode undo, but not successful. I'll create a bug-
report and assign it to Mika, because I only understand "train station"
(German saying :-) when looking at the code.
table stable... you keep correcting leg sizes until no table is left
anymore! :)
This commit restores the displacement direction from 2.37a code, which was
negated 5 months ago to fix a change in renderconverter.c, but somehow is
not needed anymore. The regression displacement file now renders OK again.
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)
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! :)
-- 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)
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.
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?
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")
- 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.
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)
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.
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...
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.
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 :)
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.
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.
- 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.
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.
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)
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.
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".
Unified render does not return a zbuffer, but when gauss render was used
in combination with motion-blur, a buffer was accidentally created, one
pixel to small even!
If a Mesh was "Auto Smooth", it was drawing as smooth in editmode, and
not as smooth in Object mode. Should be consistant.
Better even would be draw autosmooth info, but that's derivedmesh magic now!
Actually nice feature too: when using Scene "Set" option, that scene draws
its transparent and x-ray stuff independent of the 'foreground' scene.
That means that x-ray in a set will be always over the set objects, but
stays behind the current scene.
For transparent it works the same though... meaning that solid objects from
the foreground scene will always draw over transparent from the "Set".
Note; this only is true for the 3d window, or the OpenGL render, not for
actual rendering of course.