1
0
Fork 0
mirror of https://github.com/Orama-Interactive/Pixelorama.git synced 2025-02-23 14:03:13 +00:00

Add torus in the Cel3DObject.Type enumerator

Torus isn't currently supported in Godot 3.5, but it is in 3.6 and 4.0, so this is just future-proofing. May break compatibility with .pxo files that were exported with 3D layers before this change.
This commit is contained in:
Emmanouil Papadeas 2023-03-28 17:22:44 +03:00
parent 2b1c0afd33
commit 162ba4c70b
2 changed files with 13 additions and 11 deletions

View file

@ -10,6 +10,7 @@ enum Type {
CAPSULE, CAPSULE,
CYLINDER, CYLINDER,
PRISM, PRISM,
TORUS,
PLANE, PLANE,
TEXT, TEXT,
DIR_LIGHT, DIR_LIGHT,

View file

@ -59,17 +59,18 @@ func _ready() -> void:
Global.connect("cel_changed", self, "_cel_changed") Global.connect("cel_changed", self, "_cel_changed")
_cel_changed() _cel_changed()
var new_object_popup := new_object_menu_button.get_popup() var new_object_popup := new_object_menu_button.get_popup()
new_object_popup.add_item("Box") new_object_popup.add_item("Box", Cel3DObject.Type.BOX)
new_object_popup.add_item("Sphere") new_object_popup.add_item("Sphere", Cel3DObject.Type.SPHERE)
new_object_popup.add_item("Capsule") new_object_popup.add_item("Capsule", Cel3DObject.Type.CAPSULE)
new_object_popup.add_item("Cylinder") new_object_popup.add_item("Cylinder", Cel3DObject.Type.CYLINDER)
new_object_popup.add_item("Prism") new_object_popup.add_item("Prism", Cel3DObject.Type.PRISM)
new_object_popup.add_item("Plane") # new_object_popup.add_item("Torus", Cel3DObject.Type.TORUS)
new_object_popup.add_item("Text") new_object_popup.add_item("Plane", Cel3DObject.Type.PLANE)
new_object_popup.add_item("Directional light") new_object_popup.add_item("Text", Cel3DObject.Type.TEXT)
new_object_popup.add_item("Spotlight") new_object_popup.add_item("Directional light", Cel3DObject.Type.DIR_LIGHT)
new_object_popup.add_item("Omnidirectional (point) light") new_object_popup.add_item("Spotlight", Cel3DObject.Type.SPOT_LIGHT)
new_object_popup.add_item("Load model from file") new_object_popup.add_item("Omnidirectional (point) light", Cel3DObject.Type.OMNI_LIGHT)
new_object_popup.add_item("Load model from file", Cel3DObject.Type.IMPORTED)
new_object_popup.connect("id_pressed", self, "_add_new_object") new_object_popup.connect("id_pressed", self, "_add_new_object")
for prop in layer_properties: for prop in layer_properties:
var node: Control = layer_properties[prop] var node: Control = layer_properties[prop]