Commit Graph

2255 Commits

Author SHA1 Message Date
Alexander Ewering
a600d66795 Undo never worked correctly for "Extrude" in BF-Blender. It just undid the
transform, not the extrusion itself. How did nobody notice? :)
2004-07-20 21:48:42 +00:00
Kester Maddock
b6e0899607 Added support for cameras in Blender's Ortho mode. 2004-07-20 12:07:06 +00:00
Willian Padovani Germano
7b3b3ae432 Trying to fix bug reported by Peter den Bak and Meino Christian Cramer (thanks!):
-- splash screen disappeared (duh, I did that!) and Blender quits upon exiting from some 225 games:

It was troublesome to find how to run demos in general with the screen correctly redrawn before they started, etc.  Ended up making the above error in screenmain().  About the games, I don't have them and will need some time to get the files for testing, but I'll do it, though only on linux.

BPython:
-- Window: added GetScreens, SetScreen and improved GetScreenInfo.
-- Object, NMesh: updated (added in NMesh) method getMaterials to return either only valid materials as before or also empty slots (as None).  This previous omission can be considered a bug, since it made info about materials incomplete / incompatible with face mat indices.  Thanks Yann Vernier for bringing this up and sending/proposing a patch that also fixed a bug related to assigning lists of materials with different lengths to obj and its mesh. setMaterials also accepts Py_None entries now, which become empty slots in Blender.
-- doc updates.
2004-07-20 08:16:46 +00:00
Martin Poirier
9bf1655070 Minor UI fixes by Emilie McDavid and Chris Burt. Mostly button alignement fixes, positioning, sizes and thingies like that.
Mostly in Editing and Shading (material).

Note: broken should review the changes though we've checked with all the different draw types and it didn't make any problem. If it worked correctly on Desoto's weird screen size, it can probably work anywhere. ;)
2004-07-20 01:53:32 +00:00
Alexander Ewering
a2474e9a0a Fix Trackball view rotation method to allow rotation angles > 180 deg.
without having to start over.

I patched this into instinctive a long time ago when someone submitted
the math to the mailing list but never got heard.

I hope it's acceptable :)
2004-07-19 11:38:09 +00:00
Alexander Ewering
319527efe4 "Grab Cursor" now only is invoked by GKEY. 2004-07-19 08:42:24 +00:00
Matt Ebb
66c2b4aace Details, details...
* Aligned the header align toggle button thing with the
 menu and gave handle_view3d_around() a prototype to
 clean up a warning

* Replaced the conglomerate of abbreviated texture blend
 modes with a menu
2004-07-19 07:08:51 +00:00
Chris Want
6883efe712 windows-gcc vs. solid, round 2
Doing it the Kester way, but in a way that it actually compiles and links
for non-Kester people. >=P

(translation: FREE_WINDOWS now builds the stuff in extern and overwrites
the pre-compiled solid libs).
2004-07-19 02:43:07 +00:00
Matt Ebb
b42c714d75 Give the correct N key panel name when in vertex paint + edit mode (#1451 thanks Desoto for the report! ) 2004-07-19 00:24:56 +00:00
Martin Poirier
b57167d3e4 Particles effector type #define
Different draw mode for Vortex effector ( http://www.clubinfo.bdeb.qc.ca/~theeth/Temp/vortex.jpg )
Use row buts for effector type (only one effector at a time per object).
Forcefield circle transparency in 3D view is controlled by falloff value (for coolness factor).

Please note that those only draws in the 3D view for Empty objects. I've tested with all other object types through a global call, but lamps (and only those) give problems. Since we go in release status soon, I prefer commiting something that works all the time.
2004-07-18 22:23:50 +00:00
Chris Want
98b86b55fa This makes the windows-gcc build finish (only link to libsolid.a)
... might not be the best way, but it works.
2004-07-18 18:42:36 +00:00
Ton Roosendaal
1620a9199e Adding the new blending modes, and coding nice code broke having
multiple layers of textures... silly cut/paste error. Fixed!
(check; moto9.blend in regression files)
2004-07-18 17:42:57 +00:00
Alexander Ewering
e9f86f281e Forgot these two :)
Please test :)
2004-07-18 15:58:23 +00:00
Alexander Ewering
96e0a103d4 1) Change the way "Align mode" is accessed in the UI: It's now a global
toggle for all pivot modes. The 2 new pivot modes have been removed
   from the popup.

   Instead, a new toggle button is added to the 3d view header.

2) Grab cursor mode. Cursor can be grabbed (and constrained to axis, grid,
   etc. while moving) like any other object. If no object is selected,
   GKEY alone grabs the cursor, otherwise pressing CKEY while in GKEY mode
   moves the cursor.
2004-07-18 15:57:33 +00:00
Willian Padovani Germano
6dca057ac5 BPython:
- added image.getBindCode() docstring to Image's epydoc file (thanks Satish Goda).
Scripts:
- Adding Apply_def.py to "Mesh" scripts menu (thanks author: Theeth);
- Updating JMS's disp_paint.py (also changed its name to remove version info);
- minor updates in docs and scripts.
2004-07-18 15:54:17 +00:00
Ton Roosendaal
4a244f274d Attempt 2 :)
Found the right +0.5 todo, now based on understanding why. Checked with
demo files in regression. But i bet intrr finds a new bug in an hour!
2004-07-17 14:18:34 +00:00
Ton Roosendaal
15d4fb9c85 Really bad luck with committing recently... past fix was plain wrong,
although it rendered the submitted bug file fine...
Note to self again; always also check if code even works in general! :)
Note to self 2: don't fix things ad hoc when you're not coding
2004-07-17 13:56:05 +00:00
Alexander Ewering
1bb871c682 "Force field" and "Vortex field" buttons in Effect buttons didn't update
the 3d view.
2004-07-17 12:55:16 +00:00
Kester Maddock
baa2f99f07 Port Python updates from Tuhopuu2:
getType/setType to action/sound actuator (sgefant)
Use a more generic python -> math conversion.
2004-07-17 05:28:23 +00:00
Kester Maddock
90fb631526 Port a few rasterizer changes from tuhopuu2:
Up the max batch size.
Clean up some of the code - move code in headers to source files etc.
2004-07-17 05:23:17 +00:00
Johnny Matthews
c0985f4ceb If using the 'ob centers only' modes, the headers for scaling did not update properly. This commit should fix that. 2004-07-17 03:23:17 +00:00
Kester Maddock
a57cd82e9f Remove all the autoconf stuff for QHull & SOLID and use the Makefiles.
This should make building Solid & Qhull much more reliable.
2004-07-17 02:44:24 +00:00
Kester Maddock
d5585a3589 Added the runtime fullscreen options. 2004-07-17 00:48:59 +00:00
Kent Mein
b07c5f2096 Bunch of small fixes for warnings and whatnot....
intern/SoundSystem/intern/SND_AudioDevice.cpp
   Initalized a var that could fall through with no value.

source/blender/readblenfile/intern/BLO_readblenfile.c
source/blender/src/space.c
intern/SoundSystem/intern/SND_Scene.cpp
source/gameengine/Converter/BL_MeshDeformer.cpp
        removed unused var's

