Page 1 of 1

bf-blender / linux (2005/03/28)

Posted: Tue Mar 29, 2005 1:46 am
by gabio
HUGE addition, look like the long weekend was usefull. I couldn't be there always as i had to go see familly, and it is my birth day today so we did some party each day of this long weekend ;) . Anyway happy easter all!

-Zuster is doing a lot of cleanup, but most of this isn't apparent to the user. It's more a question of speed, So please test everything around mesh, surbsurf, creasing etc... and the entire transform system everywhere. Ho
and the widget....
-Made with GCC, glibc 2.3.5
Relevant feature:
-Bug fixes.
-Restored old convention that made using SHIFT+CTRL while using button- sliders go with 0.1 stepsize of CTRL.
-Camera translate and rotate in camera view, with MMB, works again.
-Game engine!:
--Erwin Coumans: Abstract the physics engine
--Charlie C: Joystick fixes
--Me: Moved the ray cast (shadows, mouse sensor & ray sensor)
--Reenable ODE in the physics engine buttons.
-Added Manipulator Combo mode, activated as 4th CTRL hotkey cycle.
-New insertIpoKey() methods for Lamp and World types. (bpython)
-New Bpy method: Camera.insertIpoKey()
-Added in header - if widget in use - three buttons to choose widget type (hold shift for combo widgets)
-Hotkey CTRL+space now switches widgets on/off
-Switch to using DerivedMesh interface for draw_mesh_object.(API work)

Bug fix #2311

File name (40) and dirname (80) were too short in sequence data. Made it
compliant using defines FILE_MAXFILE and FILE_MAXDIR.
Also replaced all strcpy() and strcat() with strncpy/strncat, with the
defines in it.
Oh, also fixed plugin path length for sequence, was just 80!

Bug fix #2366

Restored old convention that made using SHIFT+CTRL while using button-
sliders go with 0.1 stepsize of CTRL.
(noticed too late that Chris Burt assigned to self... sorry!)

Function std_rmouse_transform() works with function pointer to denote
what todo. With the new Transform(), using different args, it's not
easy to do it with single function pointer.

For the time being, the function pointer isn't used for the 3d window.

Transform fixes;

- Camera translate in camera view, with MMB, works again. Code needs
verification by Martin... it does it different now too.
- Camera rotate in camera view works again. MMB switches to 'trackball',
as formerly. Isn't consistant with other rotate+MMB though...
- rotate camera in cameraview around cursor doesn't 'feedack' anymore

Martin; I only use the TransInfo->persinv[4][4] now, but I think it's
safe to use viewmat and viewinv too?

Bug fix 2303

The gamma functions in gammaCorrectionTables.c cannot be used to correct
and correct back with identical results... causing banding in rendering
pictures with halos.

Reworked the camera dolly/parallel axis constraint code a bit. Works pretty much like the Shrink/Fatten code, meaning pull the mouse toward you pulls the camera, push pushes it away.

Also added a T_CAMERA flag for camera grab, which gets set on TransData conversion.

axisProjection can take care of zero-length vector so we don't need to check anymore. Was giving some problems with cameras looking perfectly down.

Also removed all NEWTRANSFORM defines, using the new code all the time now.

Big patches:
Erwin Coumans: Abstract the physics engine
Charlie C: Joystick fixes
Me: Moved the ray cast (shadows, mouse sensor & ray sensor)

Patch from Erwin Coumans: Abstract the physics engine.

Reenable ODE in the physics engine buttons.

A couple of wee transform featurettes;

- center of rotation for camera in cameraview rotate has to remain the
camera center itself, drawing the dashed helpline then doesn't work,
since it's behind the camera clipplane. Just disabled that line.

- made MMB switch for cameraview grab to become quadratic, for a dolly
this feels OK, and makes it possible to move in small and large scenes.

- restored SHIFT modifier for translation and scaling. This based on old
convention that allowed precision editing on top of the transform you
already applied before pressing SHIFT.
Solved it with a new flag (T_SHIFT_MOD), since the G.qual cannot be
used. Transform() innerloop has to detect the SHIFT event itself.
Also coded it with storing the mouseposition while SHIFT event happened.
Hope Martin can approve! :)

- Martin's last commit made Manipulator Translate not work, it passed on
a zero translation to the constrainter, causing NaN's. Nicely catched the

- Fixed 'Trackball' to accept number input too

