Huge commit: VERSE

- All code is in #ifdef ... #endif
 - Only make build system is supported and you have to add:
    export WITH_VERSE=true
   to user-def.mk file
 - Blender can share only mesh objects and bitmaps now
 - More informations can be found at wiki:
    http://mediawiki.blender.org/index.php/BlenderDev/VerseIntegrationToBlender
    http://mediawiki.blender.org/index.php/BlenderDev/VerseIntegrationToBlenderUserDoc

  I hope, that I didn't forget at anything
This commit is contained in:
2006-08-20 15:22:56 +00:00
parent ffe630b452
commit 2ee42ac01e
56 changed files with 9178 additions and 59 deletions

View File

@@ -59,6 +59,10 @@
#include "BIF_editsima.h"
#include "BIF_meshtools.h"
#ifdef WITH_VERSE
#include "BIF_verse.h"
#endif
#include "BKE_action.h"
#include "BKE_anim.h"
#include "BKE_armature.h"
@@ -74,6 +78,10 @@
#include "BKE_object.h"
#include "BKE_utildefines.h"
#ifdef WITH_VERSE
#include "BKE_verse.h"
#endif
#include "BSE_view.h"
#include "BDR_unwrapper.h"
@@ -202,6 +210,9 @@ static void editmesh_apply_to_mirror(TransInfo *t)
void recalcData(TransInfo *t)
{
Base *base;
#ifdef WITH_VERSE
struct TransData *td;
#endif
if (G.obedit) {
if (G.obedit->type == OB_MESH) {
@@ -334,6 +345,17 @@ void recalcData(TransInfo *t)
}
}
}
#ifdef WITH_VERSE
for (td = t->data; td < t->data + t->total; td++) {
if(td->flag & TD_VERSE_VERT) {
if(td->verse)
send_versevert_pos((VerseVert*)td->verse);
}
else if(td->flag & TD_VERSE_OBJECT)
if(td->verse) b_verse_send_transformation((Object*)td->verse);
}
#endif
/* update shaded drawmode while transform */
if(t->spacetype==SPACE_VIEW3D && G.vd->drawtype == OB_SHADED)
@@ -463,6 +485,25 @@ void initTrans (TransInfo *t)
void postTrans (TransInfo *t)
{
G.moving = 0; // Set moving flag off (display as usual)
#ifdef WITH_VERSE
struct TransData *td;
for (td = t->data; td < t->data + t->total; td++) {
if(td->flag & TD_VERSE_VERT) {
if(td->verse) send_versevert_pos((VerseVert*)td->verse);
}
else if(td->flag & TD_VERSE_OBJECT) {
if(td->verse) {
struct VNode *vnode;
vnode = (VNode*)((Object*)td->verse)->vnode;
((VObjectData*)vnode->data)->flag |= POS_SEND_READY;
((VObjectData*)vnode->data)->flag |= ROT_SEND_READY;
((VObjectData*)vnode->data)->flag |= SCALE_SEND_READY;
b_verse_send_transformation((Object*)td->verse);
}
}
}
#endif
stopConstraint(t);
@@ -619,6 +660,25 @@ void restoreTransObjects(TransInfo *t)
for (td = t->data; td < t->data + t->total; td++) {
restoreElement(td);
#ifdef WITH_VERSE
/* position of vertexes and object transformation matrix is sent
* extra, becuase blender uses synchronous sending of vertexes
* position as well object trans. matrix and it isn't possible to
* send it in recalcData sometimes */
if(td->flag & TD_VERSE_VERT) {
if(td->verse) {
((VerseVert*)td->verse)->flag |= VERT_POS_OBSOLETE;
}
}
else if(td->flag & TD_VERSE_OBJECT)
if(td->verse) {
struct VNode *vnode;
vnode = (VNode*)((Object*)td->verse)->vnode;
((VObjectData*)vnode->data)->flag |= POS_SEND_READY;
((VObjectData*)vnode->data)->flag |= ROT_SEND_READY;
((VObjectData*)vnode->data)->flag |= SCALE_SEND_READY;
}
#endif
}
recalcData(t);
}