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:
authorJiri Hnidek <jiri.hnidek@tul.cz>2007-01-09 14:50:45 +0300
committerJiri Hnidek <jiri.hnidek@tul.cz>2007-01-09 14:50:45 +0300
commit75b553e900c6156337b33628dff30f7fc57a4b0a (patch)
tree2a8407e2dde73c03d36616bdb6d66360ef986a47 /source/blender/src/verse_object.c
parent2e66b143f3a2ab90a1d50931dfe884678ed40265 (diff)
- Bug fix: object trnasformation now follows verse specification. It
means, other verse client will display object transformation correctly. Objects will not be up-side down etc. Bug reported at irc by Emil. Thanks!
Diffstat (limited to 'source/blender/src/verse_object.c')
-rw-r--r--source/blender/src/verse_object.c48
1 files changed, 48 insertions, 0 deletions
diff --git a/source/blender/src/verse_object.c b/source/blender/src/verse_object.c
index 572849b5a92..ca6c1ae2959 100644
--- a/source/blender/src/verse_object.c
+++ b/source/blender/src/verse_object.c
@@ -474,8 +474,55 @@ void post_link_destroy(VLink *vlink)
}
/*
+ * update position of blender object
+ */
+void post_transform_pos(VNode *vnode)
+{
+ struct VObjectData *obj_data = (VObjectData*)vnode->data;
+ struct Object *ob = (Object*)obj_data->object;
+
+ VECCOPY(ob->loc, obj_data->pos);
+
+ DAG_object_flush_update(G.scene, ob, OB_RECALC_OB);
+
+ allqueue(REDRAWVIEW3D, 1);
+}
+
+/*
+ * update rotation of blender object
+ */
+void post_transform_rot(VNode *vnode)
+{
+ struct VObjectData *obj_data = (VObjectData*)vnode->data;
+ struct Object *ob = (Object*)obj_data->object;
+
+ /* convert quaternion to euler rotation */
+ QuatToEul(obj_data->rot, ob->rot);
+
+ DAG_object_flush_update(G.scene, ob, OB_RECALC_OB);
+
+ allqueue(REDRAWVIEW3D, 1);
+}
+
+/*
+ * update scale of blender object
+ */
+void post_transform_scale(VNode *vnode)
+{
+ struct VObjectData *obj_data = (VObjectData*)vnode->data;
+ struct Object *ob = (Object*)obj_data->object;
+
+ VECCOPY(ob->size, obj_data->scale);
+
+ DAG_object_flush_update(G.scene, ob, OB_RECALC_OB);
+
+ allqueue(REDRAWVIEW3D, 1);
+}
+
+/*
* recalculate transformation matrix of object
*/
+#if 0
void post_transform(VNode *vnode)
{
struct VObjectData *obj_data = (VObjectData*)vnode->data;
@@ -513,6 +560,7 @@ void post_transform(VNode *vnode)
allqueue(REDRAWVIEW3D, 1);
}
+#endif
/*
* send transformation of Object to verse server