Commit Graph

3836 Commits

Author SHA1 Message Date
0ef1b52130 Bugfix #3115
Undo after you did a layer change, didn't restore the 'active layer' in the
3d window. Adding a new object then is invisble.
2005-09-29 19:52:42 +00:00
7beb234b92 - Added shadow buffer support for wire material and particle strands
(Since strands are screen-aligned, it didn't fill in OK yet)

No shadow;
http://www.blender.org/bf/rt14.jpg
Shadow;
http://www.blender.org/bf/rt15.jpg
2005-09-29 19:33:50 +00:00
Mika Saari
a6bd07d10f Text3d.c NULL pointer check added to get rid of MEM_freeN warning. 2005-09-29 19:25:12 +00:00
Mika Saari
83b2d267b5 cu->strinfo reallocation added to Text3d.c, so when setText is executed
the strinfo is reallocated to include strlen(cu->str) amount of free memory
2005-09-29 19:03:53 +00:00
fa57f3115d New hair "strand" channel has wrong texture coord input... it rendered
from 0 - 1, instead of -1 to 1. Thats fixed.
The error made tests i did with alpha make nice though, apparently hairs
are nicer when rendered with alpha range 0.0 to 0.5.
2005-09-29 18:13:36 +00:00
b15f46ed7c Storage of ME_FACE_STEPINDEX in mface iwas same flag as for new
anisotropic, causing nice interesting render errors.
2005-09-29 17:06:34 +00:00
1ec6cc4986 Orange report bug; Adding a new scene, choose "link obdata" gives corrupt
memory. Poses should be relinked right after duplicating, not during a
redraw (when more objects use same armature).

Added in readfile a patch to make sure files saved with this duplicate
error can still be used.
2005-09-29 16:37:37 +00:00
Alexander Ewering
76a57eb82f Fix Python API to correctly create Text3D objects. This is just a
temporary fix (duplicating code again), the *real* fix would be to once
make one central function to create and init a text object for all
places...

I also tried to introduce compatibility code to be able to load old files
with broken text objects (cu->tb == NULL due to missing init code).

Hope it works :)
2005-09-29 15:46:06 +00:00
03e1ec988b - Added "anisotropic" rendering for static particle hair strands.
This means the diffuse and specular shaders don't use the normal
  for hair (which is actually undefined, a hair is micro cylinder) but
  it uses the tangent vector (vector in direction of hair).

For Diffuse, it computes a fake normal now, representing the optimal
hair normal pointing towards the light. All current builtin shaders
work with this, including ramps.

For Specular, it uses another formula to remap dot products for all
lines that now use the tangent vector instead of the normal:

dot = vector * tangent
dot = sqrt(1.0 - dot*dot)

Gives better results than using the 'fake' normal for diffuse. Officially
(according the papers) this could be used for diffuse too, but then hair
becomes very flat. Now you can control the flatness easily with ramps or
using Oren-Nayer for example.

Example image (disappears in some weeks)
http://www.blender.org/bf/rt9.jpg

- Added new texture channel "Strand" to apply textures on hairs over the
  length of hair (1 dimensional). Orco now gives 1 fixed coordinate for
  the entire hair, based on where it starts.
  Note; UV doesn't work yet. Nor vertexcolor.

http://www.blender.org/bf/rt10.jpg
2005-09-29 13:19:07 +00:00
Stephen Swaney
c4b8a431bc fix Curve.update() method to use new DAG features. 2005-09-29 07:05:00 +00:00
b1755b86bd - added stub for elbeemDebugOut in
source/blender/blenkernel/bad_level_call_stubs/stubs.c
	for read/write bobj debug output
2005-09-28 18:09:46 +00:00
d7b441473a - removed some unecessary files & code
- debug output now controlled globally by elbeem debug level
  (BLENDER_ELBEEMDEBUG environment var), also for fluidsimBake
	and read/writeBobj
- debug output is written to file for WIN32
- added "for" and "vector" etc. defines for MSVC6
  (I couldnt get hold of the compiler itself, so not tested yet)
2005-09-28 16:20:57 +00:00
9a8ab66a1d added missing DAG call to image_aspect. 2005-09-28 15:01:40 +00:00
d91d4fd41f * Headers for the last Set Smooth commit 2005-09-28 11:56:09 +00:00
c1e8340638 * Added 'Set Smooth' and 'Set Solid' to the mesh edit mode specials menu/toolbox/3d view menu so you don't always have to keep switching back to edit buttons. 2005-09-28 11:55:43 +00:00
2a08be6e50 Brought back (lost with modifier code) display of actual amount of faces
for subsurfs in info header.
2005-09-28 11:24:39 +00:00
7382a3d9d9 Bugfix;
Ipo window could crash on reading old files with keys, non proper use
of pointer...
2005-09-28 11:07:12 +00:00
b5117eb8fd Bugfix;
- buttons "Show" and "Key" didn't set the active constraint, causing
  confusement in display for the IpoWindow

