MCPcopy Create free account
hub / github.com/OpenMW/openmw / insertModel

Method insertModel

apps/openmw/mwrender/objects.cpp:74–92  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

72 }
73
74 void Objects::insertModel(const MWWorld::Ptr& ptr, const std::string& mesh, bool allowLight)
75 {
76 insertBegin(ptr);
77 ptr.getRefData().getBaseNode()->setNodeMask(Mask_Object);
78 bool animated = ptr.getClass().useAnim();
79 std::string animationMesh = mesh;
80 if (animated && !mesh.empty())
81 {
82 animationMesh = Misc::ResourceHelpers::correctActorModelPath(
83 VFS::Path::toNormalized(mesh), mResourceSystem->getVFS());
84 if (animationMesh == mesh && Misc::StringUtils::ciEndsWith(animationMesh, ".nif"))
85 animated = false;
86 }
87
88 osg::ref_ptr<ObjectAnimation> anim(
89 new ObjectAnimation(ptr, animationMesh, mResourceSystem, animated, allowLight));
90
91 mObjects.emplace(ptr.mRef, std::move(anim));
92 }
93
94 void Objects::insertCreature(const MWWorld::Ptr& ptr, const std::string& mesh, bool weaponsShields)
95 {

Callers 15

insertObjectRenderingMethod · 0.80
insertObjectRenderingMethod · 0.80
insertObjectRenderingMethod · 0.80
insertObjectRenderingMethod · 0.80
insertObjectRenderingMethod · 0.80
insertObjectRenderingMethod · 0.80
insertObjectRenderingMethod · 0.80
insertObjectRenderingMethod · 0.80
insertObjectRenderingMethod · 0.80
insertObjectRenderingMethod · 0.80
insertObjectRenderingMethod · 0.80
insertObjectRenderingMethod · 0.80

Calls 9

toNormalizedFunction · 0.85
ciEndsWithFunction · 0.85
setNodeMaskMethod · 0.80
getClassMethod · 0.80
emplaceMethod · 0.80
getBaseNodeMethod · 0.45
useAnimMethod · 0.45
emptyMethod · 0.45
getVFSMethod · 0.45

Tested by

no test coverage detected