mirror of
https://github.com/Relintai/mesh_data_resource.git
synced 2025-04-21 21:41:19 +02:00
Clang format.
This commit is contained in:
parent
7de9c25214
commit
b9cb58897a
@ -32,7 +32,6 @@ void MeshDataResource::set_array(const Array &p_arrays) {
|
||||
}
|
||||
|
||||
MeshDataResource::MeshDataResource() {
|
||||
|
||||
}
|
||||
|
||||
void MeshDataResource::_bind_methods() {
|
||||
|
@ -23,8 +23,8 @@ SOFTWARE.
|
||||
#ifndef MESH_DATA_REOURCE_H
|
||||
#define MESH_DATA_REOURCE_H
|
||||
|
||||
#include "core/resource.h"
|
||||
#include "core/array.h"
|
||||
#include "core/resource.h"
|
||||
#include "scene/resources/mesh.h"
|
||||
|
||||
class MeshDataResource : public Resource {
|
||||
|
@ -88,9 +88,9 @@ Error EditorImportColladaMdr::import(const String &p_source_file, const String &
|
||||
if (mesh.is_valid()) {
|
||||
Ref<MeshDataResource> mdr;
|
||||
mdr.instance();
|
||||
|
||||
Array arrays = mesh->surface_get_arrays(0);
|
||||
|
||||
|
||||
Array arrays = mesh->surface_get_arrays(0);
|
||||
|
||||
mdr->set_array(apply_transforms(arrays, p_options));
|
||||
|
||||
n->queue_delete();
|
||||
@ -104,12 +104,11 @@ Error EditorImportColladaMdr::import(const String &p_source_file, const String &
|
||||
return Error::ERR_PARSE_ERROR;
|
||||
}
|
||||
|
||||
|
||||
Array EditorImportColladaMdr::apply_transforms(Array &array, const Map<StringName, Variant> &p_options) {
|
||||
Vector3 offset = p_options["offset"];
|
||||
Vector3 rotation = p_options["rotation"];
|
||||
Vector3 scale = p_options["scale"];
|
||||
|
||||
Vector3 offset = p_options["offset"];
|
||||
Vector3 rotation = p_options["rotation"];
|
||||
Vector3 scale = p_options["scale"];
|
||||
|
||||
Transform transform = Transform(Basis(rotation).scaled(scale), offset);
|
||||
|
||||
Array verts = array.get(Mesh::ARRAY_VERTEX);
|
||||
|
@ -23,8 +23,8 @@ SOFTWARE.
|
||||
#ifndef EDITOR_PLUGIN_COLLADA_MDR
|
||||
#define EDITOR_PLUGIN_COLLADA_MDR
|
||||
|
||||
#include "editor/editor_plugin.h"
|
||||
#include "core/ustring.h"
|
||||
#include "editor/editor_plugin.h"
|
||||
|
||||
#include "editor_import_collada_mdr.h"
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user