@@ -23,23 +23,25 @@ def filter_items(self, context, data, property):
2323 def draw_item (self , context , layout , data , item , icon , active_data , active_propname ):
2424 if item :
2525 layout .prop (item , "name" , text = 'Name ' , emboss = False )
26+ if item in bpy .context .selected_objects :
27+ layout .label (text = "selected" )
2628 else :
2729 # actually, I guess this line of code won't be executed?
2830 layout .label (text = "" , translate = False , icon_value = icon )
2931
3032
31-
3233class SIMLOADER_UL_Att_List (bpy .types .UIList ):
3334 '''
3435 This controls the list of attributes available for this sequence
3536 '''
37+
3638 def draw_item (self , context , layout , data , item , icon , active_data , active_propname ):
3739 if item :
3840 layout .enabled = False
3941 layout .prop (item , "name" , text = 'Name ' , emboss = False )
4042 obj = bpy .data .objects [context .scene .SIMLOADER .selected_obj_num ]
4143 mesh = obj .data
42- if mesh .SIMLOADER .split_norm_att_name and mesh .SIMLOADER .split_norm_att_name == item .name :
44+ if mesh .SIMLOADER .split_norm_att_name and mesh .SIMLOADER .split_norm_att_name == item .name :
4345 layout .label (text = "using as split norm" )
4446
4547 else :
@@ -63,6 +65,8 @@ def draw(self, context):
6365 sim_loader = context .scene .SIMLOADER
6466 row = layout .row ()
6567 row .template_list ("SIMLOADER_UL_Obj_List" , "" , bpy .data , "objects" , sim_loader , "selected_obj_num" , rows = 2 )
68+ layout .operator ("simloader.enableselected" )
69+ layout .operator ("simloader.disableselected" )
6670 layout .operator ("sequence.edit" )
6771
6872
@@ -81,7 +85,7 @@ class SIMLOADER_Settings(bpy.types.Panel):
8185 def draw (self , context ):
8286 layout = self .layout
8387 sim_loader = context .scene .SIMLOADER
84- if sim_loader .selected_obj_num >= len (bpy .data .objects ):
88+ if sim_loader .selected_obj_num >= len (bpy .data .objects ):
8589 return
8690 obj = bpy .data .objects [sim_loader .selected_obj_num ]
8791 if not obj .SIMLOADER .init :
@@ -104,7 +108,6 @@ def draw(self, context):
104108 col2 .operator ('SIMLOADER.resetmesh' , text = "Mesh" )
105109 col3 .operator ('SIMLOADER.resetins' , text = "Instances" )
106110
107-
108111 # path settings
109112 layout .label (text = "Path Information" )
110113 box = layout .box ()
@@ -119,15 +122,14 @@ def draw(self, context):
119122 col2 .prop (obj .SIMLOADER , 'use_relative' , text = "" )
120123 col1 .label (text = 'Pattern' )
121124 col2 .prop (obj .SIMLOADER , 'pattern' , text = "" )
122-
123125
124126 # attributes settings
125127 layout .label (text = "Attributes Settings" )
126128 box = layout .box ()
127129 row = box .row ()
128130 row .template_list ("SIMLOADER_UL_Att_List" , "" , obj .data , "attributes" , sim_loader , "selected_attribute_num" , rows = 2 )
129131 box .operator ("SIMLOADER.setsplitnorm" )
130- box .operator ("SIMLOADER.removesplitnorm" ,text = "remove split norm" )
132+ box .operator ("SIMLOADER.removesplitnorm" , text = "remove split norm" )
131133
132134 # advance settings
133135 layout .label (text = "Advance Settings" )
0 commit comments