@@ -0,0 +1,2101 @@
+%0A#%0A# This source file is part of appleseed.%0A# Visit http://appleseedhq.net/ for additional information and resources.%0A#%0A# This software is released under the MIT license.%0A#%0A# Copyright (c) 2017 Francois Beaune, The appleseedhq Organization%0A#%0A# Permission is hereby granted, free of charge, to any person obtaining a copy%0A# of this software and associated documentation files (the %22Software%22), to deal%0A# in the Software without restriction, including without limitation the rights%0A# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell%0A# copies of the Software, and to permit persons to whom the Software is%0A# furnished to do so, subject to the following conditions:%0A#%0A# The above copyright notice and this permission notice shall be included in%0A# all copies or substantial portions of the Software.%0A#%0A# THE SOFTWARE IS PROVIDED %22AS IS%22, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR%0A# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,%0A# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE%0A# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER%0A# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,%0A# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN%0A# THE SOFTWARE.%0A#%0A%0Afrom appleseed.studio import *%0A%0A%0Adef register():%0A    # In the future, this plugin will be able to add menus or panels to appleseed.studio.%0A    pass%0A%0A%0Adef list_objects():%0A    %22%22%22Print names of all objects in the scene.%22%22%22%0A%0A    scene = current_project().get_scene()%0A    assemblies = scene.assemblies()%0A%0A    for ass_key in assemblies:%0A        list_objects_in_assembly(assemblies%5Bass_key%5D)%0A%0A%0Adef list_objects_in_assembly(ass):%0A    %22%22%22Print names of objects in a given assembly and all its child assemblies.%22%22%22%0A%0A    # Print names of objects inside this assembly.%0A    for obj in ass.objects():%0A        print(obj.get_name())%0A%0A    # Recurse into child assemblies.%0A    child_assemblies = ass.assemblies()%0A    for sub_ass_key in child_assemblies:%0A        list_objects_in_assembly(child_assemblies%5Bsub_ass_key%5D)%0A

Add basicenumerator appleseed.studio Python plugin sample