[Bf-extensions-cvs] [c63ada6] master: Improve for Sync Missing Groups. Now can filter only the linked groups

Eugenio Pignataro noreply at git.blender.org
Tue Oct 6 03:32:25 CEST 2015


Commit: c63ada6ae2569864be891ff308cda6b39d8368f1
Author: Eugenio Pignataro
Date:   Mon Oct 5 22:32:17 2015 -0300
Branches: master
https://developer.blender.org/rBACc63ada6ae2569864be891ff308cda6b39d8368f1

Improve for Sync Missing Groups. Now can filter only the linked groups

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

M	oscurart_tools/oscurart_files.py

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

diff --git a/oscurart_tools/oscurart_files.py b/oscurart_tools/oscurart_files.py
index 4ec97f4..319a7b9 100644
--- a/oscurart_tools/oscurart_files.py
+++ b/oscurart_tools/oscurart_files.py
@@ -66,7 +66,8 @@ class reFreshMissingGroups(bpy.types.Operator):
     bl_label = "Sync Missing Groups"
     bl_options = {"REGISTER", "UNDO"}
     def execute(self, context):
-        for lib in bpy.data.libraries:
-            with bpy.data.libraries.load(lib.filepath, link=True) as (linked,local):
-                local.groups = linked.groups    
+        for group in bpy.data.groups:
+            if group.library != None:
+                with bpy.data.libraries.load(group.library.filepath, link=True) as (linked,local):
+                    local.groups = linked.groups    
         return {'FINISHED'}        
\ No newline at end of file



More information about the Bf-extensions-cvs mailing list