Merge pull request #55579 from madmiraal/fix-55561-3.x
This commit is contained in:
commit
7c6bb122f1
3 changed files with 6 additions and 4 deletions
|
@ -46,7 +46,7 @@
|
|||
</method>
|
||||
<method name="add_mesh">
|
||||
<return type="void" />
|
||||
<argument index="0" name="mesh" type="ArrayMesh" />
|
||||
<argument index="0" name="mesh" type="Mesh" />
|
||||
<argument index="1" name="billboard" type="bool" default="false" />
|
||||
<argument index="2" name="skeleton" type="SkinReference" default="null" />
|
||||
<argument index="3" name="material" type="Material" default="null" />
|
||||
|
|
|
@ -57,7 +57,7 @@ public:
|
|||
|
||||
struct Instance {
|
||||
RID instance;
|
||||
Ref<ArrayMesh> mesh;
|
||||
Ref<Mesh> mesh;
|
||||
Ref<Material> material;
|
||||
Ref<SkinReference> skin_reference;
|
||||
RID skeleton;
|
||||
|
@ -103,7 +103,7 @@ protected:
|
|||
public:
|
||||
void add_lines(const Vector<Vector3> &p_lines, const Ref<Material> &p_material, bool p_billboard = false, const Color &p_modulate = Color(1, 1, 1));
|
||||
void add_vertices(const Vector<Vector3> &p_vertices, const Ref<Material> &p_material, Mesh::PrimitiveType p_primitive_type, bool p_billboard = false, const Color &p_modulate = Color(1, 1, 1));
|
||||
void add_mesh(const Ref<ArrayMesh> &p_mesh, bool p_billboard = false, const Ref<SkinReference> &p_skin_reference = Ref<SkinReference>(), const Ref<Material> &p_material = Ref<Material>());
|
||||
void add_mesh(const Ref<Mesh> &p_mesh, bool p_billboard = false, const Ref<SkinReference> &p_skin_reference = Ref<SkinReference>(), const Ref<Material> &p_material = Ref<Material>());
|
||||
void add_collision_segments(const Vector<Vector3> &p_lines);
|
||||
void add_collision_triangles(const Ref<TriangleMesh> &p_tmesh);
|
||||
void add_unscaled_billboard(const Ref<Material> &p_material, float p_scale = 1, const Color &p_modulate = Color(1, 1, 1));
|
||||
|
|
|
@ -179,8 +179,10 @@ void EditorSpatialGizmo::Instance::create_instance(Spatial *p_base, bool p_hidde
|
|||
VS::get_singleton()->instance_set_layer_mask(instance, layer); //gizmos are 26
|
||||
}
|
||||
|
||||
void EditorSpatialGizmo::add_mesh(const Ref<ArrayMesh> &p_mesh, bool p_billboard, const Ref<SkinReference> &p_skin_reference, const Ref<Material> &p_material) {
|
||||
void EditorSpatialGizmo::add_mesh(const Ref<Mesh> &p_mesh, bool p_billboard, const Ref<SkinReference> &p_skin_reference, const Ref<Material> &p_material) {
|
||||
ERR_FAIL_COND(!spatial_node);
|
||||
ERR_FAIL_COND_MSG(!p_mesh.is_valid(), "EditorSpatialGizmo.add_mesh() requires a valid Mesh resource.");
|
||||
|
||||
Instance ins;
|
||||
|
||||
ins.billboard = p_billboard;
|
||||
|
|
Loading…
Reference in a new issue