Commit Graph

3956 Commits

Author SHA1 Message Date
1c72a19fd8 Bugfix #3133
- Rendering an image with Border didn't check for sizes smaller than 1
  pixel yet.

Related to this code I found 2 other fixes:

- Themecolor set for drawing in Render Window was not restored correctly,
  sometimes causing into wrong Panel (transparency) drawing.

- When rendering an image with Gauss, it now renders by default 1 pixel
  extra, which gets stripped. This eliminates the "ugly" darker border
  in images.
  (Yes, let's make Mr. PixelCounter Goralczyk happy! :)
2005-10-03 10:10:19 +00:00
fd7ef55a69 Bugfix #3138
Editbuttons "Centre" options didn't correctly use depgraph for linked data.
2005-10-03 09:11:51 +00:00
1af3055832 Bugfix #3046
When using 3d window "unlocked" (own layer and own camera possible), the
dependency updates didn't work, these were only using Scene layers.

Changed the dependency graph call DAG_scene_flush_update()
to accept an argument for all visible layers in a Screen.
2005-10-03 09:04:57 +00:00
d9b0475158 bug #2909
header is redrawn at the end of loopcut to fix part 2 of the bug , my previous commit fixed the first half of it :)
2005-10-02 23:10:56 +00:00
6d52a829ef Bug fix; action editor, inserting mesh keys crashed. Referencing ipo stuff.
(yes, studio orange is testing :)
2005-10-02 21:40:57 +00:00
2f590af596 Ipowindow header: Curve menu crashed when no curve was created yet. 2005-10-02 21:29:28 +00:00
b8442c531a Driver fix; entering a non-existant object name in driver Panel crashed. 2005-10-02 21:21:05 +00:00
015fe7ea81 Version 1.0 of IpoDrivers.
First note that this is new functionality, unfinished, and only for
testing and feedback purposes. I'll list below what works, and what will
need work still.

This text is also in cms: http://www.blender.org/cms/Ipo_Drivers.680.0.html

An IpoDriver is like an IpoCurve, but instead of a Bezier curve, it allows
to connect a property of other Objects as input for the "channel". For
example, IpoDrivers can be used to have a Shape Key being "driven" by
the rotation of a Bone. Or the RGB colors of a Material get driven by the
XYZ location of an Object.

Editing of Drivers happens in the IpoWindow. Here you can notice that the
channels (right hand window) now have an "active" channel indicator.
To add a Driver, you have to use the "Transform Properties" Panel (Nkey).
Here you can add or remove a Driver to the active channel, and use the
buttons to fill in what kind of relationship you want to establish.

Driver Objects

Note that any Ipo Channel can become driven now, but that only Object
transformation or Pose Bone transformation can be used to become a
Driver now.
At this moment, only the local transformation is taken into account.
For Objects that means the location/rotation/scale value without Parent
transform (as shown in "Transform Properties" Panel for Objects).
For Pose Bones it means that only the Pose transform (changes of rest
position) is Driver information (also as shown in Transform Property
Panel in Pose Mode).

Mapping of Drivers

When an Ipo Channel is "driven", the mapping is by default one-to-one.
It is only restricted by already built-in limits for Channels, like
for Material the "R" value can only range from 0.0 to 1.0.

Also note that when mapping rotations, the actual rotation values
in Ipos are scaled down with a factor 10.0. (180 degrees actually has
in the Ipo system a value of 18.0). This is an ancient year zero
convention in Blender... it is a bit hidden, because the ruler
(vertical as well as horizontal) displays the virtual values correctly.
Only the Properties panel shows the actual value.

When you draw an IpoCurve in a Driven channel, this curve will define
the mapping between the Driver output (horizontal) and Driven input
(vertical, as usual).
A nice new option to use is "Insert one-to-one curve" (press I-key,
or in pulldown menu). This will also zoom the display in exactly to
fill the window, allowing easy edit. If you use this option with
degrees, it will map 180 degree rotation to a range of 1.0 unit.

Live updates

Since the Drivers are integrated in the Ipo system, they will always
be updated whenever an Ipo is evaluated. This happens at least on
frame changes.
For interactive feedback, updates while transforming objects were
added in these cases:

- Driven Object Ipos, by other Objects or Pose Bones
- Driven Shape Key Ipos, by other Objects or Pose Bones

You can also insert Drivers on Action Ipos, but these are only evaluated
on frame change now.

Todo

- Drivers can also get a text button, allowing a 1 line Python script
  to be executed.
- Make UI for it a bit less hidden... maybe with visualization in 3D?
- Allowing global transform coordinates as Driver too.

Issues

- renaming Bones won't rename drivers
- (file) appending the Ipo won't append the linked driver Objects
2005-10-02 20:51:35 +00:00
42fe4c568d Transform MMB behavior correction, as mentionned in meeting.
MMB uses global axis, Ctrl-MMB uses user defined. (Alt-MMB cause conflict with the window manager on linux)

(for hotkeys, first press is global, second press is user defined)
2005-10-02 19:31:32 +00:00
90b5c5054c Fixing bones grab in "pose" transform. Bug #3030: http://projects.blender.org/tracker/?func=detail&atid=125&aid=3030&group_id=9
It didn't do initgrabz correctly.
2005-10-02 18:27:14 +00:00
cdb8700ddc - add support for Python Buffer()s of type DOUBLE 2005-10-02 17:09:11 +00:00
173a4791b2 Crash fix; rendering AO with envmap on didn't work.
Note that envmaps still render without raytracing.
2005-10-02 16:21:26 +00:00
589f91e0ee This commit sets the info header on the preferences window and the
header prints on the 3d view header to be the same color as the menu text.
This ensures that you can read the text against the color of the header
just as long as the theme color for the menu text is also readable against
the header color. This should make dark themes much better.
2005-10-01 21:16:52 +00:00
453fd9f532 A little more cleanup of the loopcut code. Hoping to gain some speed, and letting qread() finish its work instead of breaking. I think this may have been causing trouble. 2005-10-01 13:04:19 +00:00
80c5ca75dc For loopcut, have the event queue ignore MOUSEX and MOUSEY events to help prevent it from bottlenecking 2005-09-30 20:18:00 +00:00
Alexander Ewering
2f22ea5900 Fix SHIFT finetuning for edgeslide (aftermath from a warning cleanup ;-) 2005-09-30 10:58:39 +00:00
Alexander Ewering
61e9d7c2d4 Possible fix for bug #3094 - use normal malloc/free for stuff that gets
alloced inside SDL threads.
2005-09-30 10:23:28 +00:00
3c3b0c13e3 * Added additional shift space to fullscreen/tile window spaces. So much
more convenient than ctrl uparrow/downarrow since you don't have to take
your hand off the mouse!
2005-09-30 09:49:56 +00:00
3b5d8a15b1 * added right mouse click to cancel a sequence strip transform, like everything else in blender. 2005-09-30 08:39:35 +00:00
d9478dcaf9 Bugfix #3112
Mesh selection in editmode didnt work proper with new ALT+B clip option.
2005-09-29 21:31:47 +00:00
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