Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoshua Leung <aligorith@gmail.com>2009-08-22 08:11:17 +0400
committerJoshua Leung <aligorith@gmail.com>2009-08-22 08:11:17 +0400
commitd4407115faaf89061eed36cb69664f071db3fa31 (patch)
tree5053159c218fabbc828da99163e08c122455f880 /source/blender/editors/object/object_edit.c
parent17e3b09e88ad48c1659f2c586c33a725a3bd601f (diff)
Hook Modifier Bugfixes:
Fixed some typos made in previous commit. Hook Modifier should now work correctly again (and also for newly added Hook relationships) Notes: * To add a hook, you currently need to perform the following steps 1) add modifier from menu (no operator in EditMode) 2) specify the object (and/or bone to use as the hook target) 3a) in EditMode, select the vertices you wish to be affected by the hook, and press 'Assign' 3b) alternatively, fill in the vertex-group field for the Vertex Group which contains the vertices to be affected 4) press 'Reset' (to make sure hook will behave correctly) 5) optionally, also press 'Recenter' if the hook position isn't right... * BUG ALERT (Brecht/Ton): it is impossible to clear the vertexgroup/bone fields once you have assigned some value. Doing backspace+enter (or any other variation) will always result in the first item in the search menu being used.
Diffstat (limited to 'source/blender/editors/object/object_edit.c')
-rw-r--r--source/blender/editors/object/object_edit.c40
1 files changed, 21 insertions, 19 deletions
diff --git a/source/blender/editors/object/object_edit.c b/source/blender/editors/object/object_edit.c
index 8ac12a5e3a4..3d2ddba3757 100644
--- a/source/blender/editors/object/object_edit.c
+++ b/source/blender/editors/object/object_edit.c
@@ -1384,9 +1384,11 @@ void add_hook(Scene *scene, View3D *v3d, int mode)
modifier_free(md);
}
else if(mode==5) { /* select */
+ // FIXME: this is now OBJECT_OT_hook_select
object_hook_select(obedit, hmd);
}
else if(mode==6) { /* clear offset */
+ // FIXME: this is now OBJECT_OT_hook_reset operator
where_is_object(scene, ob); /* ob is hook->parent */
Mat4Invert(ob->imat, ob->obmat);
@@ -1398,25 +1400,6 @@ void add_hook(Scene *scene, View3D *v3d, int mode)
DAG_scene_sort(scene);
}
-
-/* use this when the loc/size/rot of the parent has changed but the children should stay in the same place
- * apply-size-rot or object center for eg */
-static void ignore_parent_tx(Scene *scene, Object *ob )
-{
- Object workob;
- Object *ob_child;
-
- /* a change was made, adjust the children to compensate */
- for (ob_child=G.main->object.first; ob_child; ob_child=ob_child->id.next) {
- if (ob_child->parent == ob) {
- ED_object_apply_obmat(ob_child);
- what_does_parent(scene, ob_child, &workob);
- Mat4Invert(ob_child->parentinv, workob.obmat);
- }
- }
-}
-
-
void add_hook_menu(Scene *scene, View3D *v3d)
{
Object *obedit= scene->obedit; // XXX get from context
@@ -1435,6 +1418,25 @@ void add_hook_menu(Scene *scene, View3D *v3d)
add_hook(scene, v3d, mode);
}
+
+
+/* use this when the loc/size/rot of the parent has changed but the children should stay in the same place
+ * apply-size-rot or object center for eg */
+static void ignore_parent_tx(Scene *scene, Object *ob )
+{
+ Object workob;
+ Object *ob_child;
+
+ /* a change was made, adjust the children to compensate */
+ for (ob_child=G.main->object.first; ob_child; ob_child=ob_child->id.next) {
+ if (ob_child->parent == ob) {
+ ED_object_apply_obmat(ob_child);
+ what_does_parent(scene, ob_child, &workob);
+ Mat4Invert(ob_child->parentinv, workob.obmat);
+ }
+ }
+}
+
/* ******************** clear parent operator ******************* */
static EnumPropertyItem prop_clear_parent_types[] = {