Page 1 of 3

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

Posted: Mon Mar 28, 2005 11:47 pm
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 MSVC 7 and scons
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 12:42 am
by Bellorum
Thanks, gabio:) No tuhopuu? :wink: Combo widget much better, with separated handles. Still weird drawing error where handles are sometimes drawn in wrong order when overlapping.

Posted: Tue Mar 29, 2005 12:59 am
by Pierre-Luc_Auclair
No new view rotation mode ? I've been thinking about this all week. :(

Everything seems rock solid here. I still don't like the widgets implementation but I don't really care since I don't use it.. Visual highlight feedback would be a nice addition.

Posted: Tue Mar 29, 2005 1:06 am
by gabio
Bellorum wrote:Thanks, gabio:) No tuhopuu? :wink: Combo widget much better, with separated handles. Still weird drawing error where handles are sometimes drawn in wrong order when overlapping.
Working on it. the hemesh of joeedh give me some pb though.

Posted: Tue Mar 29, 2005 1:12 am
by Bellorum
Working on it. the hemesh of joeedh give me some pb though.
That explains it. Tried to build myself with Cygwin earlier, but got a lot of errors, that I'm too ungeeky to know what to do about :wink:

Posted: Tue Mar 29, 2005 2:18 am
by thoro
Thank you, gabio - and happy birthday!

Hey, icons for the widget modes - cool. These widgets are so useful in Pose Mode!

Posted: Tue Mar 29, 2005 3:47 am
by oyster
Happy birthday :)
and thanx for the build

Posted: Tue Mar 29, 2005 4:32 am
by Delta
aww.. still the [ctrl] widget cycle?

i much prefer the old g/r/s change...

but, if this [ctrl] cycle is here to stay (please say it isn't...), could the [ctrl]-[tab] selection mode also change to cycle for consistency?

although the widget icons are rather nice.


p.s.: happy birthday Gabio!

Posted: Tue Mar 29, 2005 6:09 am
by Sutabi
is it me or did the lighting function in blender GE stop working

Posted: Tue Mar 29, 2005 6:40 am
by gabio
Sutabi wrote:is it me or did the lighting function in blender GE stop working
you'r not the first one to notice. But I really don't know when or why it would had stop.

Posted: Tue Mar 29, 2005 1:20 pm
by poutsa
Happy birthday Gabio and thanks for the new build

dmao wrote:
The new middle mouse button constraints for rotation are also awful . Completely unintuitive- just try posing an armature with it. Please return it to MMB = Trackball !!!

I agree!


Vassilios Boucer

Posted: Tue Mar 29, 2005 2:34 pm
by ElBarto
Happy birthday to you Gabio! Will check out the new built. Thanks!

Posted: Tue Mar 29, 2005 2:54 pm
by leander
Happy birthday and thanks for the build gabio!

For widgets, what about...

CTRL+left mouse button activates move widgets.
CTRL+midde mouse button for rotations
CTRL+right mouse button for scaling

┬┐what do you think?

Posted: Tue Mar 29, 2005 3:03 pm
by -efbie-
thoses shortcuts are already used to more useful things.

Posted: Tue Mar 29, 2005 6:06 pm
by lucky3
thanks gabio, and happy birthday to you!