Commit Graph

2420 Commits

Author SHA1 Message Date
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
Nathan Letwory
ae4afb8268 * ensure winblender.res gets build too. 2004-07-03 22:01:04 +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