(means optim, seams, selection should work same now, but I am
not super familiar with all this stuff so can't test very well).
These hacks to the DLM structure are disgusting btw Ton. What
a waste of memory! All the information that is so meticulous to
kept and managed in the old structure is essentially explicit (or
easily made so) in the new one.
only in one C file and not worth dropping in extern but presumably
will be synced with public CCGSubSurf release I hope to be making
soon.
- Currently the implementation must be enabled by defining
USE_CCGSUBSURFLIB somewhere with your build system. The code should
be considered highly experimental.
Helpline for warp was wrong in edit mode if the object wasn't centered on global space.
Boundbox calculation for warp is done in view space now, so it is always maximised since aligned with the view.
Switch the negative/positive switch for Shrink/Fatten from horizontal motion to vertical motion. Pull down to shrink, pull up to fatten. This could still use some work.
BugFix: Constraint center was wrong with MMB (was bypassing the fix I commited the other day).
BugFix: Changing modes while in transform and switching to local constraints in edit mode crashed. This was due to resetting the TransInfo flag in initTransModeFlags. Now done correctly in initTrans.
versus perspective.
Note for Martin; still an issue with defining what positive/negative
rotation is in perspective... needs more math here!
- Added Transform Widgets for PoseMode
- made adding bones in EditMode setting G.moving, so it doesn't draw other
selected objects nor Widgets
Warning in commit of Martin yesterday: Trackball and initTrackball were
declared static, whilst also in transform.h. Quez; why are these functions
exported in the .h file?
Bringing that back and enabling PET in trackball rotate.
Changed the rotation manipulator drawing code to really align the Trackball rotate ball with the view (using getViewVector) so that it always looks centered on the selection.
This was particularly ugly in perspective mode with a selection far from the center of the screen: http://www.clubinfo.bdeb.qc.ca/~theeth/screenie.jpg
Moved getViewVector from transform_constraints.c to transform_generics.c since it is not really a constraint related function. Also made it independant on the TransInfo structure so it might be useful elsewhere too.
NOTE: BLI_winstuff.h was meant to be a wrapper around windows.h to handle
undefining various crap that windows.h defines. Platform specific headers
should only have to be included in a few places. This reduces the number
of inclusions of BLI_winstuff.h to 16 which is a much more reasonable
number (than the 144 or whatever it used to be)
be used without including windows.h - this is the main reason windows.h
is included in so many places and this change allows most of those
inclusions to die.
- removed reference in render.h (really bad, shouldn't include a platform
specific header so widely unless really necessary)
- added M_PI, M_PI_2, M_SQRT, M_SQRT_2 defines to BLI_arithb.h... this is
a better place as it is more the "standard" blender math header. left
in winstuff.h as well for the moment for simplicity
- other changes are patches to code so everything works ok with this
shuffling.
- Added Blender.Run(script) + doc update (forgot to mention in my previous commit).
Trying to fix two mistakes from my previous commit:
- nmesh.transform(): forgot yesterday that affine vectors have 4th component = 0, now updated normals transformation accordingly.
- As Ton pointed, recursive parsing of scripts dirs in search of scripts was a mess. I simply forgot about the "//" trick and much worse, to protect against worst cases ("/", for example). Now the code uses BLI_convertstringcode to take care of "//", doesn't process if dir = "/" and there are limits:
max depth for traversing subdirs = 4
max dirs in the tree = 30.
I'll work more on this, check more, but these changes were tested and should make the code safer, of course, so I'm committing. Sorry about the mess, I should take lessons on defensive programming ...
To use; press the (temporal) icon in header. Switching widget types is by
pressing G, R or S once, if current widget type is different it switches,
otherwise it goes to normal Transform().
Widgets need a bit test for picking accuracy, correct drawing etc.
The rotate widget has a center button for 'trackball' rotate. That latter
can also be used for hotkey-based rotate.
In current code, all widgets remain in "Global" space, also in editmode.
Also widget updates while using normal transform has to be done.
2 Bugfixes:
- rotate in PoseMode had error for 2d 'around' center
- transform in postemode could crash, due to typo (& or |)
- Scripts:
fixed error in "Save Current Theme" which prevented it from automatically updating script registration in menus.
cosmetic changes in a couple of Campbell's sel_same.py script strings + more descriptive name for its new menu place (3d view, face mode -> select menu).
small updates to help_browser.py script.
The above changes are related to this:
- Added new script menu entries: Render (for exporters to renderers), Themes, FaceSelect (this already at the proper place). Updated Scripts win->Scripts menu so it won't show all available entries, only the ones we mean to see there.
- Updated menu registration so that scripts folders can become trees. The release/scripts/ dir should be updated soon with subdirs like converters/, modifiers/, generators/ or whatever -- better discuss first (or is it? /me afraid of long irc discussions during meetings :) ).
- Modules:
Blender: added 'udatadir' option to .Get() function and added var Blender.mode to tell if Blender is in bg or interactive mode.
NMesh: added Campbell's nmesh.transform(matrix, recalc_normals = False) method (reworked, so my fault if it doesn't work).
- Bugs fixed:
#2123: http://projects.blender.org/tracker/?func=detail&atid=125&aid=2123&group_id=9
Reported by Ken Hughes (thanks!), who also found the exact problem later (it was in Text.Load, not with script links -- if only I had checked emails these days ... lost > 1 hour today to find the problem: passed filename to M_Text_Load was later being written over by a function called by add_text). Also saw that Text.Load wasn't checking existence of passed filename (duh!), now it does.
#1655: http://projects.blender.org/tracker/?func=detail&atid=125&aid=1655&group_id=9
Reported by Chris Want (thanks!): command line "blender -P script" not working properly for bg mode ("blender -b blendfile -P script").
Had to make some small updates to get it working (bg mode for scripts was never explicitely handled, it worked due to collateral effects, let's say), interested readers can check the report after I update it or the API_intro.py doc file. After more testing we can make further updates. Updated many places to not call redraws if in bg mode, now it is officially available. Blender outputs its own info when rendering in bg mode, if that is considered a nuissance we'll have to add a few "if (during_script())" calls outside bpython.
- Removed a few warnings here and there and also updated docs.
-includes:
*Text3d accessors - ablity to manipulate FONT objects through python
*update to Object.link - calls text_to_curve upon ob_font link for drawing
*update to constant.h - constant type checking define
*update to curve.c - clamp values on getters/setters
*clean up of Text3d module
Transform can switch mode on the fly again (GRS).
Fixed a bug with the BIF constraint call, needed to call startConstraint and normalise the space matrix (this affected the manipulator).
- Made framework for 3d Transform Manipulators (widgets)
- The Manipulators act like '2d buttons', by default with LeftMouse and with
while-hold-move-release
- Implemented now: Translation Widget, which allows:
- four hotspots for axis grab or view-aligned grab
- center defined by 'around' setting
- SHIFT+LMB gives planar constraint on other 2 axes
- works in Object mode and Edit mode (not posemode yet)
Enable it with (temporal) icon in 3D header. All other 'normal' transforms
then keeps working btw.
On the todo for this widget:
- choice for Global, Local or Normal orientation
The way the widgets are going to work is in review still. Commit is also for
Matt for his proposal/paper on topic.
Some notes regarding this project;
- no life updates (on mouse over) like 3DS, I think that's neurotic
- on click, dominant axis changes to theme defined "Transform" color, other axes disappear, like maya
- manipulater size is fixed preset, independent zoom.
- manipulator follows selection, and is located based on 'around' mode
Unresolved;
- in maya, when you select 2 or more objects, the manipulator draws on the 'active' object, also interesting
- what to do with G,R,S hotkeys? It could switch the manipulator "mode"...
- header button/menu for manipulator mode?
Constraint selection is now based on mouse motion (instead of pointer position).
What that means is that if you simply click MMB, it works exactly like it did with old transform (in 90% of the case, the last 10% is when MMB click was unpredictable in old transform because of extreme viewport orientation)
Also, since this means you don't really have a referential on which to base yourself, it draws a dashed line representing the mouse motion, starting at the center of the axis lines.
Please test and discuss, if this is better than before or not.
Fixed Extrude constraint. Needed to premul the normal by the object's matrix to but it in global space.
Also, moved the Locking Axis modifier (for constraints) from Alt to Shift. Alt was conflicting with middle mouse button emulation (reported in the test builds forum).
Tilt Transformation.
Sorting elements in TransData array according to their distance. That means we can always stop loops when it finds the first element that doesn't apply. That makes PET factor calculation and actual transformations faster since it stops at the first element outside of the area.
The Sorting algo is a no swap version of quicksort using the start of each subset as the pivot (random would be better and easy to implement. Need 3 additional lines of code really).
Silly 2.36 bug! In FaceSelect mode, other solid objects didn't show. Bad!
Additional; when using Halo material, and setting 'X Alpha', and disabling
Halo option, the 'Only Shadow' option turned on... uses same bit...
No time for real fix here, so for now the bit is always cleared after
disabling Halo.
choosing 'individual faces' it uses the ShrinkFatten option.
Note for Martin: center of axis is still wrong, but you know!
Note for non-testers: unfortunately axis constrainting for old
transform now doesn't work anymore. New code is much nicer, I dont restore
hacks!