added an #include <stdlib.h> to fix this:
KX_RayCast.h:92: error: `NULL' was not declared in this scope


Transform fix; in PoseMode you now can do multiple chains again.

- removed unused variable

Small fix for the following warning:
../include/MT_Quaternion.h:62: warning: declaration of 'angle' shadows a member
of 'this'


Quickly hacked together a fix for game engine compiling. There were two
missing files in Kester's new commits. This commit adds these two files so
that compiling can continue as it is intended to. Emilie M. found a
home for the files rather quickly, Ton recieived the files from Erwin via
email, and we all tested. Works great! Thanks to everyone that helped!

Adjusted tooltips for RGB and Grad buttons on particle settings panel. User
pointed out in bug tracker that these weren't entirely accurate.

I'll break this commit into two sections in the moto files
I got rid of a few warnings about blah shadows a previous declaration.

In the gameengine files I fix the following:
removed some unused vars
removed dos style line breaks
added newlines to last line in a couple of files to remove warnings.


Added Manipulator Combo mode, with translate/rotate/scale combined. Center
remains translate though. Can be activitated as 4th CTRL hotkey cycle.

Previous commit error; drawing flags mixup caused centers of scale and
rotate widgets not to draw. :)

- made give_mesh_mvert static

add new file SumoPHYCallbackBridge.cpp to SConscript for SCons build.

- integrated get_mvert_weight and color_temperature
into drawobject.c (just used for calculating weight
- removed two_sided (replace with glLightModeli calls)
- huge rewrite of drawobject.c for meshes, extracting simple
drawing functions and then reworking to bring some order
and clarity back to the code.

A lot was changed here so it is likely I missed a few
things in testing although I tried to be very careful.
Please let me know if you find any changes in drawing.

More Bpy goodness!
New insertIpoKey() methods for Lamp and World types.
Contributed by Johnny Matthews (guitarGeek)

Adding some docs for world and lamp insertIpoKey additions

Updated Bpy method Object.getData() now supports new Text3d type.
Contributed by Johnny Matthews.

- remove some unused variables from cleanup
- fix for when mesh has no medge (would draw as points always)

- shademodel wasn't being set correctly for normal mesh face draw

- lamp line was drawing in wrong location

New Bpy method: Camera.insertIpoKey()
Contributed by Johnny Matthews (guitarGeek)

Adding some docs for camera insertIpoKey additions

Transform goodies;

- Added icons for the Widgets to blenderbuttons pic
- Added in header - if widget in use - three buttons to choose widget type
(hold shift for combo widgets)
- Hotkey CTRL+space now switches widgets on/off

I also noticed negative scaling doesn't work satisfying yet;
- for scale widget, using center didn't work correct anymore (fixed)
- negative scaling didn't even get applied! (fixed)
- but; scaling somethig negative now flips back to positive... ????

Last one i need Martin P for! Note that I had to change Mat3ToSize....

Two small fixes in transform, committed so Martin can work...

- scale negative draws widget OK (scale widget only now)
- scale negative threshold (for flip) was on vertical Y, now is perpen-
dicular to center of axis.

NOTE: New file to be added to project files

- add new DerivedMesh type, currently just encapsulates drawing

Scary commit!

- Switch to using DerivedMesh interface for draw_mesh_object.
- Code builds a "fake" DerivedMesh for Mesh/EditMesh which ends
up making code a lot clearer.

Plenty of work to be done - the DerivedMesh is still very specialized
to how the code draws which means it is not a very general interface
and is a little messy. Should work though I hope.

Context parameter for Transform.

For tex space edit, crease (soon) and future use.

Manipulator assumes no context.

- added getNum{Verts,Faces} accessors to DerivedMesh with implementations
- updated edit.c to use DerivedMesh interface

- added drawMappedEdgeEM function to DerivedMesh with implementations
(draws single mapped edge)
- updated editmesh code to use new interface (-2 DLM uses)

- added DerivedMesh convertToDispListMesh function with implementations,
this is to ease migration.
- updated particles and STL converter to use DerivedMesh interface. This
is a bit wasteful at the moment, but these are not key performance areas.
Can update once DerivedMesh has accessors for faces and face data.

- update NMesh.c to use DerivedMesh API

Transform was still prototyped as having only one parameter in transform.h. Caused some warnings and possibly errors since some calls were missing the context.

The rest is proof of concept goody for a CONNECTED limiter for PET.
That is, PET affecting only elements which are connected together.

Only affects Curves right now since that was easier to test connectivity with. Still some polishing to do (falloff is based on distance of effect, not real distance), but it's a proof of concept, so...

Alright, this hopefully fixes some problems with the last transform commit.

Replaced old transform call when extruding and duplicating. Added a CTX_NOPET context flag for extrude. This is done rather a bit hackishly in Transform right now, better to do it with a on/off pet flag in TransInfo and check that everywhere instead.

Made sure transinfo Ext was initialised at NULL (I'm pretty sure it was in another spot, but LetterRip reported some crash leading me to believe that it might not be all the time. Better be safe than sorry).

Connected PET for curves uses the real distance for the fall off calculations now.

- non-optimal subsurf was drawing regular mesh faces

- added drawMapped{Verts,Edges,Faces}EMSelect calls to DerivedMesh with
- updated drawobject selection code to use DerivedMesh (last DispListMesh
usage in drawobject.c that needs to be replaced! Woot!)
- interface could still be a lot cleaner, mostly calculating indices for
the various things to pass to selection color routine is hacky.

- added getMappedVertCoEM and drawMappedVertEM to DerivedMesh with
implementations (slightly redundant, could implement draw in terms
of first... can be cleaned later)
- switch to use of new APIs... all uses of EditVert->ssco are now
clean (read: ready to die as soon as a proper DerivedMesh implementation
is swapped in with ccgsubsurf)

- added nors to DispListMesh (for face normals)... this is just to
avoid throwing them on later with addnormalsdisplist which is just
silly and burdensome.
- renamed displist_calc_vert_normals to displist_calc_normals

Cleanup of widget code;

- made more general calls with args for drawing types
- made it accept transparency for all modes (used while transform now)
- added argument to detect 'combo' mode, gave offsets to translate/scale
handles in combos.
- added 'pie chart' on view-aligned rotate for widget
- made trackball for rotate widget rt==4 behave compatible
- removed redundant code for 'ghosting'

bug fix for #2096:
- switched strcpy calls to strncpy using FILE_MAXDIR & FILE_MAXFILE to prevent buffer overruns. Non-windows code left untouched. :)

Fix stupid error in connected code.

No more crashes, wheee!

Shameless intrusive commit in Daniels beloved project! :)

The dl->mesh pointer was used without checking dl... dunno what this call
exactly does, but it causes crashes here. Fixed with a if(NULL) check.

- switch some code to using BLI_strncpy (with right string lengths!)

- Bug fix, accidentally broke deform for non subsurfs.

- renderer currently uses links into tface structures that actually
are owned by mesh (or displistmesh)... this causes problems for
adapting to systems that build tfaces on the fly. Added RE_findTFace
function to allow allocating tfaces inside renderer itself.

- Funny joke! Blender gave "Can't apply deform to shared mesh" error
and then went ahead and did it anyway. Someone is lying!

- added mesh_get_derived_render
- cancelled previous commit to add RE_findTFAce, instead just added
a MemArena to render struct... free'd at end of render, can be used
to store other data as well
- switch rendering to using DerivedMesh API... this is slightly more
inefficient now because it is doing some unnecessary copying. Can
be fixed by defining a DerivedMesh function to convert the object
into a render object (on todo list)

- zero DispListMesh.{editedge,editface} on copy
- calc normals for mesh displistmesh's
A new build is available

Posted: Tue Mar 29, 2005 3:03 am
by -efbie-
your build doesn't want to start on my linux box (debian-ubuntu) :(

Posted: Tue Mar 29, 2005 6:37 am
by gabio
-efbie- wrote:your build doesn't want to start on my linux box (debian-ubuntu) :(
ouch, what is the error/missing lib?

Posted: Tue Mar 29, 2005 8:30 am
by Napoleon
Thanx gabio am going to try it out today will report back. :P

Well at leat it starts perfectly well on my system (debian-ubuntu hoary) :D

Posted: Tue Mar 29, 2005 9:17 am
by GreyBeard
Works fine here on debian testing. Widgets are nice I suppose but is there still no way to translate by view or normal? I would much rather have this functionality than the widget. ie "gvx" for grab view x and "gn" for grab normal.


P.S. OOPS, I forgot to thank you for you builds :D

Posted: Tue Mar 29, 2005 11:38 am
by OTO
for the big? work on the game engine ( and Erwin return?) and, well, for your birthday too :)
The new transform and widgets are great and work very well
The CCG subdivision seems nice, equal? to Catmulll but more lighter
Still no real-time light in game engine?
return to testing
Thanks for the build and log

Posted: Tue Mar 29, 2005 2:33 pm
by -efbie-
gabio wrote:
-efbie- wrote:your build doesn't want to start on my linux box (debian-ubuntu) :(
ouch, what is the error/missing lib?
Nothing... it just doesn't want to start....
I thing i messed up a few things with my ubuntu install anyway.

Posted: Tue Mar 29, 2005 4:25 pm
by theeth
GreyBeard wrote:Works fine here on debian testing. Widgets are nice I suppose but is there still no way to translate by view or normal? I would much rather have this functionality than the widget. ie "gvx" for grab view x and "gn" for grab normal.
Shrink/Fatten already moves along normals (Alt-S).
As for view constraint, I haven't forgotten them, you can be sure of that.


Posted: Tue Mar 29, 2005 8:52 pm
by GreyBeard
Shrink/Fatten already moves along normals (Alt-S).
I realize this but it also makes the face larger/smaller. Say you have a wall at some angle that does not coincide with the world or local axis (common with floor plans). I just want to grab the end verts of the wall and vary the length of the wall while keeping the angle the same. Every other 3d app I have used has this functionality. I am glad to hear the view constraints will be added because then as a work around I can use shift-v->front and the view y-axis constraint.

If you look at all the times "How do I move/grab normal to a face" has been asked on elysiun you can see that it is something people intuitively want to do.

When I use blender for work it is primarily for architectural visualisation. While I can get my work done well enough now 3 things would make my workflow much more efficient.

1. move along normal
2. trim/extend
3. a proper offset command

By the way I have used the new widgets for about 4 hours of modelling and haven't have any problems with the new transform system yet :D

Posted: Tue Mar 29, 2005 10:42 pm
by Bellorum
Ditto on move along normal. And pretty please, an inset scale function:)