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