Skip to content

Commit

Permalink
multi-inherit
Browse files Browse the repository at this point in the history
  • Loading branch information
DSaurus committed Jan 3, 2024
1 parent 809ccd6 commit f309543
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion threestudio/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,14 @@ def decorator(cls):
def find(name):
if ":" in name:
main_name, sub_name = name.split(":")
if "," in sub_name:
name_list = sub_name.split(",")
else:
name_list = [sub_name]
name_list.append(main_name)
NewClass = type(
f"{main_name}.{sub_name}",
(__modules__[main_name], __modules__[sub_name]),
tuple([__modules__[name] for name in name_list]),
{},
)
return NewClass
Expand Down

0 comments on commit f309543

Please sign in to comment.