Skip to content

Commit 91aea32

Browse files
Implement 3D layers (#840)
* Implement 3D layers * Remove unneeded files * Fix bug where a single hidden layer would ignore all of the layers on top when exporting * Fix pxo loading * Remove junk nodes from 3DShapeEdit Seems like they were created when I copied from the old 3D Options.tscn panel to the new 3D Shape Edit tool. * Make light gizmos half the size, and hide gizmos when rotating * Fix crash when using the 3D shape edit tool on a group layer * Remove unneeded code in Canvas.gd * 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. * Toggle 3D object visibility * Change texts and some variable names * Fill translation strings * Fix crash on group blending, and make the code in Export.blend_layers() more general * Fix errors when attempting to draw on a 3D cel Can occur when multiple cels are selected, some of them 3D and some of them pixel * Make scene properties and objects be per-cel instead of per-layer Breaks compatibility with previous .pxo files that had 3D layers. Also introduces serialize() and deserialize() methods to BaseCel * Use if not layer is get_script() in GroupLayer.blend_children() * Flip the condition in GroupLayer.blend_children() * Fix bug where locked/invisible layers could get drawn Regression from c2f6bf0 * Move gizmo code to 3DShapeEdit's draw_start(), move some undo/redo logic to 3DShapeEdit * Move all of the undo/redo code to 3DShapeEdit, simplify code in Cel3D * Store Cel3D image data to pxo, for easy usage by external software This makes importing projects with 3D layers to other software, such as Godot using godot_pixelorama_importer easier. * Make the linter happy * Fix bug where the previously selected object would remain selected when it got removed with undo
1 parent 5f290ae commit 91aea32

42 files changed

Lines changed: 3364 additions & 113 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

Translations/Translations.pot

Lines changed: 186 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -483,6 +483,10 @@ msgstr ""
483483
msgid "Group layer:"
484484
msgstr ""
485485

486+
#. A type of layer. A 3D layer contains data of 3D objects that are rasterized automatically by Pixelorama.
487+
msgid "3D layer:"
488+
msgstr ""
489+
486490
msgid "Direction:"
487491
msgstr ""
488492

@@ -1703,10 +1707,20 @@ msgstr ""
17031707
msgid "Layers"
17041708
msgstr ""
17051709

1710+
#. Hint tooltip of the create new layer button, found on the left side of the timeline.
17061711
msgid "Create a new layer"
17071712
msgstr ""
17081713

1709-
msgid "Create a new group layer"
1714+
#. One of the options of the create new layer button.
1715+
msgid "Add Pixel Layer"
1716+
msgstr ""
1717+
1718+
#. One of the options of the create new layer button.
1719+
msgid "Add Group Layer"
1720+
msgstr ""
1721+
1722+
#. One of the options of the create new layer button.
1723+
msgid "Add 3D Layer"
17101724
msgstr ""
17111725

17121726
msgid "Remove current layer"
@@ -2236,3 +2250,174 @@ msgid "Locked size\n\n"
22362250
"When enabled using the tool on the canvas will only move the cropping rectangle.\n\n"
22372251
"When disabled using the tool on the canvas will draw the rectangle."
22382252
msgstr ""
2253+
2254+
#. A tool used in 3D layers, that edits 3D objects.
2255+
msgid "3D Shape Edit"
2256+
msgstr ""
2257+
2258+
#. Used in 3D layers. A type of 3D object.
2259+
msgid "Box"
2260+
msgstr ""
2261+
2262+
#. Used in 3D layers. A type of 3D object.
2263+
msgid "Sphere"
2264+
msgstr ""
2265+
2266+
#. Used in 3D layers. A type of 3D object.
2267+
msgid "Capsule"
2268+
msgstr ""
2269+
2270+
#. Used in 3D layers. A type of 3D object.
2271+
msgid "Cylinder"
2272+
msgstr ""
2273+
2274+
#. Used in 3D layers. A type of 3D object.
2275+
msgid "Prism"
2276+
msgstr ""
2277+
2278+
#. Used in 3D layers. A type of 3D object.
2279+
msgid "Torus"
2280+
msgstr ""
2281+
2282+
#. Used in 3D layers. A type of 3D object.
2283+
msgid "Plane"
2284+
msgstr ""
2285+
2286+
#. Used in 3D layers. A type of light.
2287+
msgid "Directional light"
2288+
msgstr ""
2289+
2290+
#. Used in 3D layers. A type of light.
2291+
msgid "Spotlight"
2292+
msgstr ""
2293+
2294+
#. Used in 3D layers. A type of light.
2295+
msgid "Point light"
2296+
msgstr ""
2297+
2298+
#. Used in 3D layers. A type of 3D object.
2299+
msgid "Custom model"
2300+
msgstr ""
2301+
2302+
msgid "Selected object:"
2303+
msgstr ""
2304+
2305+
msgid "Add new object"
2306+
msgstr ""
2307+
2308+
msgid "Remove object"
2309+
msgstr ""
2310+
2311+
msgid "Camera"
2312+
msgstr ""
2313+
2314+
#. Found in the tool options of the 3D Shape Edit tool. Refers to camera projection mode.
2315+
msgid "Projection:"
2316+
msgstr ""
2317+
2318+
#. Found in the tool options of the 3D Shape Edit tool. One of the modes of camera projection.
2319+
msgid "Perspective"
2320+
msgstr ""
2321+
2322+
#. Found in the tool options of the 3D Shape Edit tool. One of the modes of camera projection.
2323+
msgid "Orthogonal"
2324+
msgstr ""
2325+
2326+
#. Found in the tool options of the 3D Shape Edit tool. One of the modes of camera projection.
2327+
msgid "Frustum"
2328+
msgstr ""
2329+
2330+
msgid "Rotation:"
2331+
msgstr ""
2332+
2333+
msgid "Scale:"
2334+
msgstr ""
2335+
2336+
#. Found in the tool options of the 3D Shape Edit tool.
2337+
msgid "Environment"
2338+
msgstr ""
2339+
2340+
#. Found in the tool options of the 3D Shape Edit tool, under the Environment category.
2341+
msgid "Ambient color:"
2342+
msgstr ""
2343+
2344+
#. Found in the tool options of the 3D Shape Edit tool, under the Environment category.
2345+
msgid "Ambient color energy:"
2346+
msgstr ""
2347+
2348+
msgid "Visible:"
2349+
msgstr ""
2350+
2351+
#. Refers to the transformation options of an object, such as its position, rotation and scale. For technical details, see https://docs.godotengine.org/en/stable/tutorials/math/matrices_and_transforms.html
2352+
msgid "Transform"
2353+
msgstr ""
2354+
2355+
#. Found in the tool options of the 3D Shape Edit tool. A category with mesh-related options.
2356+
msgid "Mesh"
2357+
msgstr ""
2358+
2359+
#. Found in the tool options of the 3D Shape Edit tool, under the Mesh category if a Prism is selected. Refers to the displacement of the upper edge along the X axis.
2360+
msgid "Left to right:"
2361+
msgstr ""
2362+
2363+
#. Radius of a circle/spherical object.
2364+
msgid "Radius:"
2365+
msgstr ""
2366+
2367+
msgid "Height:"
2368+
msgstr ""
2369+
2370+
#. Found in the tool options of the 3D Shape Edit tool, under the Mesh category if a spherical object is selected.
2371+
msgid "Radial segments:"
2372+
msgstr ""
2373+
2374+
#. Found in the tool options of the 3D Shape Edit tool, under the Mesh category if a spherical object is selected. Refers to the number of segments along the height of the sphere.
2375+
msgid "Rings:"
2376+
msgstr ""
2377+
2378+
#. Found in the tool options of the 3D Shape Edit tool, under the Mesh category if a Sphere is selected. If true, a hemisphere is created rather than a full sphere.
2379+
msgid "Is hemisphere:"
2380+
msgstr ""
2381+
2382+
#. Found in the tool options of the 3D Shape Edit tool, under the Mesh category if a Cylinder is selected.
2383+
msgid "Top radius:"
2384+
msgstr ""
2385+
2386+
#. Found in the tool options of the 3D Shape Edit tool, under the Mesh category if a Cylinder is selected.
2387+
msgid "Bottom radius:"
2388+
msgstr ""
2389+
2390+
msgid "Text:"
2391+
msgstr ""
2392+
2393+
#. Found in the tool options of the 3D Shape Edit tool, under the Mesh category if a Text object is selected. Refers to the size of one pixel's width on the text to scale it in 3D.
2394+
msgid "Pixel size:"
2395+
msgstr ""
2396+
2397+
#. Found in the tool options of the 3D Shape Edit tool, under the Mesh category if a Text object is selected. Step (in pixels) used to approximate Bézier curves.
2398+
msgid "Curve step:"
2399+
msgstr ""
2400+
2401+
msgid "Horizontal alignment:"
2402+
msgstr ""
2403+
2404+
msgid "Left"
2405+
msgstr ""
2406+
2407+
msgid "Right"
2408+
msgstr ""
2409+
2410+
#. Found in the tool options of the 3D Shape Edit tool, under the Light category if a light is selected. Refers to the energy of the light. The more energy, the brighter it shines.
2411+
msgid "Energy:"
2412+
msgstr ""
2413+
2414+
#. Found in the tool options of the 3D Shape Edit tool, under the Light category if a light is selected. If true, the light's effect is reversed, darkening areas and casting bright shadows.
2415+
msgid "Negative:"
2416+
msgstr ""
2417+
2418+
msgid "Shadow:"
2419+
msgstr ""
2420+
2421+
#. Refers to the range of something, like the range of a spotlight.
2422+
msgid "Range:"
2423+
msgstr ""
Lines changed: 1 addition & 0 deletions
Loading
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
[remap]
2+
3+
importer="texture"
4+
type="StreamTexture"
5+
path="res://.import/directional_light.svg-093cdb9a72dee590271da014181a4680.stex"
6+
metadata={
7+
"vram_texture": false
8+
}
9+
10+
[deps]
11+
12+
source_file="res://assets/graphics/gizmos/directional_light.svg"
13+
dest_files=[ "res://.import/directional_light.svg-093cdb9a72dee590271da014181a4680.stex" ]
14+
15+
[params]
16+
17+
compress/mode=0
18+
compress/lossy_quality=0.7
19+
compress/hdr_mode=0
20+
compress/bptc_ldr=0
21+
compress/normal_map=0
22+
flags/repeat=0
23+
flags/filter=false
24+
flags/mipmaps=false
25+
flags/anisotropic=false
26+
flags/srgb=2
27+
process/fix_alpha_border=true
28+
process/premult_alpha=false
29+
process/HDR_as_SRGB=false
30+
process/invert_color=false
31+
process/normal_map_invert_y=false
32+
stream=false
33+
size_limit=0
34+
detect_3d=false
35+
svg/scale=1.0
Lines changed: 1 addition & 0 deletions
Loading
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
[remap]
2+
3+
importer="texture"
4+
type="StreamTexture"
5+
path="res://.import/omni_light.svg-b0faa945d45257c6c9fecd256ed51eee.stex"
6+
metadata={
7+
"vram_texture": false
8+
}
9+
10+
[deps]
11+
12+
source_file="res://assets/graphics/gizmos/omni_light.svg"
13+
dest_files=[ "res://.import/omni_light.svg-b0faa945d45257c6c9fecd256ed51eee.stex" ]
14+
15+
[params]
16+
17+
compress/mode=0
18+
compress/lossy_quality=0.7
19+
compress/hdr_mode=0
20+
compress/bptc_ldr=0
21+
compress/normal_map=0
22+
flags/repeat=0
23+
flags/filter=false
24+
flags/mipmaps=false
25+
flags/anisotropic=false
26+
flags/srgb=2
27+
process/fix_alpha_border=true
28+
process/premult_alpha=false
29+
process/HDR_as_SRGB=false
30+
process/invert_color=false
31+
process/normal_map_invert_y=false
32+
stream=false
33+
size_limit=0
34+
detect_3d=false
35+
svg/scale=1.0
Lines changed: 1 addition & 0 deletions
Loading
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
[remap]
2+
3+
importer="texture"
4+
type="StreamTexture"
5+
path="res://.import/spot_light.svg-d309a6f5345413a6c8b9afd3cfe72f29.stex"
6+
metadata={
7+
"vram_texture": false
8+
}
9+
10+
[deps]
11+
12+
source_file="res://assets/graphics/gizmos/spot_light.svg"
13+
dest_files=[ "res://.import/spot_light.svg-d309a6f5345413a6c8b9afd3cfe72f29.stex" ]
14+
15+
[params]
16+
17+
compress/mode=0
18+
compress/lossy_quality=0.7
19+
compress/hdr_mode=0
20+
compress/bptc_ldr=0
21+
compress/normal_map=0
22+
flags/repeat=0
23+
flags/filter=false
24+
flags/mipmaps=false
25+
flags/anisotropic=false
26+
flags/srgb=2
27+
process/fix_alpha_border=true
28+
process/premult_alpha=false
29+
process/HDR_as_SRGB=false
30+
process/invert_color=false
31+
process/normal_map_invert_y=false
32+
stream=false
33+
size_limit=0
34+
detect_3d=false
35+
svg/scale=1.0
175 Bytes
Loading
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
[remap]
2+
3+
importer="texture"
4+
type="StreamTexture"
5+
path="res://.import/3dshapeedit.png-2d2aa73fafc7df7f7df84b5c0db6c1a6.stex"
6+
metadata={
7+
"vram_texture": false
8+
}
9+
10+
[deps]
11+
12+
source_file="res://assets/graphics/tools/3dshapeedit.png"
13+
dest_files=[ "res://.import/3dshapeedit.png-2d2aa73fafc7df7f7df84b5c0db6c1a6.stex" ]
14+
15+
[params]
16+
17+
compress/mode=0
18+
compress/lossy_quality=0.7
19+
compress/hdr_mode=0
20+
compress/bptc_ldr=0
21+
compress/normal_map=0
22+
flags/repeat=0
23+
flags/filter=false
24+
flags/mipmaps=false
25+
flags/anisotropic=false
26+
flags/srgb=2
27+
process/fix_alpha_border=true
28+
process/premult_alpha=false
29+
process/HDR_as_SRGB=false
30+
process/invert_color=false
31+
process/normal_map_invert_y=false
32+
stream=false
33+
size_limit=0
34+
detect_3d=false
35+
svg/scale=1.0
196 Bytes
Loading

0 commit comments

Comments
 (0)