[Bf-extensions-cvs] [6d92e9d] master: Reader modifications

Oscurart noreply at git.blender.org
Thu Oct 15 20:53:42 CEST 2015


Commit: 6d92e9d9e774280a4463ad0a0628120706206bbc
Author: Oscurart
Date:   Thu Oct 15 15:53:32 2015 -0300
Branches: master
https://developer.blender.org/rBAC6d92e9d9e774280a4463ad0a0628120706206bbc

Reader modifications

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

M	oscurart_mesh_cache_tools.py

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

diff --git a/oscurart_mesh_cache_tools.py b/oscurart_mesh_cache_tools.py
index 5523011..6c9c0b1 100644
--- a/oscurart_mesh_cache_tools.py
+++ b/oscurart_mesh_cache_tools.py
@@ -81,13 +81,15 @@ def CargaAutoLoadPC(dummy):
     for gr in bpy.context.scene.pc_auto_load_proxy:
         if gr.use_auto_load:
             for ob in bpy.data.groups[gr.name].objects:
-                MOD = ob.modifiers.new("TempPC","MESH_CACHE")
-                MOD.filepath = "%s%s%s.pc2" % (bpy.context.scene.pc_pc2_folder, os.sep, ob.name)
-                MOD.cache_format = "PC2"
-                MOD.forward_axis = "POS_Y"
-                MOD.up_axis = "POS_Z"
-                MOD.flip_axis = set(())
-                MOD.frame_start = bpy.context.scene.pc_pc2_start                
+                for MOD in ob.modifiers:
+                    if MOD.type == "MESH_CACHE":                    
+                        #MOD = ob.modifiers.new("TempPC","MESH_CACHE")
+                        MOD.filepath = "%s%s%s.pc2" % (bpy.context.scene.pc_pc2_folder, os.sep, ob.name)
+                        MOD.cache_format = "PC2"
+                        MOD.forward_axis = "POS_Y"
+                        MOD.up_axis = "POS_Z"
+                        MOD.flip_axis = set(())
+                        MOD.frame_start = bpy.context.scene.pc_pc2_start                
                     
 bpy.app.handlers.load_post.append(CargaAutoLoadPC)



More information about the Bf-extensions-cvs mailing list