[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [54626] trunk/blender/release/scripts/ startup/bl_ui: Fix [#34300] Slider for list of particle systems ( keyed particles) is not doing anything.

Bastien Montagne montagne29 at wanadoo.fr
Mon Feb 18 14:30:41 CET 2013


Revision: 54626
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=54626
Author:   mont29
Date:     2013-02-18 13:30:40 +0000 (Mon, 18 Feb 2013)
Log Message:
-----------
Fix [#34300] Slider for list of particle systems (keyed particles) is not doing anything. Navigating a list of more than 5 elements requires keyboard.

Systematically adding some custom id to template_list using default UI_UL_list class, this one is commoly used more than once in an area, yielding collision issues if they do not have a custom id...

Modified Paths:
--------------
    trunk/blender/release/scripts/startup/bl_ui/properties_data_armature.py
    trunk/blender/release/scripts/startup/bl_ui/properties_particle.py
    trunk/blender/release/scripts/startup/bl_ui/properties_physics_common.py
    trunk/blender/release/scripts/startup/bl_ui/properties_scene.py
    trunk/blender/release/scripts/startup/bl_ui/space_clip.py
    trunk/blender/release/scripts/startup/bl_ui/space_view3d_toolbar.py

Modified: trunk/blender/release/scripts/startup/bl_ui/properties_data_armature.py
===================================================================
--- trunk/blender/release/scripts/startup/bl_ui/properties_data_armature.py	2013-02-18 12:00:17 UTC (rev 54625)
+++ trunk/blender/release/scripts/startup/bl_ui/properties_data_armature.py	2013-02-18 13:30:40 UTC (rev 54626)
@@ -184,7 +184,8 @@
         if poselib:
             # list of poses in pose library
             row = layout.row()
-            row.template_list("UI_UL_list", "", poselib, "pose_markers", poselib.pose_markers, "active_index", rows=5)
+            row.template_list("UI_UL_list", "pose_markers", poselib, "pose_markers",
+                              poselib.pose_markers, "active_index", rows=5)
 
             # column of operators for active pose
             # - goes beside list

Modified: trunk/blender/release/scripts/startup/bl_ui/properties_particle.py
===================================================================
--- trunk/blender/release/scripts/startup/bl_ui/properties_particle.py	2013-02-18 12:00:17 UTC (rev 54625)
+++ trunk/blender/release/scripts/startup/bl_ui/properties_particle.py	2013-02-18 13:30:40 UTC (rev 54626)
@@ -97,7 +97,8 @@
         if ob:
             row = layout.row()
 
-            row.template_list("UI_UL_list", "", ob, "particle_systems", ob.particle_systems, "active_index", rows=2)
+            row.template_list("UI_UL_list", "particle_systems", ob, "particle_systems",
+                              ob.particle_systems, "active_index", rows=2)
 
             col = row.column(align=True)
             col.operator("object.particle_system_add", icon='ZOOMIN', text="")
@@ -637,7 +638,7 @@
                 layout.label(text="Fluid interaction:")
 
             row = layout.row()
-            row.template_list("UI_UL_list", "", psys, "targets", psys, "active_particle_target_index")
+            row.template_list("UI_UL_list", "particle_targets", psys, "targets", psys, "active_particle_target_index")
 
             col = row.column()
             sub = col.row()
@@ -703,7 +704,8 @@
 
         # Currently boids can only use the first state so these are commented out for now.
         #row = layout.row()
-        #row.template_list("UI_UL_list", "", boids, "states", boids, "active_boid_state_index", compact="True")
+        #row.template_list("UI_UL_list", "particle_boids", boids, "states",
+        #                  boids, "active_boid_state_index", compact="True")
         #col = row.row()
         #sub = col.row(align=True)
         #sub.operator("boid.state_add", icon='ZOOMIN', text="")
@@ -724,7 +726,7 @@
             row.label(text="")
 
         row = layout.row()
-        row.template_list("UI_UL_list", "", state, "rules", state, "active_boid_rule_index")
+        row.template_list("UI_UL_list", "particle_boids_rules", state, "rules", state, "active_boid_rule_index")
 
         col = row.column()
         sub = col.row()
@@ -887,7 +889,8 @@
 
             if part.use_group_count and not part.use_whole_group:
                 row = layout.row()
-                row.template_list("UI_UL_list", "", part, "dupli_weights", part, "active_dupliweight_index")
+                row.template_list("UI_UL_list", "particle_dupli_weights", part, "dupli_weights",
+                                  part, "active_dupliweight_index")
 
                 col = row.column()
                 sub = col.row()

Modified: trunk/blender/release/scripts/startup/bl_ui/properties_physics_common.py
===================================================================
--- trunk/blender/release/scripts/startup/bl_ui/properties_physics_common.py	2013-02-18 12:00:17 UTC (rev 54625)
+++ trunk/blender/release/scripts/startup/bl_ui/properties_physics_common.py	2013-02-18 13:30:40 UTC (rev 54626)
@@ -108,7 +108,8 @@
 
     if not cachetype == 'RIGID_BODY':
         row = layout.row()
-        row.template_list("UI_UL_list", "", cache, "point_caches", cache.point_caches, "active_index", rows=2)
+        row.template_list("UI_UL_list", "point_caches", cache, "point_caches",
+                          cache.point_caches, "active_index", rows=2)
         col = row.column(align=True)
         col.operator("ptcache.add", icon='ZOOMIN', text="")
         col.operator("ptcache.remove", icon='ZOOMOUT', text="")

Modified: trunk/blender/release/scripts/startup/bl_ui/properties_scene.py
===================================================================
--- trunk/blender/release/scripts/startup/bl_ui/properties_scene.py	2013-02-18 12:00:17 UTC (rev 54625)
+++ trunk/blender/release/scripts/startup/bl_ui/properties_scene.py	2013-02-18 13:30:40 UTC (rev 54626)
@@ -94,7 +94,7 @@
         row = layout.row()
 
         col = row.column()
-        col.template_list("UI_UL_list", "", scene, "keying_sets", scene.keying_sets, "active_index", rows=2)
+        col.template_list("UI_UL_list", "keying_sets", scene, "keying_sets", scene.keying_sets, "active_index", rows=2)
 
         col = row.column(align=True)
         col.operator("anim.keying_set_add", icon='ZOOMIN', text="")

Modified: trunk/blender/release/scripts/startup/bl_ui/space_clip.py
===================================================================
--- trunk/blender/release/scripts/startup/bl_ui/space_clip.py	2013-02-18 12:00:17 UTC (rev 54625)
+++ trunk/blender/release/scripts/startup/bl_ui/space_clip.py	2013-02-18 13:30:40 UTC (rev 54626)
@@ -746,7 +746,7 @@
         layout.active = stab.use_2d_stabilization
 
         row = layout.row()
-        row.template_list("UI_UL_list", "", stab, "tracks",
+        row.template_list("UI_UL_list", "stabilization_tracks", stab, "tracks",
                           stab, "active_track_index", rows=3)
 
         sub = row.column(align=True)

Modified: trunk/blender/release/scripts/startup/bl_ui/space_view3d_toolbar.py
===================================================================
--- trunk/blender/release/scripts/startup/bl_ui/space_view3d_toolbar.py	2013-02-18 12:00:17 UTC (rev 54625)
+++ trunk/blender/release/scripts/startup/bl_ui/space_view3d_toolbar.py	2013-02-18 13:30:40 UTC (rev 54626)
@@ -1222,7 +1222,7 @@
         if pe.type == 'PARTICLES':
             if ob.particle_systems:
                 if len(ob.particle_systems) > 1:
-                    layout.template_list("UI_UL_list", "", ob, "particle_systems",
+                    layout.template_list("UI_UL_list", "particle_systems", ob, "particle_systems",
                                          ob.particle_systems, "active_index", rows=2, maxrows=3)
 
                 ptcache = ob.particle_systems.active.point_cache
@@ -1232,8 +1232,8 @@
                     ptcache = md.point_cache
 
         if ptcache and len(ptcache.point_caches) > 1:
-            layout.template_list("UI_UL_list", "", ptcache, "point_caches", ptcache.point_caches, "active_index",
-                                 rows=2, maxrows=3)
+            layout.template_list("UI_UL_list", "particles_point_caches", ptcache, "point_caches",
+                                 ptcache.point_caches, "active_index", rows=2, maxrows=3)
 
         if not pe.is_editable:
             layout.label(text="Point cache must be baked")




More information about the Bf-blender-cvs mailing list