@@ -23,23 +23,25 @@ def filter_items(self, context, data, property):
23
23
def draw_item (self , context , layout , data , item , icon , active_data , active_propname ):
24
24
if item :
25
25
layout .prop (item , "name" , text = 'Name ' , emboss = False )
26
+ if item in bpy .context .selected_objects :
27
+ layout .label (text = "selected" )
26
28
else :
27
29
# actually, I guess this line of code won't be executed?
28
30
layout .label (text = "" , translate = False , icon_value = icon )
29
31
30
32
31
-
32
33
class SIMLOADER_UL_Att_List (bpy .types .UIList ):
33
34
'''
34
35
This controls the list of attributes available for this sequence
35
36
'''
37
+
36
38
def draw_item (self , context , layout , data , item , icon , active_data , active_propname ):
37
39
if item :
38
40
layout .enabled = False
39
41
layout .prop (item , "name" , text = 'Name ' , emboss = False )
40
42
obj = bpy .data .objects [context .scene .SIMLOADER .selected_obj_num ]
41
43
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 :
43
45
layout .label (text = "using as split norm" )
44
46
45
47
else :
@@ -63,6 +65,8 @@ def draw(self, context):
63
65
sim_loader = context .scene .SIMLOADER
64
66
row = layout .row ()
65
67
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" )
66
70
layout .operator ("sequence.edit" )
67
71
68
72
@@ -81,7 +85,7 @@ class SIMLOADER_Settings(bpy.types.Panel):
81
85
def draw (self , context ):
82
86
layout = self .layout
83
87
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 ):
85
89
return
86
90
obj = bpy .data .objects [sim_loader .selected_obj_num ]
87
91
if not obj .SIMLOADER .init :
@@ -104,7 +108,6 @@ def draw(self, context):
104
108
col2 .operator ('SIMLOADER.resetmesh' , text = "Mesh" )
105
109
col3 .operator ('SIMLOADER.resetins' , text = "Instances" )
106
110
107
-
108
111
# path settings
109
112
layout .label (text = "Path Information" )
110
113
box = layout .box ()
@@ -119,15 +122,14 @@ def draw(self, context):
119
122
col2 .prop (obj .SIMLOADER , 'use_relative' , text = "" )
120
123
col1 .label (text = 'Pattern' )
121
124
col2 .prop (obj .SIMLOADER , 'pattern' , text = "" )
122
-
123
125
124
126
# attributes settings
125
127
layout .label (text = "Attributes Settings" )
126
128
box = layout .box ()
127
129
row = box .row ()
128
130
row .template_list ("SIMLOADER_UL_Att_List" , "" , obj .data , "attributes" , sim_loader , "selected_attribute_num" , rows = 2 )
129
131
box .operator ("SIMLOADER.setsplitnorm" )
130
- box .operator ("SIMLOADER.removesplitnorm" ,text = "remove split norm" )
132
+ box .operator ("SIMLOADER.removesplitnorm" , text = "remove split norm" )
131
133
132
134
# advance settings
133
135
layout .label (text = "Advance Settings" )
0 commit comments