Hi, great Clarisse team,
How can I get all geometries from a abc referenced context and get the shading groups of each geometry?
context = ix.get_item("project://scene/context") # The context whenre you want to looking for
objects_array = ix.api.OfObjectArray(context.get_object_count()) # Grab all the items in the context and put it in the array
context.get_objects(objects_array)# An array that will contain the content of the context
# Look at all the items in the context with the for loop
for j in range(objects_array.get_count()):
item = objects_array[j]
print item
# Only geometry have shading groups so you just want to affect Geometries objects
if item.is_kindof("Geometry"):
for i in range(item.get_module().get_shading_group_count()):
print " " + item.get_module().get_shading_group(i)
qinyao wrote:BTW, how tho make my GuiWindow always on the top of the application.
clarisse_win = ix.application.get_event_window()Regards
window = MyWindow(clarisse_win, x, y, width, height)