@@ -84,12 +84,38 @@ def process(self, model_file, image, **kwargs):
8484
8585 return output_image , output_mask , model_file ,
8686
87+ class Preview3D ():
88+ @classmethod
89+ def INPUT_TYPES (s ):
90+ return {"required" : {
91+ "model_file" : ("STRING" , {"default" : "" , "multiline" : False }),
92+ "show_grid" : ([True , False ],),
93+ "camera_type" : (["perspective" , "orthographic" ],),
94+ "view" : (["front" , "right" , "top" , "isometric" ],),
95+ "material" : (["original" , "normal" , "wireframe" , "depth" ],),
96+ "bg_color" : ("STRING" , {"default" : "#000000" , "multiline" : False }),
97+ "light_intensity" : ("INT" , {"default" : 10 , "min" : 1 , "max" : 20 , "step" : 1 }),
98+ "up_direction" : (["original" , "-x" , "+x" , "-y" , "+y" , "-z" , "+z" ],),
99+ }}
100+
101+ OUTPUT_NODE = True
102+ RETURN_TYPES = ()
103+
104+ CATEGORY = "3d"
105+
106+ FUNCTION = "process"
107+
108+ def process (self , model_file , ** kwargs ):
109+ return {"ui" : {"model_file" : [model_file ]}, "result" : ()}
110+
87111NODE_CLASS_MAPPINGS = {
88112 "Load3D" : Load3D ,
89- "Load3DAnimation" : Load3DAnimation
113+ "Load3DAnimation" : Load3DAnimation ,
114+ "Preview3D" : Preview3D
90115}
91116
92117NODE_DISPLAY_NAME_MAPPINGS = {
93118 "Load3D" : "Load 3D" ,
94- "Load3DAnimation" : "Load 3D - Animation"
119+ "Load3DAnimation" : "Load 3D - Animation" ,
120+ "Preview3D" : "Preview 3D"
95121}
0 commit comments