Also made the backdrop for constraints and modifiers to use the Panel
theme color, making it better integrated.
2005-09-28 11:05:20 +00:00
c8a4f20fb8 Removed ancient (2.1) feature for Constraints... a highly undocumented and
unpredictable one!

This is what it did; if two or more Constraints are of the same type, it
accumulates the Target positions/rotations for the constraints, averages
them, and then only applies the last Constraint in the row. It seems to
be a trick to blend IK Constraints or so... in all other cases I cannot
find a good use for it (nor did Bassam).

For example; add three Empties, and make one Empty to have 2 location
constraints to the other two. This just didn't work, unless you insert
an "Empty" constraint inbetween.
I will post in the blender.org animation forum feedback for it too. :)

Its quite easy to make it an option, but I first like to grasp fully what
the actual use of such an option is.
2005-09-28 10:07:54 +00:00
97d749a99f Suppressed another GL_FRONT drawing routine, causing potential slowdowns
for some configs. This was an old hack for sgi's, so I've put it behind an
ifdef for sgi and suns now.

Test if blender still works by switching screens, and check for the borders
between the blender area windows. These should draw all nice empty/black.
2005-09-28 09:59:59 +00:00
Alexander Ewering
f9c15a2c20 Fix forward declaration of drawscreen() 2005-09-28 07:11:24 +00:00
d370182aed Division by zero prevented in new hair strand algo. It showed as vertical
lines, especially with the "Step" size low.
2005-09-27 22:33:06 +00:00
96253376e7 Recommitted this commit yesterday, was apparently done in the wrong
directory... so the slowdown was still evident!

Maintenance commit;

  - *Giant* speedup for LMB frame-dragging in ipo/action/nla windows. It was
    calling a routine that accessed frontbuffer drawing.... a very old patch
    for SGIs even! :)
  - Prepared code for support of unlimited Shape keys
  - Curve objects didnt draw correct for selection-outline option
2005-09-27 21:52:04 +00:00
4e64b288a4 Hair!
Thanks to testing in studio orange (thnx andy, matt!) I've found the
simple way to code it.

Static particle systems, when not set to wire or halo, now render 1 pixel
wide 'strands', which are actually just faces with vertexnormals and
proper orco texture. Check for quick fun;

http://www.blender.org/bf/rt5.jpg
(and rt6, rt7, rt8)
2005-09-27 21:51:09 +00:00
Stephen Swaney
224e4d747f set object->recalc flag when we change object's loc, rot, etc.
fix for problems with frame change scene scriptlinks.
2005-09-27 20:56:39 +00:00
716aaaf117 Shaded drawmode, ogl preview render, does update for lights. 2005-09-27 19:43:04 +00:00
af431c5a68 -fix for angleBetweenVecs
* adds a test to check for zero-length vectors
2005-09-27 18:41:39 +00:00
39a243f8d2 Refcount fixes
* fixes posible reference count issues with mathutils
* mathutils classes should no longer memory leak
2005-09-27 17:03:28 +00:00
d27212e647 - tooltip fix, double sided pretended it was per face 2005-09-27 16:44:33 +00:00
85d295f106 added the method saveRenderedImage to the RenderData object
- should allow users to render a filename.extension to the render path
Example:

import Blender

s = Blender.Scene.GetCurrent()
r = s.getRenderingContext()
r.setRenderPath('C:\\')
r.render()
r.saveRenderedImage('myRender.jpg')
Blender.Scene.Render.CloseRenderWindow()
2005-09-26 22:00:39 +00:00
13349ad7a4 drawscreen is called before it's defined crashing msvc 2005-09-26 20:37:52 +00:00
f1ddb77a48 - added some equivalency testing for vector classes
>, >=, <, <= test vector magnitude
==, != test vector values 'within epsilon' :)
- inspired by ideasman
2005-09-26 20:11:13 +00:00
4e854b1a5c Maintenance commit;
- *Giant* speedup for LMB frame-dragging in ipo/action/nla windows. It was
  calling a routine that accessed frontbuffer drawing.... a very old patch
  for SGIs even! :)
