if (DebugDataVisible & scene::EDS_NORMALS)\r
{\r
// draw normals\r
- const f32 debugNormalLength = SceneManager->getParameters()->getAttributeAsFloat(DEBUG_NORMAL_LENGTH);\r
- const video::SColor debugNormalColor = SceneManager->getParameters()->getAttributeAsColor(DEBUG_NORMAL_COLOR);\r
+ const f32 debugNormalLength = 1.f;\r
+ const video::SColor debugNormalColor = video::SColor(255, 34, 221, 221);\r
const u32 count = Mesh->getMeshBufferCount();\r
\r
for (u32 i=0; i != count; ++i)\r
}\r
\r
\r
-//! Writes attributes of the scene node.\r
-void CMeshSceneNode::serializeAttributes(io::IAttributes* out, io::SAttributeReadWriteOptions* options) const\r
-{\r
- IMeshSceneNode::serializeAttributes(out, options);\r
-\r
- if (options && (options->Flags&io::EARWF_USE_RELATIVE_PATHS) && options->Filename)\r
- {\r
- const io::path path = SceneManager->getFileSystem()->getRelativeFilename(\r
- SceneManager->getFileSystem()->getAbsolutePath(SceneManager->getMeshCache()->getMeshName(Mesh).getPath()),\r
- options->Filename);\r
- out->addString("Mesh", path.c_str());\r
- }\r
- else\r
- out->addString("Mesh", SceneManager->getMeshCache()->getMeshName(Mesh).getPath().c_str());\r
- out->addBool("ReadOnlyMaterials", ReadOnlyMaterials);\r
-}\r
-\r
-\r
-//! Reads attributes of the scene node.\r
-void CMeshSceneNode::deserializeAttributes(io::IAttributes* in, io::SAttributeReadWriteOptions* options)\r
-{\r
- io::path oldMeshStr = SceneManager->getMeshCache()->getMeshName(Mesh);\r
- io::path newMeshStr = in->getAttributeAsString("Mesh");\r
- ReadOnlyMaterials = in->getAttributeAsBool("ReadOnlyMaterials");\r
-\r
- if (newMeshStr != "" && oldMeshStr != newMeshStr)\r
- {\r
- IMesh* newMesh = 0;\r
- IAnimatedMesh* newAnimatedMesh = SceneManager->getMesh(newMeshStr.c_str());\r
-\r
- if (newAnimatedMesh)\r
- newMesh = newAnimatedMesh->getMesh(0);\r
-\r
- if (newMesh)\r
- setMesh(newMesh);\r
- }\r
-\r
- // optional attribute to assign the hint to the whole mesh\r
- if (in->existsAttribute("HardwareMappingHint") &&\r
- in->existsAttribute("HardwareMappingBufferType"))\r
- {\r
- scene::E_HARDWARE_MAPPING mapping = scene::EHM_NEVER;\r
- scene::E_BUFFER_TYPE bufferType = scene::EBT_NONE;\r
-\r
- core::stringc smapping = in->getAttributeAsString("HardwareMappingHint");\r
- if (smapping.equals_ignore_case("static"))\r
- mapping = scene::EHM_STATIC;\r
- else if (smapping.equals_ignore_case("dynamic"))\r
- mapping = scene::EHM_DYNAMIC;\r
- else if (smapping.equals_ignore_case("stream"))\r
- mapping = scene::EHM_STREAM;\r
-\r
- core::stringc sbufferType = in->getAttributeAsString("HardwareMappingBufferType");\r
- if (sbufferType.equals_ignore_case("vertex"))\r
- bufferType = scene::EBT_VERTEX;\r
- else if (sbufferType.equals_ignore_case("index"))\r
- bufferType = scene::EBT_INDEX;\r
- else if (sbufferType.equals_ignore_case("vertexindex"))\r
- bufferType = scene::EBT_VERTEX_AND_INDEX;\r
-\r
- IMesh* mesh = getMesh();\r
- if (mesh)\r
- mesh->setHardwareMappingHint(mapping, bufferType);\r
- }\r
-\r
- IMeshSceneNode::deserializeAttributes(in, options);\r
-}\r
-\r
-\r
//! Sets if the scene node should not copy the materials of the mesh but use them in a read only style.\r
/* In this way it is possible to change the materials a mesh causing all mesh scene nodes\r
referencing this mesh to change too. */\r