~diresu/blender/blender-command-port

« back to all changes in this revision

Viewing changes to source/gameengine/Converter/BL_ModifierDeformer.cpp

  • Committer: Dietrich Bollmann
  • Date: 2009-04-26 06:25:14 UTC
  • mfrom: (184.1.520)
  • Revision ID: diresu@web.de-20090426062514-ly27wepl1t5d7p8s
Update to state of blender repository from 2009-04-26 revision 19927.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/**
2
 
 * $Id: BL_ModifierDeformer.cpp 19872 2009-04-22 16:26:22Z ben2610 $
 
2
 * $Id: BL_ModifierDeformer.cpp 19923 2009-04-25 12:20:59Z ben2610 $
3
3
 *
4
4
 * ***** BEGIN GPL LICENSE BLOCK *****
5
5
 *
37
37
#include "STR_HashedString.h"
38
38
#include "RAS_IPolygonMaterial.h"
39
39
#include "BL_SkinMeshObject.h"
 
40
#include "PHY_IGraphicController.h"
40
41
 
41
42
//#include "BL_ArmatureController.h"
42
43
#include "DNA_armature_types.h"
97
98
{
98
99
        if (!ob->modifiers.first)
99
100
                return false;
 
101
        // soft body cannot use mesh modifiers
 
102
        if ((ob->gameflag & OB_SOFT_BODY) != 0)
 
103
                return false;
100
104
        ModifierData* md;
101
105
        for (md = (ModifierData*)ob->modifiers.first; md; md = (ModifierData*)md->next) {
102
 
                if (md->mode & eModifierMode_Realtime)
103
 
                        return true;
 
106
                if (modifier_dependsOnTime(md))
 
107
                        continue;
 
108
                if (!(md->mode & eModifierMode_Realtime))
 
109
                        continue;
 
110
                return true;
104
111
        }
105
112
        return false;
106
113
}
126
133
                        m_dm->release(m_dm);
127
134
                }
128
135
                m_dm = dm;
 
136
                /* update the graphic controller */
 
137
                PHY_IGraphicController *ctrl = m_gameobj->GetGraphicController();
 
138
                if (ctrl) {
 
139
                        float min_r[3], max_r[3];
 
140
                        INIT_MINMAX(min_r, max_r);
 
141
                        m_dm->getMinMax(m_dm, min_r, max_r);
 
142
                        ctrl->setLocalAabb(min_r, max_r);
 
143
                }
129
144
                m_lastModifierUpdate=m_gameobj->GetLastFrame();
130
145
                bShapeUpdate = true;
131
146
        }