File tree 1 file changed +23
-1
lines changed
1 file changed +23
-1
lines changed Original file line number Diff line number Diff line change @@ -322,12 +322,30 @@ def get_code(self, **kwargs) -> str:
322
322
323
323
324
324
class ShowLayer (Node ):
325
+ """
326
+ show layer <name> at a,b,c :
327
+ atl
328
+ """
329
+
325
330
__slots__ = [
326
331
"layer" ,
327
332
"at_list" ,
328
333
"atl" ,
329
334
]
330
335
336
+ def get_code (self , ** kwargs ) -> str :
337
+ start = "show layer"
338
+ if hasattr (self , "layer" ) and self .layer :
339
+ start += f" { self .layer } "
340
+ if hasattr (self , "at_list" ) and self .at_list :
341
+ start += f" at { util .get_code (self .at_list ,** kwargs )} "
342
+ if hasattr (self , "atl" ) and self .atl :
343
+ start += ":"
344
+ rv = [start ]
345
+ if hasattr (self , "atl" ) and self .atl :
346
+ rv .append (util .indent (util .get_code (self .atl )))
347
+ return "\n " .join (rv )
348
+
331
349
332
350
class Scene (Node ):
333
351
__slots__ = [
@@ -785,14 +803,18 @@ class Camera(Node):
785
803
camera background:
786
804
perspective True
787
805
806
+ camera master at a,b,c:
807
+ atl
788
808
"""
789
809
810
+ __slots__ = ["layer" , "at_list" , "atl" ]
811
+
790
812
def get_code (self , ** kwargs ) -> str :
791
813
start = "camera"
792
814
if self .layer :
793
815
start += f" { self .layer } "
794
816
if self .at_list :
795
- raise NotImplementedError
817
+ start += f" at { util . get_code ( self . at_list , ** kwargs ) } "
796
818
if self .atl :
797
819
start += ":"
798
820
rv = [start ]
You can’t perform that action at this time.
0 commit comments