intern/SoundSystem/openal/pthread_cancel.cpp
        fixed a nested /*

source/blender/imbuf/IMB_imbuf.h
        added static to the type returned for addzbufImBuf

source/blender/imbuf/intern/IMB_bmp.h
        had a wrong prototype

source/blender/src/view.c
        added newline at end of file.

source/blender/src/sequence.c
        removed unused var
        added #include <stdlib.h>  to avoid:
                 warning: implicit declaration of function `abs'
        initalized a var that could have been used without being set.

Kent
2004-07-16 14:45:06 +00:00
Willian Padovani Germano
376468d383 Fixing a blenderplayer compile error reported by Meino Christian Cramer:
- added mainqenter to stubs.c so it can be used in blender/blenkernel/intern/blender.c's setup_app_data.

We can't run the onload scriptlink in setup_app_data because the visible areas won't have been updated and redrawn for the loaded .blend file until control returns to screenmain() in blender/src/editscreen.c.  So an ONLOAD_SCRIPT event is entered in setup_app_data and caught in screenmain, where the onload script is then executed.  All for a good looking demo mode ...

BPython:
- Added image.getBindCode() method, contributed by Andrew Corrigan (thanks!).
2004-07-16 06:00:40 +00:00
Willian Padovani Germano
97bba404fb Demo mode and BPython:
- small additions and fixes to enable the demo mode;

- Added sleep() to Blender.sys and 17 new functions to Blender.Window module:
    things to help demo script writing and as a bonus read / write access to Blender's input event queue;

- updates in docs, those interested please check Window.py in python/api2_2x/doc/ to read about the new Blender.Window functions.

----

Demo mode should be working well now for (I) playing rt animation -- aka ALT+A -- and (II) rendering pics and anims and playing anims.  I'll still add access to radiosity data and functions.

PS: Joseph Gilbert made (II) possible with the Scene.Render module he added for 2.32.  He's been coding great things for bpython, so I'd like to take the chance to point that and thank him here.
2004-07-16 03:08:43 +00:00
Matt Ebb
146021ea2e Details, details...
* Renamed the paint color picker panel to 'Paint' instead of 'Transform Properties'

* Minor label edits to the pivot icon menu
2004-07-16 02:10:29 +00:00
Matt Ebb
688a6de878 * User preference to select with the left mouse button
instead of right.

This basically swaps left and right, in most window spaces
so you can choose between:
LMB: Cursor/time slider/paint  -  RMB: Select
or LMB: Select  -  RMB: Cursor/time slider/paint

Aimed at:
1. Newbies
2. 1 button mouse mac users
3. People like me who are sick of having to constantly keep putting their brains into different modes when
 switching between other apps and Blender :)

Yes, the User Preferences window is a bit of a nightmare
now, a layout cleanup will be forthcoming soon...
2004-07-16 01:34:19 +00:00
Chris Want
e926d392a8 OK, the game engine has been un-buildable on irix for long enough
-- I'm committing this change I had discussed on the mailing list
about a month ago.
2004-07-16 01:31:25 +00:00
Kester Maddock
7398803bf4 Fix to not create invalid bound shapes from non mesh objects (armatures). 2004-07-16 00:08:06 +00:00
Kester Maddock
07f294cf4a Fix ATI texture performance under Linux.
glGenTexturesEXT(1, &bind); // produces bind == 0
while:
glGenTextures(1, &bind); // produces bind correctly.
(Ported from tuhopuu2)
2004-07-16 00:05:20 +00:00
Ton Roosendaal
f7a4b6f1d7 Shadow buffer render wasn't corrected yet for OSA reconstruction of long
ago... samples where offsetted half a pixel, causing banding in render.
2004-07-15 20:03:35 +00:00
Johnny Matthews
700d9c5559 This adds two modes to the 'around' drop down in 3d header
3d Cursor, only Ob Centers
Median Point, only Ob Centers

They prevent rotation/scaling from effecting the scale/rotation of the objects and just effects their position.
This is handy for aligning objects if you constrain to an axis and scale, as well as other neato things :)

Intrr came up with the code and I hacked it into the GUI
2004-07-15 17:42:04 +00:00
Alexander Ewering
665a2f8fdd Oops. Forgot to restore setlinestyle(0); after drawing the dotted grid. 2004-07-15 16:40:01 +00:00
Chris Want
8483a1951d This should have been fixed long ago ... create important
directories using 'mkdir -p' to avoid errors with fresh builds.
2004-07-15 15:06:54 +00:00
Alexander Ewering
f25b0df751 Commit for the 4 aforementioned "features":
- "Global Pivot": Maintains a global Pivot and Align mode setting for
   all 3d views when enabled, instead of seperate settings per 3d view

 - "Auto Perspective": Switch to ortho mode automatically on 1/3/7, and
   to Perspective when the view is rotated with the mouse

 - "Align mode": As suggested on the list, when enabled, transformations
   on several objects only transform their locations, not their sizes or
   rotations.

 - Grid dotted when not 1:1

***ATTENTION***! The User Interface parts of these features have not been
committed, as I work on my own modified UI here. The three features need
toggle buttons to turn them on and off.

I used the following 3 buttons (first two features are in userprefs,
third as a 3d view setting):

        uiDefButBitS(block, TOG, USER_AUTOPERSP, B_DRAWINFO, "Auto Persp",
            (xpos+edgespace+(3*medprefbut)+(3*midspace)+smallprefbut+2),y3+10,smallprefbut,buth,
            &(U.uiflag), 0, 0, 0, 0,
            "Automatically switch between orthographic and perspective");

        uiDefButBitS(block, TOG, USER_LOCKAROUND, B_DRAWINFO, "Global Pivot",
            (xpos+edgespace+(4*midspace)+(4*medprefbut)),y3+10,smallprefbut,buth,
            &(U.uiflag), 0, 0, 0, 0,
            "Use global pivot setting for all 3d views");

    uiDefIconButS(block, TOG|BIT|10, B_AROUND, ICON_ALIGN,
                xco+=XIC,0,XIC,YIC,
                &G.vd->flag, 0, 0, 0, 0, "Translate only (align)");

Someone needs to add these to the interface in an appropriate manner!

Thanks.
2004-07-15 13:31:18 +00:00
Ton Roosendaal
9905d1c68d Rewound changes done in alpha calculus for texturemapping. This
worked OK for alpha coming from antialising (rendered) but failed to do
in other situations (alpha as blending, painted in gimp)
2004-07-14 18:18:21 +00:00
Alejandro Conty Estevez
9510c97833 cache_size yafray parameter calculation changed to sync with current
yafray cvs code. Now given in screen coords (-1,+1)x(-1,+1)
2004-07-14 10:20:56 +00:00
Brecht Van Lommel
13d4c0a5fb LSCM:
Fixed a bug where the projection axis for the initial solution was wrong,
causing the solution to collapse into one point.
Made packing denser (by reducing the padding between face groups).
2004-07-13 20:53:51 +00:00
Ton Roosendaal
419e5a6a0b Removed VECADD and VECSUB, are in utildefine.h now 2004-07-13 20:39:32 +00:00
Alfredo de Greef
b64afb526a Removed some testcode from yafray_Render.cpp
Added the missing anti-aliasing pixel filter size and threshold parameters for manual AA control (disable 'Auto AA' button).
Added support for yafray raytraced depth-of-field.
Added extra panel for Camera in edit window to edit dof paramaters.
The actual focus point will be drawn as a cross when camera 'ShowLimits' is enabled, similar to the aqsis code in tuhopuu.

Note to users: raytraced DoF is very slow, for best results, the default AA parameters are not good enough, especially with higher aperture values (more blur).
So for best results, disable 'Auto AA' and set the AA parameters yourself.
It works best with multi-pass AA ('AA passes' > 1) and a reasonable 'AA samples' value, something in the range 8 - 25 or even higher.
Currently the post-process DoF is not available in yafray, alternatives are being worked on.
2004-07-13 19:22:41 +00:00
Brecht Van Lommel
e077328122 Added LSCM UV Unwrapping:
http://www.loria.fr/~levy/Galleries/LSCM/index.html
http://www.loria.fr/~levy/Papers/2002/s2002_lscm.pdf

Implementation Least Squares Conformal Maps parameterization, based on
chapter 2 of:
Bruno Levy, Sylvain Petitjean, Nicolas Ray, Jerome Maillot. Least Squares
Conformal Maps for Automatic Texture Atlas Generation. In Siggraph 2002,
July 2002.

Seams: Stored as a flag (ME_SEAM) in the new MEdge struct, these seams define
where a mesh will be cut when executing LSCM unwrapping. Seams can be marked
and cleared in Edit Mode. Ctrl+EKEY will pop up a menu allowing to Clear or Mark
the selected edges as seams.

Select Linked in Face Select Mode now only selects linked faces if no seams
separate them. So if seams are defined, this will now select the 'face group'
defined by the seams. Hotkey is still LKEY.

LSCM Unwrap: unwrap UV's by calculating a conformal mapping (preserving local
angles). Based on seams, the selected faces will be 'cut'. If multiple
'face groups' are selected, they will be unwrapped separately and packed in
the image rectangle in the UV Editor. Packing uses a simple and fast
algorithm, only designed to avoid having overlapping faces.

LSCM can be found in the Unwrap menu (UKEY), and the UV Calculation panel.

Pinning: UV's can be pinned in the UV Editor. When LSCM Unwrap is then
executed, these UV's will stay in place, allowing to tweak the solution.
PKEY and ALT+PKEY will respectively pin and unpin selected UV's.

Face Select Mode Drawing Changes:
- Draw Seams option to enable disable drawing of seams
- Draw Faces option to enable drawing of selected faces in transparent purple
- Draw Hidden Edges option to enable drawing of edges of hidden faces
- Draw Edges option to enable drawing of edges of visible faces

The colors for these seams, faces and edges are themeable.
2004-07-13 11:48:52 +00:00
Brecht Van Lommel
4f1c674ee0 Added SuperLU 3.0:
http://crd.lbl.gov/~xiaoye/SuperLU/

This is a library to solve sparse matrix systems (type A*x=B). It is able
to solve large systems very FAST. Only the necessary parts of the library
are included to limit file size and compilation time. This means the example
files, fortran interface, test files, matlab interface, cblas library,
complex number part and build system have been left out. All (gcc) warnings
have been fixed too.

This library will be used for LSCM UV unwrapping. With this library, LSCM
unwrapping can be calculated in a split second, making the unwrapping proces
much more interactive.

Added OpenNL (Open Numerical Libary):
http://www.loria.fr/~levy/OpenNL/

OpenNL is a library to easily construct and solve sparse linear systems. We
use a stripped down version, as an interface to SuperLU.

This library was kindly given to use by Bruno Levy.
2004-07-13 11:42:13 +00:00
Ton Roosendaal
4a13a5720d Ack! Fixed something without testing... this broke updates for numbuts
in picker.
2004-07-12 21:40:41 +00:00
Johnny Matthews
ab200e3f92 This commit add the clock wipe effect to the sweep menu in the sequence editor 2004-07-12 17:59:42 +00:00
Alfredo de Greef
f32b8e6b7f added support for ortho camera (needs yafray from cvs)
When using xml export, yafray will now render the alpha channel as well when 'RGBA' button in blender is enabled (Plugin does this automatically).
In plugin code, fixed smooth shading bug for non-mesh objects.
Relative paths for textures are now recognized (plugin & xml).
Fixed problem with duplicate objects (plugin & xml).
Really old bug, sun position is now correct (plugin & xml).
World background now can also be a regular image texture (jpeg & tga), but for now always assumes spheremapping, which is not the same as Blender either. In yafray the texture is assumed to be a full 360 (panorama type) map.
convertBlenderScene.c cleanup, the identity transform 'hack' is removed.
THIS AFFECTS ALL EXTERNAL RENDERERS (Aqsis and others) WHICH RELY ON THE RENDERDATA OUTPUT, VERTICES AND LAMPCOORDINATES/VECTORS NOW NEED TO BE TRANSFORMED BACK TO WORLD COORDINATES. See yafray plugin/export code.
2004-07-12 03:20:31 +00:00
Simon Clitherow
c90ffd49e0 - changed sequence for finding HOME on Win32. Sequence is now as
shown at http://www.blender3d.org/cms/Installation_Policy.352.0.html

   Still TODO:  update NSIS installer script to suit the change.
2004-07-11 21:54:18 +00:00
Ton Roosendaal
612eb7c193 - Simple optimizing for deflected (collision) particles. It now caches
transformation (from vertex -> world space), used defines for vecadd and
  vecsub, and intersects quads more efficient.
  Result is about 2 times faster.

- Added draw mode for empty used as forcefield

- added defines VECADD and VECSUB
2004-07-11 13:17:03 +00:00
Ton Roosendaal
6b092cf8ad Tiny cleanup in call for glBitmap. Don't see any error in using it for
drawing vertices... on OSX this works 100%, also in zbuffer mode and with
transparent faces.
Code is simple enough for a linuxer to further test!
2004-07-11 08:46:26 +00:00
Matt Ebb
44a99d2596 Some tiny dialog message cleaning for easier scan-reading. 2004-07-11 04:44:50 +00:00
Ton Roosendaal
107e0c5036 Forgot to include glutil.h 2004-07-10 21:44:45 +00:00
Ton Roosendaal
eac4e86539 Long on the todolist: a patch to have pointsize working on systems that
don't have them larger than 1, since vertices are drawn with it.

It is solved by patching code with minimal confusement. So you can get
automatic patched glPoints with:

bglBegin(GL_POINTS);
bglVertex3fv(vector);
bglEnd();

In glutil.c the wrapper can be found, that checks for maximum Pointsize,
and bypasses it to a glBitmap then.
2004-07-10 21:35:17 +00:00
Johnny Matthews
d5272c665f Added B_NOP to events buttons on wipe type effects panel. 2004-07-10 20:19:53 +00:00
Ton Roosendaal
2a2a800da4 Small improvement in detecting which previews need update in Blender.
Now you can have multiple buttons windows open, for example one showing
only a larger material preview, and have it updated correctly. Nice for
setups where you can keep preview shown while scrolling buttons.
2004-07-10 19:56:27 +00:00
Ton Roosendaal
4e9ddbdc4c Added colorpicker in Panel for:
- Transform properties 3d win, while Vertex/Texture paint is on
- Paint panel in UV window

Note; both use the same GVP struct to store current color in. Also the
function used now to add picker isn't complete... might need further
thinking over. Consult me when you like them in more places.
2004-07-10 17:40:40 +00:00
Wouter van Heyst
5b0e27de5c More closely implement the Installation Policy
<http://www.blender3d.org/cms/Installation_Policy.352.0.html>

- Within those confines 'ERROR: File ".Blanguages" not found' won't show up
  again (all such bugs in tracker have already been closed, #745 for reference)

  And intrr, if it does, 'cp -a .blender ~' already :P


Of course, this issue should not be fixed on a per file basis (.Blanguages,
.bfont.ttf), but instead return the .blender dir location. Duplicating .blender
finding logic everywhere, sigh.

< jesterKinky> that's what I meant. for now this is ok to continue with, and then in a later stage correct it all in one bigger effort
< jesterKinky> and since you point code at policy url we all can get reminded of how it was supposed to go when cleaning it.
< LarstiQ> jesterKinky: yes, I meant to do a "grrrr, this is the last time I'm not fixing the underlying issue"
< LarstiQ> all your lazy coders are belong to me
< jesterKinky> set us up the superficial bugfix
2004-07-10 13:48:12 +00:00
Ton Roosendaal
448d89ef76 Added edges in Mesh undo.
Note; whether or not edges are created is derived from original Mesh, the
one still residing in obedit->data while modeling.
2004-07-10 13:11:22 +00:00
Ton Roosendaal
73d4500517 Changed weird line in add_primitiveMesh() that caused cursor to flip back
to normal mousepointer while in editmode.
Was in code since 2.25...
2004-07-10 12:04:03 +00:00
Martin Poirier
ce4c291f42 Made effector strenght as big in the negative as in the positive. 2004-07-10 10:33:02 +00:00
Martin Poirier
2a8abfc143 Compressed the two particles effectors loop into one. It was rather stupid of me to do it as two at first, but it was the first thing that came to mind. Fixed now, so it will calculate much faster. 2004-07-10 09:17:25 +00:00
Martin Poirier
6c15a98e76 Fix metaball update bug when mirroring in object mode 2004-07-09 15:23:49 +00:00
Martin Poirier
c2a5da5cf7 Fixed for forcefield. It needed to add half of the acceleration as speed on each frame it affected.
Cleaned the GUI for effectors: Widen the panel and the buttons. Made the button text more conformed.
Added vortex field for particles.  Particles swirl around z-axis of the object. Little hackish, could be made better.
2004-07-09 14:39:06 +00:00
Ton Roosendaal
7ba95846ca Typing values in color picker got a mixup in but->func() usage... caused
weird values to be set after entering a value. Nicely solved now.
2004-07-09 09:21:37 +00:00
Ton Roosendaal
ec64e0d743 Two little fixes in administrating new Mesh edges. Solves crash when
joining newly created (Added) Mesh with others...
2004-07-09 08:15:57 +00:00
Ton Roosendaal
f77bc7eb7d Quite a large one this time... but now we have:
Edges in Mesh
- adds automatic when you use creases. For other situations; call the
  void make_edges(Mesh *me) in mesh.c. Of course, once in editmode the
  edges are automatically recreated.
- in F9 buttons you can add/remove edges too
- both for Mesh and DisplistMesh, so it speeds up drawing quite some in
  wireframe
- render for edges can't work... edges have no material nor tface nor col..
  so here still the faces are rendered in wire

Creases in Subsurf
- based on the code by Chris McFarlen
- main changes is that now edges are used, saving quite some data in file
- use SHIFT+E in editmode to set edges-sharpness. values go from 0-1
- in F9 buttons you can set draw-crease mode. It draws now blended from
  wire color to edge-select color (as provided in Theme)

Known issue: setting sharpness on 1 cube (subdiv 2) gives weird results
with some values... Chris, can you check?

Further; code cleanups, changing 0 in NULL when needed, no warnings, etc etc
2004-07-08 20:38:27 +00:00
Nathan Letwory
6757a8159b * fixed bug in rainbow color for material and world ipoview
* removed 32 channel limit (can now have 50, or of you know what number to change, 999 ;)
* added new IPOs: mirror fresnel and fac, transparency fresnel and fac, and glow factor transparent materials (add)
2004-07-07 08:49:33 +00:00
Brecht Van Lommel
2388cada01 Fix compile error: the 'log' function takes only one parameter: changed
log(xo, 2) to log(xo)/log(2).
2004-07-06 22:25:14 +00:00
Johnny Matthews
9c94728d89 This is the initial commit of a revamp of the sweep effects that goofster committed that was originally a sequence plugin from sirdude.
The changes from the original include the ability to add a blurred edge with a selectable width to the wipe and to rotate the effect.

Has these sweep types included already
-single
-double
-iris

These still need to be coded
-box
-cross
-clock
2004-07-06 19:07:13 +00:00
Ton Roosendaal
5b09bb1eb1 - Removed new outline drawing from vpaint/faceselect and other paint modes
- fixed tooltip drawing in color picker
2004-07-06 16:32:44 +00:00
Ton Roosendaal
181b970bf4 Fixes in colorpicker;
- click on palette didn't update button values
- the bottom 'palette' button now restores to old color
- H values scroll allways, also with black or white

Todo still:
- save in file (btw, i changed default colors to my pref :)
2004-07-06 12:49:57 +00:00
Ton Roosendaal
4321a8889e Colorpicker variant 2; One large field for S and V, and slider for H, like
Gimp has for example.

The previous picker is still as code there... ongoing experiments.
2004-07-05 22:15:27 +00:00
Ton Roosendaal
20dbb446ed Picker made slightly larger, and removed confusing "copy to" and "paste
from" buttons.

Now a click in palette is default: update the active color.
If you want to store in palette: hold CTRL while click.

This isn't optimal either, but at least better.
2004-07-05 20:45:41 +00:00
Ton Roosendaal
ba2081b21d Fixed NUM button code that it doesn't return halfway, but nicely proceeds
to end of the function to handle the exit requirements.
(returns where added for patch that makes NUM buttons into textbut on a
click in center)
2004-07-05 17:48:47 +00:00
Ton Roosendaal
fa86302aa3 Cleaned up pop-up menus for F10; edge settings and framing menu. 2004-07-05 10:56:13 +00:00
Ton Roosendaal
e804cf366a - oh, the protype for XORcircle... 2004-07-05 10:22:41 +00:00
Ton Roosendaal
a910ff343e - clipped selection circle in colorpicker to prevent it drawing outside
the color plane
- removed warnings from glutil.c, made circleXOR call become float instead
  of short
- fixed error in drawing text of buttons in pop-up menus, when zoomed small
2004-07-05 10:22:00 +00:00
Ton Roosendaal
3cade4dad6 Changed redraw of picker not to include the background, prevents flashing. 2004-07-05 09:21:22 +00:00
Nathan Letwory
0576268c22 * Added IPO for displacement, translucency and raymirror
* Cleaned out IPO #defines
2004-07-05 09:15:02 +00:00
Ton Roosendaal
cd47cfd3d1 New: color picker!
With a click on the 'COL' buttons (the ones showing RGB) a menu pops up
with three colorpicking fields and a palette.
The fields are the three planar intersections of a HSV cube, each allowing
choosing in the field without the field changing.

The palette is 'modal' unfortunately (couldn't find a simple working other
method) where the button "paste to color" denotes the state that click in
palette copies to edited color, and "copy to palette" means the active
color is copied into the palette...

Todo:
- saving of palette in file
- decide whether ESC leaves without changes...
2004-07-05 08:48:17 +00:00
Matt Ebb
c1ce82bd67 Directly edit number fields with a click instead of having
to use Shift-Click.

As before, clicking on the left side of a number field decreases, clicking on the right side increases, but clicking in the centre, on the text itself, starts editing the
value directly. Other behaviour like dragging left and right
is unchanged.
2004-07-05 07:52:32 +00:00
Joseph Gilbert
34ae24e37a - py docs update
- getMatrix(), properties for object class, some examples
2004-07-04 19:57:41 +00:00
Ton Roosendaal
b2d7f47b81 Made static particles working with a deformed Mesh, both for Lattice as
for Armature. Note: only works for subsurfed Mesh now!

Change in drawobject.c: Halo option on subsurf Mesh now draws points.
but using the original vertices...
2004-07-03 18:39:19 +00:00
Willian Padovani Germano
cbe7471905 Interface:
- added submenu "Scripts" in both View3D->Object and Mesh menus.
  Put them on top (it's better to follow some guideline, so users don't have to search for "Scripts" submenu in a different position in each menu), feel free to change.
- added button 'previous win' to SpaceScript, makes accessing buttons win, for example, much faster.  Maybe all spaces could have this button.

BPython:
- added Window.EditMode(), to check, enter and leave edit mode.  Scripts that change mesh data need this to leave edit mode before making changes to the active (G.obedit) mesh, of course.
- updated script bevel_center to use the above function and also popup an error msg if the active obj is not a mesh.
- doc updates, minor fixes.

Forgot to mention in my previous commit that I also updated the "-P" command-line option (for running script files) to be able to run already loaded Blender Texts, too.  So, if you have a script called 'Text' in foo.blend, you can run it with blender foo.blend -P Text .
2004-07-03 17:28:15 +00:00
Ton Roosendaal
5c543698c9 Three in one:
- textures: added support for new mixers (div, diff etc) to work on the
  other map-to channels too, like ref or spec
  Also it works on lamp and world textures
- brought back uncommented line of code that was removed by leon, to have
  particle motion based on textures
- recoded the glPylonOffset hack to be nice function, this for future
  testing.
2004-07-03 14:18:21 +00:00
Willian Padovani Germano
9282827720 New scripts:
- hotkeys, obdatacopier and renameobjectbyblock, all from Jean-Michel Soler (jms);
- bevel_center by Loic Berthe, suggested for inclusion by jms;
- doc_browser, by Daniel Dunbar (Zr)

  Thanks to them for the new contributions!

  (I included doc_browser at 'Misc' because only users interested in script writing would actually use it, but it could also be under 'Help'.  Opinions?)

BPython related:
- Added scriptlink methods to object, lamp, camera and world.
- Object: added object.makeTrack and object.clearTrack (old track method).
- sys: made sys.exists(path) return 0 for not found; 1 for file, 2 for dir and -1 for neither.
- doc updates and fixes.
- made ONLOAD event work.  G.f's SCENESCRIPT bit was being zeroed in set_app_data.
- Blender: updated functions Load and Save to support the builtin importers and exporters besides .blend (dxf, videoscape, vrml 1.0, stl, ...)
- Draw: added mouse wheel events.
- Scene: added scene.play to play back animations (like ALT+A and SHIFT+ALT+A).  Makes a good counter, too, when the 'win' attribute is set to a space that doesn't "animate".

The scene.play() addition and the fix to ONLOAD scriptlinks is part of the work for a Blender demo mode.  It already works, but I'll still add support for Radiosity calculations and fix a thing in main(): it executes onload scripts too early (BIF_Init), giving funny results in alt+a animations and renderings when firing up Blender.  Loading after the program is up has no such problems.  When I finish I'll post examples of demo mode scripts.
2004-07-03 05:17:04 +00:00
Ton Roosendaal
90d4f7a3c1 Added new operators for "MapTo" panel as suggested & partially coded by
Kent Mein. So next to the mix, mult, add, sub we have now:

- Div: divides by texture color
- Screen: is like Mult, but works opposite (makes lighter)
- Diff: the difference between texture color and material
- Light: if texture is lighter it shows (per component)
- Dark: if texture is darker it shows (per component)

Next step: add this for specular and mirror, and the other channels...
I commit it now because it also fixes error in previous commit.
2004-07-02 22:29:06 +00:00
Ton Roosendaal
326f3c3d6a Fixed rendering of image textures with alpha... it gave ugly dark outlines.
Please note the following:

- pictures need to be saved as 'premul' sky render if you want to use it
  in Blender as texture
- but for alpha-over in sequencer it has to be 'key alpha'...

This inconsistancy needs to be solved.. for example as option for both
texture as sequencer.
2004-07-02 20:49:08 +00:00
Ton Roosendaal
265450dcb5 Added new exported render calls in stubs... so player compiles again! 2004-07-02 13:51:33 +00:00
Ton Roosendaal
ef9fa4bf50 Bug #1411
"inserting keys in editmode didnt work on newly created Meshes"

Found out the error was in code committed by Hos in december, when
he added feature to copy newly added vertices (or remove) when editing
vertex keys. In his commit he already noted "please test" :)

Error was that newly created meshes didn't give a correct first key.  For keys
to work in 2.32 and 2.33 you have to leave editmode at least once, or
insert keys outside of editmode.

The fix was fairly simple, just checking for an empty first key.
2004-07-02 12:44:32 +00:00
Ton Roosendaal
ea7e5c9f41 Forgot to add code for copying/paste functionality Materials. With new
ColorBand data added in Material that needs to be tackled corectly.
2004-07-01 18:06:27 +00:00
Ton Roosendaal
30251dbc13 Report #1401
Division by zero in calculating render coords... only happens for
Wire material AND having face-less edges. Then the normal is zero, and
some calculations can't happen correctly.

(error in rendercore.c, other files committed was because of removed and
cleaned up enters)
2004-07-01 16:15:22 +00:00
Matt Ebb
7fc5114408 Corrected a misleading confirmation message when deleting a bone ("Erase selected bone", not "Erase selected armature") 2004-07-01 09:31:12 +00:00
Ton Roosendaal
d4755e8c5c Fixed draw error in panels, the header was overdrawn with panel background.
Only visible when panels are not transparent.
2004-06-30 21:59:12 +00:00
Ton Roosendaal
a8ef804146 NEW: Ramp shades for diffuse and specular
http://www.blender3d.org/cms/Ramp_Shaders.348.0.html

Material color and specular now can be defined by a Colorband. The actual
color then is defined during shading based on:
- shade value (like dotproduct)
- energy value (dot product plus light)
- normal
- result of all shading (useful for adding stuff in the end)

Special request from [A]ndy! :)
2004-06-30 18:54:09 +00:00
Kester Maddock
c9b4585618 Switch to using floats instead of shorts for normal data - they're supposed to be faster.
Also use shorts instead of ints for the index data, since index arrays are limited anyhow.
2004-06-30 13:41:19 +00:00
Kent Mein
09d3007b71 Two stupid fixes for warnings:
First one was for drawview.c I gave some types to things that didn't have them
example
-static void view3d_panel_background(cntrl)     // VIEW3D_HANDLER_BACKGROUND
+static void view3d_panel_background(short cntrl)       // VIEW3D_HANDLER_BACKGR

For edit.c I added a newline to the end of the file.

Weee

Kent
2004-06-29 20:34:10 +00:00
Jiri Hnidek
7000bebc4b - added octal tree node optimalization of MetaBall polygonisation
polygonization of 512 MetaBalls:
   - version 2.33a:      76 s
   - current cvs version 8 s

- button "Never" is added in button window: Metaballs are polygonized only during render time (it is useful for particle animation) http://e-learning.vslib.cz/hnidek/misc/bowl_metaballs.blend
2004-06-29 17:10:13 +00:00
Ton Roosendaal
b460748777 Metaball normals were flipped again... thanks jiri for pointing me to it... 2004-06-28 11:14:58 +00:00
Alejandro Conty Estevez
7febd4547d Finally, fixed the evil dll problem. It works now
on my win32 box with my tests without crashing.
But be aware! There may be more of them watching
us, waiting for a moment of distraction, nobody
is safe.
2004-06-27 20:10:20 +00:00
Ton Roosendaal
b8f73db964 added fflush(stdout) for printf updates while calculating particles 2004-06-27 14:05:08 +00:00
Ton Roosendaal
e750478ce3 The revised patch from Leon for new particle effects.
New is that objects can have a force field, and Meshes can even deflect
(collide) particles. This is in a new sub-menu in Object buttons F7

The full instructions where on the web, Leon mailed it me and I will put
it in CMS tomorrow. For those who like to play with it now, here are demo
files:

http://download.blender.org/demo/test/

Quite some changes where in the integration though... so previous created
particle deflectors will not work. Changes to mention now are:
- gravity is renamed to 'force field'
- force field and deflector options are in Object now, not in Mesh
- the options also have its own struct, doesnt add to Object by default
- force fields are possible for all object types, but only work on center.
  So empty objects are typical for it.

Work to do:
- add draw method in 3d win to denote forcefield objects
- check on the UI (panel with different size?)
- add 'recalc' button in deflector panel
2004-06-26 18:18:11 +00:00
Ton Roosendaal
263d0823d3 Changes in code to allow double sided energy, but it's not possible
to activate it. Added comment in code how to enable it for those who
like to play (search for translu)

What doesnt work - according to me not satisfying - is fact that radiosity
hemicubes alias badly on short distances, so interior light doesn't spread
well.
2004-06-26 18:03:57 +00:00
Joseph Gilbert
2a6c8a2797 - added support for getting worlspace and localspace matrices from objects through python. Add cvars matrixWorld/matrixLocal.
- credits to Campbell Barton
2004-06-26 14:38:56 +00:00
Kester Maddock
4c53f38756 Minor Fixes:
Better use of booleans for python
#include fixes for Windows
Python Doc fixes
Use the farthest vertex as the face position when z sorting faces. (Camera is on -z axis!)
2004-06-26 09:15:41 +00:00
Alejandro Conty Estevez
f69cc652e2 minor changes to sync with yafray cvs interface, getting closer
to the clean msvc build.
2004-06-24 21:17:52 +00:00
Ton Roosendaal
855c6861ef The other fix for drawing XOR lines, now for dragging window edges too.
Main 'improvement' is it not using the gl_util function, but drawing it all
itself, and thus minimizing the amount of flush calls (factor 4).
2004-06-24 15:12:45 +00:00
Willian Padovani Germano
d5b4fb5736 Scripts:
- Added KlopUtils by Carlos Lopez and Batch Object Name Edit by Campbell Barton (thanks both!)

BPython:
- Fixed things I recently broke in Blender.sys, added Blender.sys.join(dir, file)
- doc and other minor updates
2004-06-24 15:03:08 +00:00
Ton Roosendaal
e306beec04 Screen edge split routine now uses 4 times less glFlush calls.
Is a testing commit... might be removed or further worked out.
2004-06-24 14:53:00 +00:00
Willian Padovani Germano
61efb63b0c BPython:
- Added function Blender.Save(filename) to save .blend files.
- Added scriptlink-related methods (get, clear, add) to Scene and Materials.  Will still add method remove and add these methods to World, Object, Camera and Lamp.
- Updates and small fixes in docs.
2004-06-24 09:43:13 +00:00
Roel Spruit
8a0cd0bc97 Added another Sequence effect: the wellknown Glow effect. 2004-06-23 22:11:57 +00:00
Ton Roosendaal
eec72e3d4b Feature requests:
- usage of relative paths "//" now can be controlled with a button in the
  fileselect header
- relative path support added for linked Library files

Note: in oops window you can see the library file names, select the last
icon button in header to show the blocks.
2004-06-23 18:48:55 +00:00
Roel Spruit
629e526b25 - Added correct Writing/Reading of the new Sweep sequence effect (Thanks Ton, where would I be without you)
- Sweep effect updates after you change the type of sweep now.
2004-06-23 18:22:51 +00:00
Kester Maddock
9fa857b5c7 Fix a compile error in data conversion: double declaration of some vertex attributes. 2004-06-23 12:13:09 +00:00
Kester Maddock
38de9559bc Fix for reflection mapping unlit faces: normals were not being sent, hence reflection maps weren't being rendered properly (bf-bug #1385)
Set the diffuse material colour - lighting brightness should match blender better. (bf-bug #1385)
2004-06-23 01:12:11 +00:00
Ton Roosendaal
b506d93f0e Report 1387 (todo)
Added consistant zoom in ipo, oops, sound, sequencer, nla, action. This
conforming the new user setting too (cont, dolly, scale).
2004-06-22 14:35:35 +00:00
Ton Roosendaal
01bb620574 Fixed another oldie; when loading file the totals counter (as displayed in
info header) didn't update. Also removed convention it counts from active
window-layer, now it uses scene layer.
2004-06-22 12:59:53 +00:00
Ton Roosendaal
f2be1db99d Little feat request: the rendertime disappeared from header after a
rendering; now it's a permanent part of it.
2004-06-22 12:02:19 +00:00
Jacques Guignot
f89f32d420 added a new function to the World module : GetActive(), which returns the world associated to the scene, or None if no such world exists 2004-06-22 11:38:58 +00:00
Ton Roosendaal
59433aa42e Report #1391
The work i did end of may on render normals (displacemap especially)
caused refraction code to work wrong... took a while to find out, but
just removed a couple of lines too much.
Added clear comment there what it is, and what danger of removing is!
2004-06-21 17:58:53 +00:00
Ton Roosendaal
e26c5a7676 Report #1376
Rayshadow didn't use lamp option 'layer' correctly. Objects not in
lamp-layer now also don't get shadows (nor light).
2004-06-21 16:07:50 +00:00
Ton Roosendaal
52bf2db342 Fix: creating a Mesh primitive UV Sphere, used a remove doubles to get
rid of the seam (it's a Spin command!). The threshold value for remove
was set on 0.01, giving too easy errors. Now its 0.0001
2004-06-21 14:40:31 +00:00
Willian Padovani Germano
a41759cb8b - Scripts:
Campbell Barton updated his Wavefront OBJ scripts and Ben Omari updated his DirectX 7 and 8 ones (thanks both).  The other listed scripts had minor updates to accomodate the menu changes.
- Scripts in menus:
  renamed Tools to Object, Generators to Add, and Modifiers to Mesh (Metaball, Curve, Surface can be added later), to integrate better in the interface.
- Fixed a bug in Blender.sys.makename: last letter of file extension was being cut out.
2004-06-21 12:01:23 +00:00
Alejandro Conty Estevez
625e7fb12c These are changes sent by Luis_F who got this working on win32. Only applies
to that platform and fixes a problem findind yafray dll's
2004-06-21 08:17:05 +00:00
Ton Roosendaal
f778d83155 Bug fix 1326
When changing subsurf level, in shaded mode, and with Mesh that has more
users... the shaded displist of the other meshes are corrupt, potentially
causing crash.

And: small improvement in select-outline: when drawtype-extra Wire is set,
it skips it. Not needed, looked a bit ugly.
2004-06-19 18:23:22 +00:00
Ton Roosendaal
84caaf5aca Fixed error in previous commit, that skipped drawing non-basis Mballs.
Thanks Jiri for pointing me to it!

New: removed frontbuffer draw of selected object for solid/shaded mode.
It serves no purpose anymore.
2004-06-19 17:35:37 +00:00
Ton Roosendaal
830028560e Tooltips:
- lowered tooltip-update delay loop to 0.02 sec (was 0.05), which showed
  up 'trails' while going over pulldowns with tooltips
- changed tooltip calculation for size, it was drawing the labels far too
  large (height). Made sure text prints in middle too.
- by default tooltips print 12 pixels below button now
2004-06-19 14:37:25 +00:00
Ton Roosendaal
6fdea0ffe7 Popular request: the floating panels (NKEY) now close on a 2nd NKEY command.
This for all current NKEY menus by default. Can be standard for each hotkey
controlled Panel from now on; use toggle_blockhandler() for it.

Another popular request: hotkey enabled Panels now optionally reopen on
the previous location, instead of under mouse. This option "Pinned" is a
user option now. Optional for later; have it as per-panel option... dunno!

The last request, close on mouse-exit, won't be implemented, this intrudes
with Panel consistancy, and is pretty OK solved with NKEY-NKEY now.
2004-06-19 12:25:28 +00:00
Ton Roosendaal
8617ce5141 - added Font object to have outlines on Solid draw + selection
- Font object didn't support draw xtra wire yet
- removed drawing the circles from MBall object, except in editmode
- little cleanup in draw_object() call, it had a weird exception for
  mball drawing
2004-06-19 09:35:23 +00:00
Roel Spruit
a31dec3712 added a new Sequence Effect: Sweep.
this consists of 22 different ways to sweep from 1 strip to another. For you windows lovers: it's like "Blinds" in Powerpoint :)
- in the NKEY menu you can choose which type you want perform, vertical, horizontal, in/out etc. it's too much to decribe.

Credits for this go to Kent 'Sirdude" Mein who coded the sequence plugin I stole the code from.

To allow certain sequence effects to have settings, I also added a "varstr" void pointer to the Sequence DNA, that can point to a special struct for each effect. This is similar to how plugins are handles.

more neat effects to come....
2004-06-18 22:53:06 +00:00
Johnny Matthews
d222422c7f This patch makes the vertex loop select tool only select edges which are part of 2 faces, this cleans up some incorrect selections the tool was making around areas in the mesh where faces had been deleted.
closes bug 1343

guitarGeek
2004-06-18 20:04:39 +00:00
Johnny Matthews
ace24ac5b4 This is a bandaid for a logic error in select_vertex_loop() that prevents an infinite loop in some cases. A fix for the logic error will come when I find the error :)
guitarGeek
2004-06-18 17:50:49 +00:00
Roel Spruit
401d9ef738 Added the possibillity of naming sequence strips in the sequence editor. previously this was not possible for all types.
- Change the name of a strip in the NKEY menu of the strip.
- If a strip HAS a name, it will be displayed in the strip, instead of all that garbage that was previously there (image locations, lengths, whatever)

Still TODO: while adding new effects to the sequencer I will also add this for effect strips. at the moment it's not clear yet what should go in the NKEY menu.
2004-06-18 15:04:27 +00:00
Ton Roosendaal
4861dbbe50 Scene.c: added missing code to copy base to object flag
Drawobject.c: added wireframe outline for selected solid objects. needs
some feedback though, at my system it is quite slow.
2004-06-17 18:31:42 +00:00
Alejandro Conty Estevez
5fb7fbe391 NaN makefile fix for yafray dir and typo corrected on "xml" button tooltip 2004-06-17 16:34:27 +00:00
Alejandro Conty Estevez
cfbce399aa These are changes necessary for building with msvc in a near future.
Just making sure memory is always allocated and freed in the same
binary  object, which seems to be mandatory on msvc if you don't have
the comercial version. If you are using this code you need to
syncronize with yafray cvs also, or it won't work. Binaries for os x
are updated in the link I gave in my last commit.
2004-06-17 11:24:30 +00:00
Ton Roosendaal
b106d1b8b6 Added Panel support in Sequence window, and converted old Nkey menu for it. 2004-06-16 20:25:56 +00:00
Alejandro Conty Estevez
ed86852f7e New export through plugin scheme for yafray. It is working on linux and mac os x
Needs latest yafray, you can get it from cvs, but I have also binaries
for os x here:

http://www.coala.uniovi.es/~jandro/noname/downloads/yafray-0.0.6-3.pkg.zip

To use it, go to yafray panels (global settings) and uncheck the "xml" button.
That would tell the export code to avoid xml export and use the yafray plugin
instead. You'll see the render being draw while running and you can even stop it
with ESC key.

Since I'm sure problems will appear, expect updates soon.
Remember: does not work on win32
2004-06-16 18:44:12 +00:00
Ton Roosendaal
54f9086d3c Restored oldstyle zoom in/out, and added a new userpref for denoting zoom
types:

- Continue: is default, old style
- Dolly: is like previous, but not continuous
- Scale: is the new method. Name is based on fact it scales view
2004-06-16 13:31:32 +00:00
Kester Maddock
4091851043 Replace all glFinish() with glFlush().
This is supposed to fix gradual slowdown of Blender interface on ATI cards.
2004-06-16 11:34:45 +00:00
Willian Padovani Germano
ddec3db89d - New Blender.Draw method by Campbell Barton (Cam / ideasman):
PupStrInput, a wrapper for the Blender String popup (thanks!)
- Fixed bug #1374 reported by Gabriel Beloin (gabio, thanks too):
    http://projects.blender.org/tracker/?func=detail&atid=125&aid=1374&group_id=9
    There was a minor mistake in the import menu: vrml called dxf and vice-versa and shortcuts were wrong (removed them).
- Doc updates, minor updates elsewhere.
2004-06-16 01:18:57 +00:00
Jacques Guignot
23165676b7 updated documentation 2004-06-15 16:17:25 +00:00
Willian Padovani Germano
467311ad34 - New script:
Wim Van Hoydonck contributed the famous Knife script (put under Modifiers group) developed by Stefano Selleri and himself (thank to both!)
- Added helper function Blender.sys.makename, updated docs and script ac3d_export to use it (shall update other exporters too):
  this function is just a simple helper to format a filename as needed (change extension, strip dirname, it defaults to use G.sce as path).
- Added a test method: Blender.Scene.getScriptlinks(eventName):
  just testing, if this path proves useful other functions will be added and made general, for objects, etc.
2004-06-15 04:16:30 +00:00
Matt Ebb
73642b2a42 * Floating panel cosmetic tweaks
* Minor language/label cleanups I missed first time around.
2004-06-14 13:07:53 +00:00
Jacques Guignot
de9e455088 added a [get/set]Range function.
Updated documentation accordingly.
(suggested by Stephane SOPPERA, tks!)
2004-06-14 09:24:50 +00:00
Jacques Guignot
8e48c5c412 updated Metaball doc 2004-06-14 08:55:45 +00:00
Jacques Guignot
9b2626f232 added a new function to the Metaball module, (tks Jiri!) : getMetaElemList
added a new class : metaelem class
2004-06-13 21:26:50 +00:00
Ton Roosendaal
d56315aa18 Bug 1335
Displace mapping + Map-Input using Object wasn't working. This caused
by the inverse matrix of an Object potentially not being calculated when
displace was calculated.

Solved by moving imat calculus to the top of the main function.

Yafray note: the convention to hack out all transformations from
renderconverter could be implemented more elegant, by moving this to
the yafray section (and just matrix-transform back). Makes code less
unreadable, but also support displacement then (and might solve other
errors).
2004-06-13 19:30:56 +00:00
Ton Roosendaal
7f3dcd7c64 Bug 1349
Envmap render error; when no (f10) envmap option was used, it could give
a 'stripe' effect based on a non-initialized global value. Only happens
for transparant layers...
2004-06-13 17:40:25 +00:00
Ton Roosendaal
694ed26f8b Fix for #1355
Recalculate normals (mesh editmode) had some weak points, as demonstrated
in the bug report sample file. It appeared to be 2 aspects that could be
simply fixed:

- for calculation of the most outer face (to set normal outside) it used
  a manhattan distance. making it real distance helped quite some
- but most important: the routine only took triangles into account, which
  didn't work proper with very irregular quads, especially with non-flat
  quads. It now calculates both trias in a quad individually.
2004-06-13 10:18:32 +00:00
Joseph Gilbert
e18194d2ca - update to SCons for Property support 2004-06-11 13:17:36 +00:00
Joseph Gilbert
3a816f1c30 - new internal Property module
- Object support for add/remove/modify object Properties
2004-06-11 13:15:50 +00:00
Willian Padovani Germano
648a2d3819 Script menus:
-- new try so that scripts place their guis and file selectors in proper places:
     should be ok now for any but the really weirdest screen layouts, will be updated when scripts are added to other menus in the interface.
2004-06-11 09:17:49 +00:00
Matt Ebb
79c00d658e * Added a spot for scripts to register themselves in the Help menu
* Gave the spiffy new 'System Information' script a new home there
2004-06-11 02:39:22 +00:00
Matt Ebb
d34f89b755 * Edited and consistent-ified the File->Import menu item labels and fileselect button labels, as discussed on the forums.
* Added items for importing DXF, VRML, etc. in the File->Import menu, that just call the normal Open function. Most people don't even know that you can open these formats through the normal Open fileselect, so this will make it more obvious.

* Removed the 'Export Selected' menu, and put poor old lonely STL in the Import and Export menus too. Most of the exporters export only the selected object anyway, so it's not really a necessary distinction to make.
2004-06-11 02:12:37 +00:00
Willian Padovani Germano
a23c6a71da - small updates to scripts and bpython docs, also fixed two warnings;
- added function Blender.sys.exists(path) to check if a given file exists;
- forgot to mention: in my previous commit the blender.html file was also updated slightly.
2004-06-10 15:14:49 +00:00
Willian Padovani Germano
a6d077bae2 Scripts:
- tiny updates for better behavior, unix line endings, cvs Id tags;
- Updated DX7 exporter (thanks to author Ben Omari who's also working on a DX8 one);
- added sysinfo script;

Interface (scripts):

- changed behavior for which win is chosen for script guis:
    Now there's a smarter order, guis will use either:
    - Scripts win
    - Buttons win (if not a script from groups Wizards or Utils)
    - Text win
    - Closest bigger area
- Added a button to the scripts header so that it's faster to return to the buttons win (this can be made general), if that was the previous win used.
2004-06-10 03:27:46 +00:00
Kent Mein
7ff5c16a02 This fix is thanks to: hangman4 (Thomas Power)
Basically needed a fflush on the file after all of the writing.
This closes out 1080

Kent
2004-06-09 19:49:43 +00:00
Kent Mein
57fc443fe4 Fixed part of write a bmp file, its still truncating the image slightly
however this fixes another problem.  (Basically  the offset wasn't
being computed correctly.
This is for bug: 1080

Kent
2004-06-09 19:27:48 +00:00
Kent Mein
53e1b83f1e updated NAN_PYTHON_VERSION to 2.3 for all platforms...
Solaris and a bunch of the others were out of date....

I guess we should change them back for platforms that don't work out
with 2.3 but I'm guessing that things will get updated better this way
then asking everyone to update their own platforms.

Kent
2004-06-08 15:47:19 +00:00
Jacques Guignot
21580bf21c new function for the Metaball objects : addMetaelem, which allows users to create Metaballs from python.
modified doc/Metaball.py to add this function
modified Object.c to allow the creation of Metaball objects
2004-06-08 07:27:37 +00:00
Willian Padovani Germano
61bb158291 BPython docs: small formatting fixes, basically, so that epydoc can generate dvi, ps and pdf versions. 2004-06-08 04:41:02 +00:00
Kester Maddock
942a68da07 Add the separate spec colour definitions! 2004-06-07 11:57:10 +00:00
Kester Maddock
c16444e624 Python updates:
Added scene module
2004-06-07 11:03:12 +00:00
Kester Maddock
b468bf726c Lighting updates:
Added specular after texture.
Added Light properties: Negative, No Diffuse, No Specular, Quad, Quad2
2004-06-07 11:01:31 +00:00
Willian Padovani Germano
b82be27659 Bundled scripts:
-starting updates and new additions for Blender 2.34:
  Some of the new scripts require Python modules not builtin with Blender, so you either need a full Python install or the needed extra modules.  This is an ongoing work, there should be more scripts, better testing and also proper ways to tell users they don't have all expected modules.  It's expected that Win users won't need full Python installs, since we can provide a minimal zip with the needed modules from 2.34 on.

Thanks to Anthony D'Agostino (scorpius), Jean-Michel Soler (jms) and Campbell Barton (Cam / ideasman) for donating the scripts now added / updated.

BPython:
-added two new script menu groups: Tools and Utils.  We still need to find places elsewhere in the gui where the groups can be put.
2004-06-07 01:34:15 +00:00
Stephen Swaney
a703837179 Replace deprecated methods from old api:
PythonReturnErrorObject
  PythonIncRef

Fix some compiler warnings about missing initializers
in method tables.
2004-06-06 22:42:51 +00:00
Stephen Swaney
d97e3e5527 patch for bug #1347. IpoCurve.evaluate() missing/disappeared.
Contributed by Philip Wainwright.
2004-06-06 19:42:12 +00:00
Chris Want
37ac685951 Fixing something else broken broke: The fix for "no action == crash"
prevented rvk editing to work in the action window.

Please not that "if (act) {" (Does the object have an action? Currently
only true for some armatures) and "if (key) {" (does the object have
rvk's keys? Currently only true for meshes) are never both true at the
same time so in the following snippet, the function foo_key() never gets
executed:

if (act) {
  if (key) {
    foo_key();
  else
    foo_bar();
  }
}

Better is this:

if (key) {
  foo_key();
else if (act) {
  foo_bar();
}
2004-06-05 14:59:30 +00:00
Chris Want
7d6f4cd67f Fixing something broken broke: ICON_BLOCKBUT_CORNER is not defined
anywhere.
2004-06-05 14:46:38 +00:00
Matt Ebb
25c9dd464e * Fixed a crash in the action window when attempting to manipulate keys with no action loaded.
This addresses bug #1354 - Thanks to gabio for the report
2004-06-05 07:13:05 +00:00
Matt Ebb
3038507b1b * Better error checking with apply deformation / make duplis real in the toolbox (blame it on ugly apply_object() )
Addresses bug #1348, thanks wavk for the report
2004-06-05 06:52:14 +00:00
Matt Ebb
506b78bfbb * Big, mundane clean up and edit of (error/ok/etc)
messages and pupmenu()s. Edited spelling and grammar,
 stylistic consistency, etc.

I added the guidelines and rationale that I used to the
 CMS here:
http://www.blender3d.org/cms/Language_and_terminology.338.0.html

Next step is to get icons in there, to make it easier to see
 at a glance what sort of message (and how much attention
 should be paid to it, or if it can be dismissed with a flick
 of the mouse, eg. boring remove doubles notifications)

mockup: http://mke3.net:9000/blender/ui/controls/error_ok_icons.png
2004-06-05 05:55:15 +00:00
Kester Maddock
4b544c75c0 blenderplayer target for SCons.
Would someone on MacOSX please check the bundle creation.
2004-06-04 12:58:46 +00:00
Stephen Swaney
7bf6864360 In Object.select() make the selected object the active object.
Update by Campbell Barton to his previous patch.
2004-06-04 07:52:06 +00:00
Kester Maddock
44f45894c2 Miscellaneous Fixes:
Add Python Mapping method to CListValue
Fix Bernoulli bool distribution python method for random actuator
Fix Python IpoActuator methods setProperty and force acts local
Make data objects private
Better sort method for polygon materials - much easier to understand
2004-06-04 03:00:13 +00:00
Kester Maddock
4ff321d507 Fix bug #1334: Crash with Python/GameEngine when the script has syntax errors.
When Python compile fails (eg syntax errors) skip the execute stage.
2004-06-04 02:10:58 +00:00
Kent Mein
f41c926a12 deleted redefinition of var that is passed in.
Kent
2004-06-03 19:59:34 +00:00
Stephen Swaney
2b7e35b8e7 bugfix #1345. Curve.isNurb() segfault fixed. 2004-06-03 16:23:51 +00:00
Matt Ebb
630de827d7 * Tiny almost-insignificant tweak to the curvature of button drawing 2004-06-03 14:30:12 +00:00
Matt Ebb
5926231d12 * Added 'Transform' menus to Ipo, OOPS, Action, NLA, and
Sequence spaces

* And a few small tweaks
2004-06-03 14:29:14 +00:00
Kent Mein
94042b0fef Cam's patch to enable parenting in the OOPS menu.
Kent
2004-06-03 14:26:44 +00:00
Kester Maddock
bc329a57f9 Fix for MSVC compiler. ;-) 2004-06-02 13:34:58 +00:00
Kester Maddock
cce2180e4b Do a databrowse window for sound actuators when necessary. 2004-06-02 13:17:39 +00:00
Kester Maddock
976e3a1824 Updates to GamePython Reference.
Added Actuator documentation.
2004-06-02 12:43:27 +00:00
Stephen Swaney
474ec217ae new Object.select() and Object.isSelected() methods to manipulate the
selection state of Objects.
Contributed by Campbell Barton.
2004-06-02 06:19:56 +00:00
Chris Want
931b382d76 Fix for the IK Assertion bug when the IK constraint on a bone
points to the armature that owns the bone and the subtarget
bone for the constraint is invalid.

Thanks to Stephane Soppera for tracking this one down.
2004-05-31 13:21:33 +00:00
Kester Maddock
0dfc3a3b78 Use epydoc for generating game python reference (like the bpython guys) 2004-05-31 13:06:04 +00:00
Ton Roosendaal
4f457fa277 Limit for Normalise() call was 0.000000001 or so. This is still far too
big, since a float can go to 10^-37. And, this value is still squared, so
a square root will not frustrate it.

Limit now is 10^-35, fixing disappearing faces in extreme small object
thats extreme close to a camera. (thanks OOPz!)
2004-05-31 12:08:50 +00:00
Jiri Hnidek
2a41593932 - added some "Transform Properties" for MetaElem (Metaball in edit mode, N key). It is locx, loxy, locz, dx, dy, dz and stiffness 2004-05-30 14:12:14 +00:00
Kester Maddock
d38329b5aa Added Python module for Lights.
Added attributes to the vertex class.
2004-05-30 11:09:46 +00:00
Kester Maddock
b97c77df2b Check for zero normal vectors in the clip planes (if eg Python has set a strange projection matrix)
Fix the transformation of the frustum bound sphere to world coordinates.
2004-05-30 11:04:26 +00:00
Ton Roosendaal
62c333a562 report #1338
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.
2004-05-29 19:46:46 +00:00
Ton Roosendaal
d2dbc96b81 bug #1340
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.
2004-05-29 17:33:30 +00:00
Ton Roosendaal
690a430bcb Counter of mballs, before polygonize, had error in taking linked mball-
data into account, causing errors modeling.
2004-05-29 17:00:51 +00:00
Ton Roosendaal
dbfe3daec3 Oh, the fix is an addition of a OB_NEG_SCALE flag in ob->transflag, which
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.
2004-05-29 16:22:07 +00:00
Ton Roosendaal
6b51c684f1 NEW! Blender now displays flipped (negative scaled) Objects correctly in
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.
2004-05-29 16:17:46 +00:00
Ton Roosendaal
59dad6aefc Recoded the methods how normals get corrected and flipped during render
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.
2004-05-29 16:14:34 +00:00
Ton Roosendaal
993a89e2a5 Bug fix 1332
EnvMap render now uses the percentage button for size (f10 buttons).
That wasn't implemented yet for saving envmaps....
2004-05-27 17:54:26 +00:00
Kent Mein
173ecf172a Panagiotis Papadakos's patch to fix the following:
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
2004-05-27 14:54:14 +00:00
Ton Roosendaal
954e5546ea In drawing solid objects ("Solid" drawmode) there were material
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.
2004-05-26 21:04:02 +00:00
Kester Maddock
8253d3e041 Python fixes:
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
2004-05-26 12:09:17 +00:00
Kester Maddock
3dd18c5c34 Added an UpdateTransform callback from SceneGraph -> Physics.
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.
2004-05-26 12:06:41 +00:00
Kester Maddock
e5cc9abceb Fix Bug #1309 Disabling Actor leaves Ghost, Dynamic and Rigid Body etc enabled.
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.)
2004-05-26 12:01:08 +00:00
Stephen Swaney
05e76c22b0 bugfix: #1322 minor tweaks to the documentation for Draw module.
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.
2004-05-25 19:59:41 +00:00
Jacques Guignot
5e3a9c092a Changed parameters names in addCurve function (suggested by Paolo)
DLoc* --> dLoc*
DRot* --> dRot*
DSize* --> dSize*
updated doc (Ipo.py)
2004-05-25 19:31:13 +00:00
Brecht Van Lommel
f99099109f Fixed a potential bug in the uv editor transform function, a check if the tface
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.
2004-05-25 19:06:48 +00:00
Willian Padovani Germano
8a64e0e867 BPython:
- 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.
2004-05-25 10:36:58 +00:00
Matt Ebb
f9fa705cd3 * Added support for python scripts to register themselves
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.
2004-05-25 06:08:49 +00:00
Joseph Gilbert
779d0d0221 - documentation update for new functions
- error corrections in NLA about dictionaries
2004-05-25 03:26:29 +00:00
Joseph Gilbert
1308786974 - added Boneclass support
- ability to get a bonespace/worldspace bone matrix
- get ik flag
- some tweaking to matrix updates for addBone()
2004-05-25 02:48:02 +00:00
Nathan Letwory
cfda234450 After hearing that the reason for do_common_editbuts being in buttons_object.c I decided to move it to buttons_editing.c, where it logically belongs. Matter of copy and paste (and deleting from buttons_object.c :)
Now poor newcomers can more easily find the editing buttonevent handling code.
2004-05-24 19:48:07 +00:00
Matt Ebb
af0579b578 Added the hotkey for Bevel in the menus 2004-05-24 13:46:36 +00:00
Kester Maddock
a96955efc2 Game Python Reference Manual.
This manual lists all the Python classes and modules for Game Objects, Sensor bricks, Controllers etc.
Missing: Actuator & Controller reference.
2004-05-24 07:49:50 +00:00
Ton Roosendaal
86899e7a22 Changed two shorts in int, for calculation of distance between bezier point
and mouse coordinate in selecting routine.
Caused selection not to work in extreme zoom ins.
(Thanks OOPz!)
2004-05-23 19:13:15 +00:00
Willian Padovani Germano
7f6b88e389 BPython:
- 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.
2004-05-22 20:25:22 +00:00
Kester Maddock
4551490dd4 near & far are reserved words on MSVC. Don't use them as variable names. 2004-05-21 14:09:18 +00:00
Kester Maddock
a7456b37f1 Cunning hack for Blender python module in the game engine - just don't unload it before running the game! 2004-05-21 09:27:42 +00:00
Kester Maddock
e957b12f0e Frustum sphere culling.
Do a sphere<->camera sphere and a sphere<->frustum before the box<->frustum test.
2004-05-21 09:21:15 +00:00
Kester Maddock
1217928e66 Fixes for Camera objects and python:
Normalise clip planes for sphere testing.
Do a frustum-sphere <-> sphere test
Reference count all python objects (!)
2004-05-21 09:18:42 +00:00
Kester Maddock
22883f9232 Query GL for max number of lights to use. 2004-05-21 08:56:05 +00:00
Kester Maddock
e78ef29a59 Depth sorting for alpha mesh objects.
- 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))
2004-05-21 08:55:12 +00:00
Matt Ebb
2a622e35d4 Added Shift C 'Center Cursor and View All' to View -> Align View menu 2004-05-21 01:35:10 +00:00
Matt Ebb
af6d9fb7a5 A few hotkey additions/corrections to the toolbox and 3d view menus. 2004-05-20 12:27:21 +00:00
Stephen Swaney
8391f0c337 add some explanation about Object.Layer being a bitmask. 2004-05-20 07:21:07 +00:00
Stephen Swaney
2124168e21 removed unused var in Object.getBoundBox()
bugfix: #1212 changing object's layer had no effect.
2004-05-20 06:26:43 +00:00
Martin Poirier
dbb6dc5d2f Bug #1289
Mirror menu missing in the Header Menu for most object types in edit mode

http://projects.blender.org/tracker/index.php?func=detail&aid=1289&group_id=9&atid=125
2004-05-20 01:22:43 +00:00
Ton Roosendaal
e67713c113 Removed a bzero from octree-filling, replaced with exact code what
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.
2004-05-19 19:30:43 +00:00
Willian Padovani Germano
1ff3066a9a BPython:
-- 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.
2004-05-19 01:28:12 +00:00
Ton Roosendaal
1a6329533f Removed double #defines from include, added some comments in code, and
added define for future use to bring back old (fast) AA.
2004-05-18 20:00:51 +00:00
Ton Roosendaal
ec45e4ad78 Patch provided by Matthew Plough for better view zoom with CTRL+middle
mouse.

For me it's a good replacement, and more intuitive & compatible. Now
let's wait for the storm of reactions...
2004-05-18 19:59:50 +00:00
Willian Padovani Germano
022bff122f BPython:
- 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.
2004-05-18 03:23:45 +00:00
Kester Maddock
fba0e401c9 Compiler portability fixes (MSVC 6) 2004-05-17 23:56:56 +00:00
Ton Roosendaal
a6458b3cfa <blush> this should have been part of render commit of some days ago.
This fixes errors in quads that are non-planar...
2004-05-17 21:40:00 +00:00
Matt Ebb
a1f5e64239 Tweaked the display and positioning of tooltips so they aren't obscured by the mouse pointer.
This is addressing bug #952
2004-05-17 14:36:13 +00:00
Kester Maddock
5454280f6c Same again - change static const for MSVC++ 2004-05-17 09:06:54 +00:00
Kester Maddock
0f447ac5a8 Fix for MSVC .NET, which can't handle static const declarations in classes.
Make it static, and define in SM_Object.cpp
2004-05-17 08:31:35 +00:00
Kester Maddock
6f4272a200 Fix for bug 1245: Vertex Colours are wrong in GameBlender. 2nd try.
http://projects.blender.org/tracker/index.php?func=detail&aid=1245&group_id=9&atid=125

The member names of MCol are wrong, so we will convert to unsigned char* like the rest of blender.
2004-05-17 00:42:07 +00:00
Ton Roosendaal
1adae69b5f Rewind of change in MCol structure.
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.
2004-05-16 16:25:40 +00:00
Kester Maddock
a0d82b242f Drawing cylinder & cone bounding objects according to how they will act in the physics simulation. 2004-05-16 13:23:59 +00:00
Kester Maddock
bab6e5ce36 Cleanup unused/commented out code, compiler warnings, coding standards etc. 2004-05-16 13:10:10 +00:00
Kester Maddock
d5fde6c48b Added #!/usr/bin/python standard script identifier to the start of SConscript files.
Makes text editors identify SConscripts as Python, and syntax highlight properly.
2004-05-16 13:07:20 +00:00
Kester Maddock
2fd6e72851 Changed Python _getattr/_setattr methods to use const STR_String& instead of char* - makes using these methods much nicer. 2004-05-16 13:05:15 +00:00
Kester Maddock
9827bf0cd7 Up the maximum triangles in a bucket.
GPUs can do more now.
2004-05-16 12:56:36 +00:00
Kester Maddock
9d147f52fd Use safe_normalized instead of normalized in shadow cast.
Should fix crashes reported by Calli
2004-05-16 12:56:08 +00:00
Kester Maddock
52a835a179 Inline accessor methods used by armature deformation. 2004-05-16 12:55:37 +00:00
Kester Maddock
512c269a16 Use const for SetProjectionMatrix
Remove warning printf.
2004-05-16 12:55:21 +00:00
Kester Maddock
2144f20b04 Use bitset instead of mucking around with <<, | and & 2004-05-16 12:55:05 +00:00
Kester Maddock
c50055204d SceneGraph support for bounding boxs 2004-05-16 12:54:44 +00:00
Kester Maddock
3e6b05f607 Python utils for Python <-> MT_Vector, MT_Point & MT_Matrix 2004-05-16 12:53:54 +00:00
Kester Maddock
0a27ae972e Don't overwrite camera's projection matrix every frame. 2004-05-16 12:53:39 +00:00
Kester Maddock
d162882e3a Frustum culling
New Python Hooks for cameras.
2004-05-16 12:53:22 +00:00
Kester Maddock
3b63bbe90c Don't touch protected KX_GameObject members.
Protect KX_GameObject - Py_Header unprotects!
2004-05-16 12:52:54 +00:00
Kester Maddock
979e242657 Frustum Culling.
- tests every object against the view frustum.
- Tree based culling is there, need to build tree.
2004-05-16 12:52:30 +00:00
Kester Maddock
5659bedf34 Don't increment tface if tface == NULL
Generate bounding boxes for frustum culling
2004-05-16 12:52:08 +00:00
Kester Maddock
cfffc96ad8 Fix for bug 1245: Colours are wrong on GameBlender
http://projects.blender.org/tracker/index.php?func=detail&aid=1245&group_id=9&atid=125

The vertex paint routines were storing red in the blue channel, and blue in the red channel.
2004-05-16 12:50:16 +00:00
Stephen Swaney
ae20f7a95e bugfix: #1206 Object.getBoundBox() was returning obdata coordinates.
fix memory leak in vector module.  Memory allocated by vector constructor
was not being freed.
2004-05-15 23:10:37 +00:00
Ton Roosendaal
7b78a57c03 Adapted sconscript for removed file 2004-05-15 18:14:53 +00:00
Ton Roosendaal
1c93da1478 Removed obsolete file 2004-05-15 18:13:42 +00:00
Ton Roosendaal
a4861c37be Assuming the freeze is over and we can head towards 2.34: this is the
first commit for review and improvements on OSA (anti aliasing) in
Blender.

http://www.blender3d.org/cms/Rendering_engine.320.0.html

Most relevant changes:
- full check on subpixel sample locations
- all subpixels are fully rendered (gives spec AA, procedural texture AA)
- also unified render uses it
- removed double-used code for unified render

Whether or not this will be optional (better pics, but in some cases slow)
is to further evaluate. For raytracing - for example - this cannot be simply
done, since the new sampling system made raytrace code much simpler.
2004-05-15 18:07:09 +00:00
Joseph Gilbert
b4ecf7d973 - added setBorder() to renderingContext to set border render rects from python.
- updated sizePreset() to deal with borders.
2004-05-15 14:32:21 +00:00
Joseph Gilbert
23637ccdd7 - bugfix #998 Object matrix incorrect
- object's matrix is not updated until redraw. pymatrix returned is updated to reflect current variables.
2004-05-15 03:09:27 +00:00
Joseph Gilbert
d00ad69b06 - spelling error and example fix 2004-05-15 03:02:11 +00:00
Johnny Matthews
95c546bd9d Adds a 'paint' floating panel to the image window to control brush settings for texture paint mode.
Also adds paint and properties to the view menu in image window.
2004-05-15 02:28:03 +00:00
Wouter van Heyst
5d3629fdd8 - Small improvement, check ~/.blender/.bfont.ttf instead of .blender/.bfont.ttf in cwd. 2004-05-13 14:21:08 +00:00
Kester Maddock
81679446ba Make game users happier.
Don't apply friction to external velocities.  The means motion actuators that set linV will work, without having to be repeatedly triggered.
2004-05-13 13:07:38 +00:00
Simon Clitherow
e0e14665fa quick fix -- bug #1217 (Unable to access AA fonts in Linux) 2004-05-12 20:30:18 +00:00
Ton Roosendaal
cf2aef1df9 Secured division by extreme values with a FLT_EPSILON. This might
prevent hanging on optimized windows build. That's going to be tested
now!
2004-05-12 19:17:00 +00:00
Matt Ebb
2825750330 A few fixes to the menus:
* Added the axis constraints (and fixed a bug) in the newly
 added View3D transform menus, and in doing so removed
 some duplicated code from toolbox.c
* Cleaned up text labelling

Hint:
Remember to use Title Case for menu labels, and only use
an ellipsis (...) when the menu opens up another new
dialog like a panel or a pupmenu(). The ellipsis indicates
"there is something more to come" and that no action,
mode-change, whatever will be executed immediately.
2004-05-12 16:53:11 +00:00
Stephen Swaney
e80a814360 bugfix from bpy mail list:
Object.setEuler() was not accepting old style args of 3 floats.
2004-05-12 08:06:15 +00:00
Ton Roosendaal
2713e9a7e4 2.33a splash 2004-05-11 21:54:44 +00:00
Ton Roosendaal
7a4e80b460 Little things pending for menus...
- grab/rot/scale sublevel in object pulldown (mostly as hotkey reminder)
- added missing hotkeys to 2 toolbox items
2004-05-11 21:40:39 +00:00
Ton Roosendaal
fc2171c37a Added warning message on attempt to join 2 Meshes with vertex keys.
That feature is not available... and I doubt that'll be soon. :)
2004-05-11 19:08:02 +00:00
Ton Roosendaal
34d3b2c2e4 Changed printing an empty string to print "0" for files for zero size
in file selector.
Thanks Joilnen for pointing to this line.
2004-05-11 12:50:04 +00:00
Joseph Gilbert
f141aed9dc - bugfix #1197 (New Bone.parent/child Access Destructive)
- a major redo of the Bone module
- BPy_Bone structs are separated into Bone data and python vars. This is necessary for the correct memory allocation of bone data between python and the global armature list.
2004-05-11 08:26:44 +00:00
Ton Roosendaal
404d9ab0a2 Tinsy error in undo for selection. Undo_push() was called too late.
Reported by Grogilius. Thanks!
2004-05-10 21:15:18 +00:00
Daniel Dunbar
00b44d4db2 - nasty memory corruption on windows for getting home directory
- check to make sure $HOME/.blender exists before returning that
    as the home
2004-05-10 20:35:46 +00:00
Ton Roosendaal
208a2937f7 PATCH!
Bug 1258: selecting objects with text drawing (axis, or as draw extra)
causes crashes in IBM cards. Has been tested & verified. A crash on
selecting Empty is often reported... so I just disabled drawing of
text when in selecting-draw mode.
Added comments in code to note it clearly.
2004-05-10 20:14:21 +00:00
Ton Roosendaal
c4dc33f18e Bug 1272
Normals for mball where flipped, when using displace mapping.
Fix is both flipping normals, and flipping flip flags.
2004-05-10 18:17:06 +00:00
Ton Roosendaal
0238900617 Bug fix for AO and Soft shadow:
When Traceable was off, and the rendered pixel outside Octree, the
intersection was going wrong. Due to the many samples taken not easy
to see, but certainly causing extra noise.
2004-05-09 21:52:23 +00:00
Ton Roosendaal
6c7747a6f1 Bug #1264
When in texture buttons, selecting Lamp, Camera or other Object didnt
update the shown texture correctly. Now it nicely switches.
2004-05-09 21:37:36 +00:00
Ton Roosendaal
366f58fca7 Added tooltips for Lattice editbuttons. 2004-05-09 21:26:43 +00:00
Ton Roosendaal
24a8327d25 fix for bug #1263
When zooming in extreme, scaling things outside of view caused dashed
line to be wrong... it used shorts for screencoords. Made it a float.
2004-05-09 21:15:05 +00:00
Ton Roosendaal
4d99961c0d As we dutchies say: "Now breaks my clog!"
Apparently the 'sync' option for alt+a anim playback *can* run without
the sound_init_audio() being called, but it cannot play audio... o_O
(For who doesnt know, syncing was coded abusing audio timing)

Anyhoo. This also fixes #1267, reporting that 'sync' option didnt work.
2004-05-09 20:40:21 +00:00
Willian Padovani Germano
fe89479036 BPython:
- Manuel from MakeHuman reported a memory leak in NMesh_getVertsFromGroup, should be fixed now.  A pylist was not being decref'ed.
2004-05-09 02:18:51 +00:00
Ton Roosendaal
9c3607b1ff Fixed little annoyance that caused previewrender not to clear sometimes.
For example when no Texture exists, and you switch from material to
texture buttons.
2004-05-08 09:42:33 +00:00
Jean-Luc Peurière
ac47d081c4 post 2.33 release commit of the modified SCons files for Os X.
Sconstruct modified so that Blender build on 10.3 without any additionnal
download than source + darwin libs.
defaults settings correct for 10.3.

fixed bug # 1260 : added MT_NDEBUG flag at top-level.
2004-05-08 01:34:39 +00:00
Kester Maddock
bd50d2f9cd Delete all SOLID shapes at the end of the game engine. They were all being leaked! 2004-05-08 00:25:20 +00:00
Ton Roosendaal
83907fc5f7 Num-slider buts and CTRL didn't work when range was > 1.0 2004-05-07 19:56:26 +00:00
Ton Roosendaal
16c783d950 Added two more mapping types to World buttons for sky render.
"Sphere": spherical mapping for a 360 degree panorama
"Tube": cylindrical mapping for a 360 degree panorama

Both mappings by default do only the sky (upper) hemisphere. The color
below is same as regular Horiz and Zenith colors, useful for setting
an AO effect.

Sample pics:
http://www.1000skies.com/fullpanos/index.htm (commercial)
2004-05-07 18:03:40 +00:00
Ton Roosendaal
934bdb5ee9 When pressing ALT+A, i noticed other windows advance 1 frame. This is
caused by swapbuffers system, which redraws the other windows when the
CFRA timer already advanced 1 frame.

Added an extra redraw to fix this. Could fix report #964, will wait for
JWalton to verify.
2004-05-07 11:59:41 +00:00
Ton Roosendaal
e7f6ebb7ca Improved three tooltips:
- Material Shadow and Traceable still mentioned old shadowbuffer methods
- AngMap option in World mapping has better explanation
2004-05-07 11:35:38 +00:00
Simon Clitherow
9936d28382 - switched a strcat and strcpy pair... doh! (well spotted b-ix!)
- appended "./blender" to %HOME% return for Win32. Is consistant now
  with the other returns for Win.
2004-05-06 21:40:38 +00:00
Ton Roosendaal
8d18aade3f potential fix for windows crash when it encounters file dates beyond
the nice limited unix range (1970-2034 or so).
Zr will check!
2004-05-06 20:53:05 +00:00
Ton Roosendaal
ef0adbd15f Fix related to audio crash. Made the check for when audio_init runs a
tinsy bit more strict. Now it did it for each ALT+A play anim.

I leave the debug print in still, for testing.
2004-05-06 19:57:21 +00:00
Ton Roosendaal
dba290879d bug fix #1237
A too strict pointer check caused action browsing in action-window not
to work when object didn't have action yet.
2004-05-06 19:42:38 +00:00
Ton Roosendaal
a686d5cb45 fix for bug #1223
Bump was inverted in previewrender for planar preview.
2004-05-06 19:31:16 +00:00
Ton Roosendaal
002a855275 fix for bug #1226:
With subsurf level 0, in editmode, the hidden faces where still drawn.
Was caused because subsurfing code then is skipped.
2004-05-06 17:32:17 +00:00
Kester Maddock
5813ae55d4 Fix Bug #1243: http://projects.blender.org/tracker/?func=detail&aid=1243&group_id=9&atid=125
Use external velocity (velocity set by the game engine - not the physics engine) for Motion Actuators.
2004-05-06 02:13:07 +00:00
Daniel Dunbar
f54160ca2f - PyInt_AsLong() was called on a possibly NULL object, this may be
a checked error but is no good anyway
 - Bone_dealloc free'd Blender's actual copy of the Bone! AGH!!!!
 - On syntax errors the python global dictionary was being free'd
    twice. AGH!!! again!

Can someone from the Python team please audit this.
2004-05-05 03:22:22 +00:00
Daniel Dunbar
baa54a9a9f - made a VERY IMPORTANT change to usiblender.c 2004-05-04 21:16:39 +00:00