Age | Commit message (Collapse) | Author |
|
|
|
python functions.
- use NULL rather then 0 where possible (makes code & function calls more readable IMHO).
- set static variables and functions (exposed some unused vars/funcs).
- use func(void) rather then func() for definitions.
|
|
The changes here were breaking old rigs, for example the right eyeball
in the Sintel rig (which uses the Mirror Modifier and its vertex-group
mirroring functionality)
|
|
mostly replace strcpy with BLI_strncpy and multiple strcat's with a BLI_snprintf().
also fix possible crash if CWD isnt available.
|
|
- modifier code was using sizeof() without knowing the sizeof the array when clearing the modifier type array.
- use BLI_snprintf rather then sprintf where the size of the string is known.
- particle drawing code kept a reference to stack float values (not a problem at the moment but would crash if accessed later).
|
|
- the invert flag was only being used for multi-modifier, but there is no reason not to use this in normal cases as well.
- Armature modifier RNA name 'vertex_group' was incorrectly named 'vertex_group_multi_modifier' (own fault), confusion was caused by 'invert_vertex_group_multi_modifier' which was correct.
|
|
|
|
into a function call.
|
|
- fixed this error 7 different functions (deform groups, uv layers & similar).
- support for numbers over 999.
- renamed splitIDname() to BLI_split_name_num(), moved to BLI_path_utils
|
|
replace with defgroup_find_name() and BLI_findstring()
|
|
- remove debug print for left/right name flipping & commented test from the sequencer.
|
|
turns out this isnt exactly a bug since support was never written for this but may as well support it.
now rna/py can do image.copy() too.
|
|
|
|
Bone would get a '.' added even when there was no extension.
(center limit would still be useful)
- name flipping function used sizeof() incorrectly.
- ED_lorem should be extern.
|
|
124-126 but isnt used by any build systems now.
|
|
|
|
|
|
144 vertex groups which got quite tedious to look through.
|
|
should have only changed one value to 0.0.
|
|
some vertex groups changes, the default weight should 0 instead of 1.
|
|
- use mirror when the option is enabled in editmode.
- fliped group names are used when they exist.
- only the setting that is edited will be applied to the mirrored verts group.
- copy value is applied to all mirrored verts of the selection.
- normalize normalizes all vgroups and mirrors.
utility functions defvert_sync and defvert_sync_mapped, similar to defvert_copy but does not remove existing groups and optionally creates groups as needed.
defvert_sync_mapped uses a an int array for mapping the flipped values.
|
|
* no functional changes *
|
|
get_named_vertexgroup_num() instead.
no functional changes.
|
|
|
|
- selected bones on hidden layers would be selected for weight painting (confusing to the user). use the 'active' bone instead.
- when no weight group was set, the index used for the bone group was off by 1.
|
|
|
|
- particle set weight operator (Shift + K) and from the menu.
- mirror vertex groups operator can also flip weight group names.
a number of utility functions for weight groups added
int *get_defgroup_flip_map(struct Object *ob);
void flip_vertexgroup_name (char *name_r, const char *name, int strip_number); // moved from modifier.c
void copy_defvert (struct MDeformVert *dvert_r, const struct MDeformVert *dvert);
void flip_defvert (struct MDeformVert *dvert, int *flip_map);
|
|
* Convert all code to use new functions.
* Branch maintainers may want to skip this commit, and run this
conversion script instead, if they use a lot of math functions
in new code:
http://www.pasteall.org/9052/python
|
|
it was supposed to: needed WM_jobs_stop_all rather then WM_jobs_stop because it ends the thread rather then just setting 'stop'.
- gpl header + warning fix
|
|
|
|
CHanged the BENCH functions to use: gettimeofday (wall time) instead of clock (cpu time)
This was to test if the openmp was working right.
|
|
*Fixed a few UI things
*Make SimpleDeform and Shrinkwrap to use vertexgroup_get_vertex_weight, a similar function
"static float vert_weight(MDeformVert *dvert, int group)" existed on modifier.c, changed
it a bit and moved into BKE_deform.h
|
|
blocks that were previously missed; and b) greatly increase my
ohloh stats!
|
|
It is now possible to use the geometry of Meshes and/or Lattices as the target of a constraint. All you need to do, is to create a new Vertex-Group and assign all the points that you wish to use as the target, then type that name into the VG: field for the relevant constraints.
One of the cases where this is beneficial is when you need to copy the location of a vertex. Now you don't need to make extra vertex-parents for that.
Additional Notes:
* The code takes the average of the locations of the nominated vertices, and puts that in world-space for constraint solving (and regular space-conversion stuff).
* Currently, rotation and scaling of points is not taken into account. The rotation/scaling used is from the object's matrix. Hopefully, this will only be a temporary problem (will be fixed soon)
|
|
Previous versions of Blender allowed Vertex Groups to be nameless, which
shouldn't be allowed. This caused problems with rigs from previous versions of Blender being loaded in 2.43+ versions, as the new VGroup feature for the
Armature modifier mis-identified these nameless group(s) as being the Vertex Group
to be used. As well as the checks done when renaming VGroups (from another commit), files created prior to and in 2.43 will have all such groups given default
names.
Code notes:
* I've moved the unique_vertexgroup_name function from src to blenkernel like for
constraints
* Formatting in deform.c tidied up a bit
|
|
but this code ensures the strcpy() is using BLI_strncpy now, and it uses
more clear names for the mallocs.
|
|
- removed {lattice,curve}_modifier functions
- changed render code to use displist for curve rendering
instead of making its own. required adding a bevelSplitFlag
field to DispList. I also fixed the bevel face splitting
which did not work correctly in many situations.
- changed so all curve data creation happens in makeDispListCurveTypes,
includes making bevel list and filling polys
- changed render code to use displist for surface rendering
- removed Curve.orco variable, built as needed now
- removed stupid BLI_setScanFill* functions... why use a function
argument when you can use a global and two functions! Why indeed.
(this fixed crash when reloading a file with filled curves and
toggling editmode)
- bug fix, setting curve width!=1 disabled simple bevel for no
apparent reason
- cleaned up lots and lots of curve/displist code (fun example:
"if(dl->type==DL_INDEX3 || dl->type==DL_INDEX3)"). Hmmm!
- switched almost all lattice calls to go through lattice_deform_verts,
only exception left is particles
- added DBG_show_shared_render_faces function in render, just
helps to visualize which verts are shared while testing (no
user interface).
- renamed some curve bevel buttons and rewrote tooltips to be
more obvious
- made CU_FAST work without dupfontbase hack
Also by the way I wrote down some notes on how curve code
works, nothing spiffy but it is at:
http://wiki.blender.org/bin/view.pl/Blenderdev/CurveNotes
|
|
- converted dl->flag to use consistent defines for cyclic U/V
|
|
but including "virtual" modifiers (for example, an object skel-parented
to a lattice has a virtual first lattice modifier)
- removed mesh_modifier(), all functionality has been incorporated into
modifier stack (well, keys still don't exist as a modifier, but I am
not sure if they should).
- added interface option to convert a virtual modifier into a real modifier
- added option to parent to lattice object or lattice with deform
- bug fix, patch of hook indices patched all hooks (oops) not just ones
for edited mesh
NOTE: Files saved with 2.38 that include an object parented to a lattice
will not load correctly, because it will look like the object is parented
only to the object (i.e. without deform). Can be simply fixed by reparenting
or adding a lattice modifier. Older files are handled automatically.
|
|
variables, these are still in same place. enable button automatically
makes/enables modifier.
- changed hook to hook modifier conversion to happen on direct link,
required to make sure we don't forget to free any memory for files
saved with 2.38 that have hooks.
- update modifier interface to enforce modifiers with the require-original-
data flag to not move beyond deforming modifiers.
- enforce only one softbody modifier allowed
NOTE: Once again, no modifier stack for lattice yet means softbody for
lattice does not work atm.
|
|
can only follow deform (for example, they store mesh vertex
indices)
- added ModifierType.foreachObjectLink for iterating over Object
links inside modifier data (used for file load, relinking, etc)
- switched various modifiers_ functions to take object argument
instead of ListBase
- added user editable name field to modifiers
- bug fix, duplicate and make single user didn't relink object
pointers in modifier data
- added modifiers to outliner, needs icon
- added armature, hook, and softbody modifiers (softbody doesn't
do anything atm). added conversion of old hooks to modifiers.
NOTE-THE-FIRST: User name field is not initialized on loading 2.38 files
so if you have saved stuff with a cvs blender you will see blank names.
NOTE-THE-SECOND: Since modifiers aren't evaluated yet for non-Mesh
objects, hooks for lattices and curves are broken. Don't updated if
you actually, say, *use* Blender.
NOTE-THE-THIRD: Old hooks used a quirky weighting system during
deformation which can't be extended to modifiers. On the upside,
I doubt anyone relied on the old quirky system and the new system
makes much more sense. (Although the way falloff works is still
quite stupid I think).
|
|
He even made a nice doc in wiki:
http://wiki.blender.org/bin/view.pl/Blenderdev/Blendgz
Usage: set the option "Compress File" in the main "File" pulldown menu.
This setting is a user-def, meaning it is not changed on reading files.
If you want it default, save it with CTRL+U.
The longest debate went over the file naming convention. Shaul started
with .blend.gz files, which gave issues in Blender because of the code
hanging out everywhere that detects blender files, and that appends the
.blend extension if needed.
Daniel Dunbar proposed to just save it as .blend, and not bother users
with such details. This is indeed the most elegant solution, with as
only drawback that old Blender executables cannot read it.
This drawback isn't very relevant at the moment, since we're heading
towards a release that isn't upward compatible anyway... the recode
going on on Meshes, Modfiers, Armatures, Poses, Actions, NLA already
have upward compatibility issues.
We might check - during the next month(s) - on a builtin system to
warn users in the future when we change things that make a file risky
to read in an older release.
|
|
- added decimate modifier & removed old decimate interface
(currently lacks warning about destroying data, and there needs
to be a way for modifiers to return errors back to the interface)
- allow applyModifier to return NULL to indicate error
- unfortunately new decimate modifier means it does not know exact
number of faces in mesh (other modifiers may come before) and so
instead interface uses a percentage. if people need exact face
count slider then I will have to think of some hack to fit this
in. note that it does display the output face count so its possible
to tweak the pct to get what you want regardless.
- removed python Wave object
If you are bored now how much easier it is to implement something
like decimate as a modifier. Very few changes to interface, very
few entry points.
|
|
restposition, also for deform and bone childs.
|
|
- make mesh_modifier build vertex locations on demand
|
|
- removed mesh_deform (merge into mesh_modifier)
- switch python lattice_apply function to use object_apply_deform,
this isn't exactly equivalent but the python system shouldn't
have been calling that deep into the kernel anyway.
New feature: Modifier stack
- added Object.modifiers (list of ModifierData elements)
- added DNA_modifier_types.h
o contains type definition for the file data for the various
modifier types
- added BKE_modifier.h
o contains modifierType_get_info (access to modifier type registry)
o structs and defines for runtime modifier usage
- updated mesh_calc_modifiers to evaluate modifier stack (note that
for the time being it also evaluates the old style modifiers so files
should load and work as normal).
- add file handling modifier code (todo: don't replicate on object copy)
- add modifier stack UI code (lives in object panel)
Only real new feature at the moment is that you can apply lattices and
curves *after* a subdivision surface which was never possible before.
Todo:
- DEP graph updating does not work correctly yet, so you generally have
to tab cycle to see results.
- editmode calculation does not use modifier stack.
- bug fixes (there must be a few in there somewhere)
|
|
- changed mesh_modifier, sbObjectStep, object_deform to take vertexCo
argument instead of operating on mesh
- fixed bug where a derived mesh would not be returned in editmode
- removed object_wave, replaced by init_wave_deform and calc_wave_deform
- moved cached DerivedMesh to Object, not Mesh... fixes heisenbugs
with linked objects
|
|
leaving in a DL_VERTS type displist (and modifying mesh)
- removed DL_VERTS displist type (woot woot)
- makeDispListMesh now puts deformed verts in object->derivedDeform
- switch over other system parts to new deformed vert storage,
still kinda hacky and maybe some inconsistencies... will be
sorted out soon enough.
- moved build_particle_system to makeDispListMesh... this may have
adverse side effects, needs to be sorted out with depgraph system
|
|
- convert object_apply_deform to use mesh_get_derived_deform
- convert build_particle_system to use mesh_get_derived_deform
- remove apply option from mesh_modifier
What do you know, this leaves only one callsite for mesh_modifier
and one "user" site for DL_VERTS...
|
|
Aim was to get a total refresh of the animation system. This
is needed because;
- we need to upgrade it with 21st century features
- current code is spaghetti/hack combo, and hides good design
- it should become lag-free with using dependency graphs
A full log, with complete code API/structure/design explanation
will follow, that's a load of work... so here below the list with
hot changes;
- The entire object update system (matrices, geometry) is now
centralized. Calls to where_is_object and makeDispList are
forbidden, instead we tag objects 'changed' and let the
depgraph code sort it out
- Removed all old "Ika" code
- Depgraph is aware of all relationships, including meta balls,
constraints, bevelcurve, and so on.
- Made depgraph aware of relation types and layers, to do smart
flushing of 'changed' events. Nothing gets calculated too often!
- Transform uses depgraph to detect changes
- On frame-advance, depgraph flushes animated changes
Armatures;
Almost all armature related code has been fully built from scratch.
It now reveils the original design much better, with a very clean
implementation, lag free without even calculating each Bone more than
once. Result is quite a speedup yes!
Important to note is;
1) Armature is data containing the 'rest position'
2) Pose is the changes of rest position, and always on object level.
That way more Objects can use same Pose. Also constraints are in Pose
3) Actions only contain the Ipos to change values in Poses.
- Bones draw unrotated now
- Drawing bones speedup enormously (10-20 times)
- Bone selecting in EditMode, selection state is saved for PoseMode,
and vice-versa
- Undo in editmode
- Bone renaming does vertexgroups, constraints, posechannels, actions,
for all users of Armature in entire file
- Added Bone renaming in NKey panel
- Nkey PoseMode shows eulers now
- EditMode and PoseMode now have 'active' bone too (last clicked)
- Parenting in EditMode' CTRL+P, ALT+P, with nice options!
- Pose is added in Outliner now, with showing that constraints are in
the Pose, not Armature
- Disconnected IK solving from constraints. It's a separate phase now,
on top of the full Pose calculations
- Pose itself has a dependency graph too, so evaluation order is lag free.
TODO NOW;
- Rotating in Posemode has incorrect inverse transform (Martin will fix)
- Python Bone/Armature/Pose API disabled... needs full recode too
(wait for my doc!)
- Game engine will need upgrade too
- Depgraph code needs revision, cleanup, can be much faster!
(But, compliments for Jean-Luc, it works like a charm!)
- IK changed, it now doesnt use previous position to advance to next
position anymore. That system looks nice (no flips) but is not well
suited for NLA and background render.
TODO LATER;
We now can do loadsa new nifty features as well; like:
- Kill PoseMode (can be option for armatures itself)
- Make B-Bones (Bezier, Bspline, like for spines)
- Move all silly button level edit to 3d window (like CTRL+I = add
IK)
- Much better & informative drawing
- Fix action/nla editors
- Put all ipos in Actions (object, mesh key, lamp color)
- Add hooks
- Null bones
- Much more advanced constraints...
Bugfixes;
- OGL render (view3d header) had wrong first frame on anim render
- Ipo 'recording' mode had wrong playback speed
- Vertex-key mode now sticks to show 'active key', until frame change
-Ton-
|