- Prepared code for support of unlimited Shape keys
- Curve objects didnt draw correct for selection-outline option
2005-09-26 18:10:20 +00:00
af8d09238a Action editor: drag with LMB did three redraws... causing slowdown. Bug
since 2.0 it seems.
2005-09-26 17:11:15 +00:00
d8863a9841 adding sort by extension in filselect window
.
2005-09-26 16:21:22 +00:00
b534d6bfb7 adding sort files in fileselect window by extensions
.
2005-09-26 16:17:14 +00:00
18957ff5a8 Two more 'shape' fixes;
- adding new Shape didn't set correct Ipocurve code... so you could not
  even add new curves
- the keylines (first channel) always came back in display... ancient error
2005-09-26 16:13:00 +00:00
c7f2c2c612 Quick fix; "delete shape key" didn't work without IpoWindow open. 2005-09-26 15:51:44 +00:00
43d2904037 Cleanup and new features for vertex keys.
User doc: http://www.blender3d.org/cms/Shape_Keys.678.0.html

- The mixed use of "Vertex Key","Key" or "RVK" in Blender was a bit
confusing. Also a 'vertex key' assumes keys per vertex, which actually is
only a single key for the entire shape. The discussions on blender.org
forums all mentioned "Shape" or "Blend Shapes", which I think is an OK
name for a "Vertex Key" in the UI. :)

- Most work was code spaghetti cleanup. Doing shape-keys now nicely goes
via the depgraph and DerivedMesh. That then allows to have different
shapes per object, with the new "Pin" feature.
Objects now define what Shape is shown (ob->shapenr)

- Added a Shape Panel in the Edit buttons with the various options

- Fixed a lot of issues in the IpoWindow, with drawing the channels.
For example, deleting a key-line there caused the entire Relative option to
go wrong, same for moving the lines up/down.
Changing key-line order now reflects in order of channels. The active
Shape is drawn more clear now too.

- Noticed it doesnt work yet for curves/lattice. Need modifier advise!
2005-09-26 15:34:21 +00:00
9656e8be02 Theeth's mathutils patch
- adds intersections for lines
- triangle area
- tracking quaternion from vector
- some helpful normal calculators
2005-09-26 15:06:28 +00:00
b6ecdb8c35 Project file update for elbeem
Warning clean up of python project
2005-09-26 14:46:14 +00:00
577456f86a Darn editmesh code! Trying to prevent user error (add overlapping faces)
caused a myriad of other errors in tools... now you couldn't create a
triangle if one 1 edge was in a face already.

I should have known it should be coded differently. :)
So, here's another version, which actually restores the old code, and
only has the exception on pressing Fkey.
2005-09-25 10:41:35 +00:00
a8043ed8d4 New!
Hooks now support vertex groups. With weight painting it looks very
interesting. Almost z-painting! :) Try a sphere with all vertices in a
group, hook it, and scale empty in object mode a bit.
http://www.blender.org/bf/rt3.jpg
(Which gives the idea to make a Displace Modifier working with normals and
vertexgroups..)

Works as follows now; in Mesh editmode, when no vertices are selected, it
tries to assign on CTRL+H command the active Vertex Group. (Menu is getting
to long now... need to think over). Only works when vertices are assigned
to a Vertex Group, this to calculate the Hook center.
2005-09-24 20:17:48 +00:00
749253afa9 A fix for edgeslide non-prop mode sticking at 0%. 2005-09-24 18:44:24 +00:00
6e94b02616 Various Transform bugfixes.
- Trackball rotate was missing the NoConstraints flag
- Zooming didn't recalculate the 2D center correctly
- Zooming in transform was sending event to the 3D window even when working on UVs. (disabled when working on UVs for now, will need to send events to a 2D window handler eventually)
- In camera mode, when the selection was exactly on the camera, initgrabz was barfing, fallback to 1.0 now, which gives ok results.
2005-09-24 18:00:32 +00:00
8b7c690a0b - assorted warning fixes (signedness, float->double)
- added decimate,boolean modifier copydata methods
2005-09-24 16:02:56 +00:00
b3f0facfbe - shouldnt be a trailing comma after include 2005-09-24 15:50:56 +00:00
843bc28d37 Bug fix #3098
Grmble... and now the feature ALT+J 'join triangles' broke. :)
Also found out the Fkey option didn't work anymore on 2 triangles (makes 1
quad too). Luckily we got people testing eh!
2005-09-24 15:46:08 +00:00
e5b9f62c6e bugfix #3100
Hrms... previous commit here to make sure faces are not added 'double',
caused a part in removedoubles not to work well, removing too many
faces. Solved it more proper now.
2005-09-24 15:36:25 +00:00
Stephen Swaney
94aa843626 Patch #3099 - bugfix for #3097.
a little tweak for arg parsing.

Contributed by Ken Hughes.  Thanks!
2005-09-24 15:28:59 +00:00