Switched order of routines for displacement and autosmooth, where the
autosmooth will be last now. This prevents displaced (loose) faces, and
might give attractive sharp edges in other cases too.
Key alpha (render) set alph component at '1' for sky... this is an old
convention from NeoGeo days, and I have absolutely no clue whatfor...
maybe for some antique amiga iff format or so. Made it zero now.
is calculated in where_is_object.
Negative scale is found by a cross product of first 2 rows in matrix, and
comparing that (dot product) with third row.
OpenGL draw.
(BTW: the previous commit also solves raytrace errors with negative scaled
objects...)
Further a cleanup of displaylist flags and object/base flags. The #define
ACTIVE is moved to filesel.c (only used here).
The GONNA_MOVE #define got a OB_ added in front.
conversion. Old method tried to solve it per object, detecting a flipped
matrix. Since we have displacemapping and raytracing this is too inaccurate.
Also, flipping normals should alsways result i correct flipped vertex-
normals too.
Solution is to completely recalcuate the 'puno' (vertex normal) flags in
renderHelp.c now (set_normal_flags). The face normals themselves are not
flipped until that stage.
Second major improvement involves the calculation of correct splitted
triangles, when a quad is not flat. It now creates triangles based on the
vertex normals, which have actual information on surrounding geometry, thus
resulting in much smoother results.
Without this you get errors in ray-shadow, with light shining almost
parallel to a face. But again, displacement mapping improves with it too.
Third fix is that by removing normal flipping from displace code the result
is much better now.
Implicit declaration of swab in Linux, needs to define __USE_XOPEN at
source/blender/src:
I also added #includst <stdlib.h> to this file to fix it on solaris as well.
Kent
switches (glMaterial) inbetween a glBegin and glEnd. Combined with a
switch of glShadeModel however, on recent Nvidia it caused faces not
to be drawn... dunno if this is official compliancy, but not too
complex just to correct.
Reenabled the setScript/getScript methods for python controller bricks.
Set the ray source point to MouseFocusSensor.getRaySource works.
Added: Python -> MT_Quaternion
MT_Matrix4x4, MT_Matrix3x3, MT_Vector3, MT_Point3 -> Python
Correct transform of frustum bound sphere centre point to world coordinates
Profiling revealed that the SceneGraph updated every physics object, whether it moved or not, even though the physics object was at the right place. This would cause SOLID to go and update its bounding boxes, overlap tests etc.
This callback handles the special case (parented objects) where the physics scene needs to be informed of changes to the scenegraph.
Added Python attributes (mass, parent, visible, position, orientation, scaling) to the KX_GameObject module.
Make KX_GameObject use the KX_PyMath Python <-> Moto conversion.
Depth sorting for Transparent polygons. Use ZTransp in Material buttons to enable.
This will cause an object's polygons to be sorted (back to front for alpha polygons, front to back for solid polygons.)
Blender.Draw.Button() was not showing up. Seems to be an epydoc
issue with Button() being both a module method and the name of a class.
I changed Button to Button_ and added a usage note.
Yes, this is lame.
might be only an edge was missing in one of the loops.
Fix a crash that would sometimes happen when clicking the texture painting
button in the image window header. Made headerbuttons_packdummy a static
variable again. The uiDefBut call for the texture painting button stores a
reference to it, so it must be kept in memory.
- Campbell Barton contributed another function (thanks again), the Image.reload method:
with this a script can keep an image that is being edited and saved by an external program updated in Blender.
in the UV/Image editor 'UVs' menu
Script authors can use:
Group: 'UV'
in the headers of their scripts to let them appear in
this menu.
* Updated the UV Face Layout script to reside in the UVs
menu, rather than the (incorrect) File->Export menu.
- updated docs with recently added functions
- dynamic menu entries now are sorted (alphabetically, of course)
- added new menu categories for scripts: Wizards, Modifiers, Generators, Materials, Animation:
only added to list of options, didn't mess with any Blender header. They are already available from the "Scripts" menu in the scripts win, but not elsewhere.
- added option 'datadir' to Blender.Get(option):
so scripts can use .blender/bpydata for reading / writing their data files.
- Mesh Objects are sorted by depth (based on object centre.) Using object centre means the user has control over the sort.
- Polygons are not sorted.
- Polygons are not split.
- O(nlog(n))
needs cleared. Timings go down nice:
octree new 2.33a
128 0:04.2 0:07.5
256 0:06.5 0:20.0
512 0:18.0 2.06.9
Time is including initialize renderfaces etc. 100k quads.
-- Added two new functions to the Draw module, to display int and float popup buttons:
Both contributed by Campbell Barton, thanks!
-- Fixed a couple warnings.
- Finally added Blender.Load function for loading .blend files, useful for demos, for example.
- Moved data from Blender.h to Blender.c. We'll keep doing this where it applies and someday remove all unused files at once.
Kester: since this is in DNA, it backwards converts all R into B now,
which isn't the bug. On big endian systems (OSX) there engine colors
are OK, which indicates the conversion of MCol goes wrong on the
engine side, by using some endian-sensative approach.
The main confusement is, that the MCol struct isn't in use for read
or write in Blender, only for a save in files. The contents of that
struct is wrong, yes. See note in vpaint.c top.