[Bf-extensions-cvs] [06a3217] master: Amaranth 0.8.4: - Cycles Sampling, display sampling values for each renderlayers as well. - Rename Missing Node Groups to Node Links, because it can now look for empty node images or images that doesnt exist as well. - Scene Debug: Empty Material Slots, print a list of all the objects that have a empty material slots (common when linked materials got lost) - List Missing Images now show a path if linked from a .blend, clicking on the path will open a new blender instance with that file (same for dupligroups path)

Pablo Vazquez noreply at git.blender.org
Sat Mar 15 23:45:22 CET 2014


Commit: 06a32170e18093f858eaa0e03cf851b632b5d6b0
Author: Pablo Vazquez
Date:   Sat Mar 15 19:38:47 2014 -0300
https://developer.blender.org/rBAC06a32170e18093f858eaa0e03cf851b632b5d6b0

Amaranth 0.8.4:
- Cycles Sampling, display sampling values for each renderlayers as well.
- Rename Missing Node Groups to Node Links, because it can now look
  for empty node images or images that doesnt exist as well.
- Scene Debug: Empty Material Slots, print a list of all the objects
  that have a empty material slots (common when linked materials got lost)
- List Missing Images now show a path if linked from a .blend, clicking
  on the path will open a new blender instance with that file (same for
  dupligroups path)

Full changelog at: http://pablovazquez.org/amaranth

===================================================================

M	scene_amaranth_toolset.py

===================================================================

diff --git a/scene_amaranth_toolset.py b/scene_amaranth_toolset.py
index 6e7a679..6c34a54 100755
--- a/scene_amaranth_toolset.py
+++ b/scene_amaranth_toolset.py
@@ -19,7 +19,7 @@
 bl_info = {
     "name": "Amaranth Toolset",
     "author": "Pablo Vazquez, Bassam Kurdali, Sergey Sharybin",
-    "version": (0, 8, 2),
+    "version": (0, 8, 4),
     "blender": (2, 70),
     "location": "Everywhere!",
     "description": "A collection of tools and settings to improve productivity",
@@ -1009,7 +1009,7 @@ class MESH_OT_make_symmetric(Operator):
         return {'FINISHED'}
 # // FEATURE: Mesh Symmetry Tools by Sergey Sharybin
 
-# FEATURE: Cycles Render Samples per Scene
+# FEATURE: Cycles Render Sampling Extra
 def render_cycles_scene_samples(self, context):
 
     layout = self.layout
@@ -1018,46 +1018,54 @@ def render_cycles_scene_samples(self, context):
     scene = context.scene
     cscene = scene.cycles
 
+    col = layout.column(align=True)
+
+    if len(scene.render.layers) == 1 and \
+        scene.render.layers[0].samples == 0:
+        pass
+    else:
+        col.separator()
+        col.label(text="Samples Per RenderLayer:")
+
+        for rl in scene.render.layers:
+            row = col.row(align=True)
+            row.label(rl.name)
+            row.prop(rl, "samples", text="%s" %
+                "Samples" if rl.samples > 0 else "Samples [Auto]")
+
     if (len(bpy.data.scenes) > 1):
-        layout.separator()
+        col.separator()
 
-        layout.label(text="Samples Per Scene:")
+        col.label(text="Samples Per Scene:")
+        row = col.row(align=True)
 
         if cscene.progressive == 'PATH':
             for s in bpy.data.scenes:
                 if s != scene:
+                    row = col.row(align=True)
                     if s.render.engine == 'CYCLES':
                         cscene = s.cycles
-        
-                        split = layout.split()
-                        col = split.column()
-                        sub = col.column(align=True)
-        
-                        sub.label(text="%s" % s.name)
-        
-                        col = split.column()
-                        sub = col.column(align=True)
-                        sub.prop(cscene, "samples", text="Samples")
+
+                        row.label(s.name)
+                        row.prop(cscene, "samples")
                     else:
-                        layout.label(text="Scene: '%s' is not using Cycles" % s.name)
+                        row.label(text="Scene: '%s' is not using Cycles" % s.name)
         else:
             for s in bpy.data.scenes:
                 if s != scene:
+                    row = col.row(align=True)
                     if s.render.engine == 'CYCLES':
                         cscene = s.cycles
-        
-                        split = layout.split()
-                        col = split.column()
-                        sub = col.column(align=True)
-        
-                        sub.label(text="%s" % s.name)
-        
-                        col = split.column()
-                        sub = col.column(align=True)
-                        sub.prop(cscene, "aa_samples", text="AA Samples")
+
+                        row.label(s.name)
+                        row.prop(cscene, "aa_samples",
+                            text="AA Samples")
                     else:
-                        layout.label(text="Scene: '%s' is not using Cycles" % s.name)
-# // FEATURE: Cycles Render Samples per Scene
+                        row.label(text="Scene: '%s' is not using Cycles" % s.name)
+
+# // FEATURE: Dupli  Group Path
+
+# // FEATURE: Cycles Render Sampling Extra
 
 # FEATURE: Motion Paths Extras
 class POSE_OT_paths_clear_all(Operator):
@@ -1195,7 +1203,6 @@ class SCENE_OT_cycles_shader_list_nodes(Operator):
     """List Cycles materials containing a specific shader"""
     bl_idname = "scene.cycles_list_nodes"
     bl_label = "List Materials"
-    count_ma = 0
     materials = []
 
     @classmethod
@@ -1205,10 +1212,7 @@ class SCENE_OT_cycles_shader_list_nodes(Operator):
     def execute(self, context):
         node_type = context.scene.amaranth_cycles_node_types
         roughness = False
-
-        # Reset the list and counter
         self.__class__.materials = []
-        self.__class__.count_ma = 0
 
         print("\n=== Cycles Shader Type: %s === \n" % node_type)
 
@@ -1229,8 +1233,7 @@ class SCENE_OT_cycles_shader_list_nodes(Operator):
                                       'not connected',
                                       '\n')
 
