- 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!
This commit is contained in:
@@ -473,9 +473,56 @@ void post_link_destroy(VLink *vlink)
|
||||
allqueue(REDRAWALL, 1);
|
||||
}
|
||||
|
||||
/*
|
||||
* 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
|
||||
|
||||
Reference in New Issue
Block a user