# GetMeshDescription Package Error and VertexAttributes().SetAttribute Tangent Issue

**URL:** <https://forums.unrealengine.com/t/getmeshdescription-package-error-and-vertexattributes-setattribute-tangent-issue/504389>\
**Category:** C++\
**Tags:** unreal-engine, runtime, package-error, UE4-27, question\
**Created:** [March 6, 2022, 3:08am UTC](https://forums.unrealengine.com/t/getmeshdescription-package-error-and-vertexattributes-setattribute-tangent-issue/504389 "2022-03-06T03:08:30Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![eray\_ozr](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@eray\_ozr](https://forums.unrealengine.com/u/eray_ozr)\
**Post date:** [March 6, 2022, 3:08am UTC](https://forums.unrealengine.com/t/getmeshdescription-package-error-and-vertexattributes-setattribute-tangent-issue/504389/1 "2022-03-06T03:08:31Z")

</div>

Object bounds dont work after VertexAttributes().SetAttribute and materials lost their opacity. I think it’s about tangents and normals.

Also GetMeshDescription gives package error as ‘GetMeshDescription’: is not a member of ‘UStaticMesh’

I can create same effect with “Editable Mesh” and get vertices from a custom recursive GetSectionFromStaticMesh function. But EditableMesh is not part of UE5. I dont want re-write my plugin again for Geometry Scripting changes. Also in my opinion, getting vertices from ProceduralMesh is a bad approach.

So, I created issue for both of them for detailed explenations.  
Is there any who can help with them ?

Thank you very much for your times !

> <https://github.com/FF-Projects-UE/MeshOperations/issues/1>
>
> \*\*Code Link:\*\*
> https://github.com/FF-Projects-UE/MeshOperations/blob/main/Sourc…e/MeshOperations/Private/MeshOperationsBPLibrary.cpp
> 
> \*\*Code Line:\*\*
> Function starts from 199.
> Move Pivot System starts from 223 in same function.
> 
> \*\*Get Vertex Locations Method:\*\*
> FPositionVertexBuffer and convert it to world space.
> 
> \*\*Move Pivot System:\*\*
> Mesh Descriptions.
> 
> \*\*Goal:\*\*
> Move pivot of runtime imported CAD based static mesh components to center and return them to their original locations.
> 
> \*\*Issue Description\*\*
> After pivot change, I can not use \`GetComponentBounds\` blueprint node or \`StaticMeshComponent.Bounds.Origin\` to get mesh's origin. It gives original location before vertex movement. Also materials looks different after operation.
> I think it's about Tangent and Normal calculations because UnrealEngine's Editable Mesh system says that, we should calculate them again after movement. But I dont know how can I do that.
> 
> !\[issue\_2\](https://user-images.githubusercontent.com/10528447/156906965-07437b5b-b1ad-460e-a54f-6c2da6e7292b.jpg)

> <https://github.com/FF-Projects-UE/MeshOperations/issues/2>
>
> \*\*Code Link:\*\*
> https://github.com/FF-Projects-UE/MeshOperations/blob/main/Sourc…e/MeshOperations/Private/MeshOperationsBPLibrary.cpp
> 
> \*\*Code Line:\*\*
> Function starts from 199.
> Move Pivot System starts from 223 in same function.
> 
> \*\*Get Vertex Locations Method:\*\*
> FPositionVertexBuffer and convert it to world space.
> 
> \*\*Move Pivot System:\*\*
> Mesh Descriptions.
> 
> \*\*Goal:\*\*
> Move pivot of runtime imported CAD based static mesh components to center and return them to their original locations.
> 
> \*\*Issue Description:\*\*
> When I want to try package my project, UE4 gives me this error.
> 'GetMeshDescription': is not a member of 'UStaticMesh'
> Also it points me irrelevant .h files such as MorphTargets
> I added #include "Engine/StaticMesh.h" to my .cpp file but it does not work.
> 
> \`\`\`
> Error:
> UATHelper: Packaging (Windows (64-bit)): \[1/3\] Module.MeshOperations.cpp UATHelper: 
> Packaging (Windows (64-bit)): D:/Epic/Projects/FROZEN/SDKs/FF\_Plugins/Plugins/MeshOperations/Source/MeshOperations/Private/MeshOperationsBPLibrary.cpp(251): error C2039: 'GetMeshDescription': is not a member of 'UStaticMesh' 
> UATHelper: Packaging (Windows (64-bit)): D:\\Epic\\Engines\\UE\_4.27\\Engine\\Source\\Runtime\\Engine\\Classes\\Animation/MorphTarget.h(15): note: see declaration of 'UStaticMesh' 
> UATHelper: Packaging (Windows (64-bit)): Took 6.9196636s to run UnrealBuildTool.exe, ExitCode=6 
> UATHelper: Packaging (Windows (64-bit)): UnrealBuildTool failed. 
> See log for more details. (C:\\Users\\erayo\\AppData\\Roaming\\Unreal Engine\\AutomationTool\\Logs\\D+Epic+Engines+UE\_4.27\\UBT-FF\_Plugins-Win64-Development.txt) 
> UATHelper: Packaging (Windows (64-bit)): AutomationTool exiting with ExitCode=6 (6) 
> UATHelper: Packaging (Windows (64-bit)): BUILD FAILED
> \`\`\`

---

<div class="post-metadata">

**Author:** ![eray\_ozr](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@eray\_ozr](https://forums.unrealengine.com/u/eray_ozr)\
**Post date:** [March 8, 2022, 4:01am UTC](https://forums.unrealengine.com/t/getmeshdescription-package-error-and-vertexattributes-setattribute-tangent-issue/504389/2 "2022-03-08T04:01:35Z")

</div>

I converted it to ApplyTransform and issue is about Building not Vertex Attributes.  
BuildFromMeshDescription does nothing and Build() just broke opacity also Bounds.Origin remains same.

Also I tried to create new mesh description \> reserve vertices → create vertices → BuildFromMeshDescription. This time pivot is true but there is no visualized mesh. I think I need a polygon or tris calculation. But dont know how.