-                            self.__class__.materials = list(set(self.__class__.materials))
-                            self.__class__.count_ma += 1
+                            self.__class__.materials = sorted(list(set(self.__class__.materials)))
 
                             if ma.name not in self.__class__.materials:
                                 self.__class__.materials.append('%s%s [%s] %s%s' % (
@@ -1239,23 +1242,22 @@ class SCENE_OT_cycles_shader_list_nodes(Operator):
                                     '[F]' if ma.use_fake_user else '',
                                     ' - [%s]' % roughness if roughness else ''))
 
-        if self.__class__.count_ma == 0:
+        if len(self.__class__.materials) == 0:
             self.report({"INFO"}, "No materials with nodes type %s found" % node_type)
-
         else:
-            print("* A total of %s %s using %s was found \n" % (
-                    self.__class__.count_ma,
-                    "material" if self.__class__.count_ma == 1 else "materials",
+            print("* A total of %d %s using %s were found \n" % (
+                    len(self.__class__.materials),
+                    "material" if len(self.__class__.materials) == 1 else "materials",
                     node_type))
 
             count = 0
 
             for mat in self.__class__.materials:
-                print('%02d. %s' % (count + 1, self.__class__.materials[count]))
+                print('%02d. %s' % (count+1, self.__class__.materials[count]))
                 count += 1
             print("\n")
 
-        self.__class__.materials = list(set(self.__class__.materials))
+        self.__class__.materials = sorted(list(set(self.__class__.materials)))
 
         return {'FINISHED'}
 
@@ -1266,7 +1268,6 @@ class SCENE_OT_cycles_shader_list_nodes_clear(Operator):
     
     def execute(self, context):
         SCENE_OT_cycles_shader_list_nodes.materials[:] = []
-        SCENE_OT_cycles_shader_list_nodes.count_ma = 0
         print("* Cleared Cycles Materials List")
         return {'FINISHED'}
 
@@ -1286,56 +1287,183 @@ class SCENE_OT_amaranth_debug_lamp_select(Operator):
 
         return{'FINISHED'}
 
-class SCENE_OT_list_missing_node_tree(Operator):
-    '''Print a list of missing (link lost) node groups'''
-    bl_idname = "scene.list_missing_node_tree"
-    bl_label = "List Missing Node Groups"
+class SCENE_OT_list_missing_node_links(Operator):
+    '''Print a list of missing node links'''
+    bl_idname = "scene.list_missing_node_links"
+    bl_label = "List Missing Node Links"
 
-    count = 0
+    count_groups = 0
+    count_images = 0
 
     def execute(self, context):
-        missing = []
+        missing_groups = []
+        missing_images = []
         libraries = []
-        self.__class__.count = 0
+        self.__class__.count_groups = 0
+        self.__class__.count_images = 0
 
-        print("\n* Missing Node Groups\n")
         for ma in bpy.data.materials:
             if ma.node_tree:
                 for no in ma.node_tree.nodes:
                     if no.type == 'GROUP':
                         if not no.node_tree:
-                            self.__class__.count += 1
+                            self.__class__.count_groups += 1
+
+                            users_ngroup = []
 
-                            missing.append("%02d. %s%s%s [%s]%s" % (
-                                self.__class__.count,
+                            for ob in bpy.data.objects:
+                                if ob.material_slots and ma.name in ob.material_slots:
+                                    users_ngroup.append("%s%s%s" % (
+                                        "[L] " if ob.library else "",
+                                        "[F] " if ob.use_fake_user else "",
+                                        ob.name))
+
+                            missing_groups.append("NG: %s%s%s [%s]%s%s\n" % (
                                 "[L] " if ma.library else "",
                                 "[F] " if ma.use_fake_user else "",
                                 ma.name, ma.users,
-                                "\n    %s" % 
-                                ma.library.filepath if ma.library else ""))
+                                "\nLI: %s" % 
+                                ma.library.filepath if ma.library else "",
+                                "\nOB: %s" % ',  '.join(users_ngroup) if users_ngroup else ""))
 
                             if ma.library:
                                 libraries.append(ma.library.filepath)
+                    if no.type == 'TEX_IMAGE':
+                        if no.image:
+                            import os.path
+                            image_path_exists = os.path.exists(
+                                                    bpy.path.abspath(
+                                                        no.image.filepath, library=no.image.library))
+
+                        if not no.image or not image_path_exists:
+                            self.__class__.count_images += 1
+
+                            users_images = []
+
+                            for ob in bpy.data.objects:
+                                if ob.material_slots and ma.name in ob.material_slots:
+                                    users_images.append("%s%s%s" % (
+                                        "[L] " if ob.library else "",
+                                        "[F] " if ob.use_fake_user else "",
+                                        ob.name))
+
+                            missing_images.append("MA: %s%s%s [%s]%s%s%s%s\n" % (
+                                "[L] " if ma.libr

@@ Diff output truncated at 10240 characters. @@



More information about the Bf-extensions-cvs mailing list