-
Notifications
You must be signed in to change notification settings - Fork 71
/
wazou_fast_skin
625 lines (482 loc) · 22.7 KB
/
wazou_fast_skin
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
# ##### BEGIN GPL LICENSE BLOCK #####
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ##### END GPL LICENSE BLOCK #####
bl_info = {
"name": "Fast Skin",
"author": "Cédric Lepiller",
"version": (0, 0, 2),
"blender": (2, 74, 0),
"description": "Create a fast Skin model",
"category": "3D View",}
import bpy
import bmesh
from bpy.types import Menu
from bpy.props import IntProperty, FloatProperty, BoolProperty
bpy.types.Scene.Skin_Mirror = bpy.props.BoolProperty(default=True)
bpy.types.Scene.Skin_Skin = bpy.props.BoolProperty(default=False)
bpy.types.Scene.Skin_Subdivs = bpy.props.BoolProperty(default=True)
bpy.types.Scene.Skin_Shading = bpy.props.BoolProperty(default=True)
########################
# Properties #
########################
def update_panel(self, context):
try:
bpy.utils.unregister_class(Fast_Skin)
except:
pass
Fast_Skin.bl_category = context.user_preferences.addons[__name__].preferences.category
bpy.utils.register_class(Fast_Skin)
class Wazou_fast_skin(bpy.types.AddonPreferences):
"""Creates mesh with skin Modifier in One clic"""
bl_idname = __name__
bpy.types.Scene.Enable_Tab_FK_01 = bpy.props.BoolProperty(default=False)
category = bpy.props.StringProperty(
name="Category",
description="Choose a name for the category of the panel",
default="Fast Skin",
update=update_panel,
)
def draw(self, context):
layout = self.layout
layout.prop(self, "category")
layout.prop(context.scene, "Enable_Tab_FK_01", text="URL's", icon="URL")
if context.scene.Enable_Tab_FK_01:
row = layout.row()
row.operator("wm.url_open", text="Pitiwazou.com").url = "http://www.pitiwazou.com/"
row.operator("wm.url_open", text="Wazou's Ghitub").url = "https://github.com/pitiwazou/Scripts-Blender"
row.operator("wm.url_open", text="BlenderLounge Forum ").url = "http://blenderlounge.fr/forum/"
#######################
# Classes #
#######################
#Align to X
class Create_Skin(bpy.types.Operator):
bl_idname = "object.createskin"
bl_label = "Create Skin"
bl_options = {'REGISTER', 'UNDO'}
def execute(self, context):
#Creata plane and enter in edit mode
bpy.ops.mesh.primitive_cube_add(radius=1, view_align=False, enter_editmode=True, location=(0, 0, 0), layers=(True, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False))
#Align to X
bpy.ops.object.align2x()
#remove doubles
bpy.ops.mesh.remove_doubles()
#Go in Object mode
bpy.ops.object.editmode_toggle()
#Add Mirror
bpy.ops.object.modifier_add(type='MIRROR')
#Cage On/Off
bpy.ops.object.mirrorcageonoff()
#Add Skin modifier
bpy.ops.object.modifier_add(type='SKIN')
#Smooth Shading
bpy.context.object.modifiers["Skin"].use_smooth_shade = True
#Clippin Mirror
bpy.context.object.modifiers["Mirror"].use_clip = True
# Add Subdiv
bpy.ops.object.modifier_add(type='SUBSURF')
#Subdiv Ite 3
bpy.context.object.modifiers["Subsurf"].levels = 3
#Enter in edit mode
bpy.ops.object.editmode_toggle()
for area in bpy.context.screen.areas:
if area.type == 'VIEW_3D':
area.spaces.active.use_occlude_geometry ^= True
break # stop after the first 3D View
return {'FINISHED'}
#Align to X
class AlignToX(bpy.types.Operator):
bl_idname = "object.align2x"
bl_label = "Align To X"
bl_options = {'REGISTER', 'UNDO'}
def execute(self, context):
bpy.ops.object.mode_set(mode = 'OBJECT')
bpy.ops.object.transform_apply(location=True, rotation=True, scale=True)
for vert in bpy.context.object.data.vertices:
if vert.select:
vert.co[0] = 0
vert.co[1] = 0
bpy.ops.object.editmode_toggle()
return {'FINISHED'}
#Add Mirror Object
class AddMirrorObject(bpy.types.Operator):
bl_idname = "add.mirrorobject"
bl_label = "Add Mirror Object"
bl_options = {'REGISTER', 'UNDO'}
def execute(self, context):
if bpy.context.object.mode == "OBJECT":
bpy.ops.object.modifier_add(type='MIRROR')
bpy.context.object.modifiers["Mirror"].use_clip = True
bpy.context.object.modifiers["Mirror"].show_on_cage = True
elif bpy.context.object.mode == "EDIT":
bpy.ops.object.modifier_add(type='MIRROR')
bpy.context.object.modifiers["Mirror"].use_clip = True
bpy.context.object.modifiers["Mirror"].show_on_cage = True
bpy.context.object.modifiers["Mirror"].show_in_editmode = True
return {'FINISHED'}
#Apply Mirror
class ApplyMirror(bpy.types.Operator):
bl_idname = "apply.mirror"
bl_label = "Apply Mirror"
bl_options = {'REGISTER', 'UNDO'}
def execute(self, context):
if bpy.context.object.mode == "OBJECT":
bpy.ops.object.modifier_apply(apply_as='DATA', modifier="Mirror")
elif bpy.context.object.mode == "EDIT":
bpy.ops.object.mode_set(mode = 'OBJECT')
bpy.ops.object.modifier_apply(apply_as='DATA', modifier="Mirror")
bpy.ops.object.mode_set(mode = 'EDIT')
return {'FINISHED'}
#Subsurf 2
class SubSurf2(bpy.types.Operator):
bl_idname = "object.subsurf2"
bl_label = "SubSurf 2"
bl_options = {'REGISTER', 'UNDO'}
def execute(self, context):
if bpy.context.object.mode == "OBJECT":
bpy.ops.object.subdivision_set(level=2)
bpy.context.object.modifiers["Subsurf"].show_only_control_edges = True
if bpy.context.object.mode == "EDIT":
bpy.ops.object.subdivision_set(level=2)
bpy.context.object.modifiers["Subsurf"].show_on_cage = True
bpy.context.object.modifiers["Subsurf"].show_only_control_edges = True
bpy.ops.object.mode_set(mode = 'EDIT')
return {'FINISHED'}
#Remove Subsurf
class RemoveSubSurf2(bpy.types.Operator):
bl_idname = "object.removesubsurf2"
bl_label = "Remove SubSurf"
bl_options = {'REGISTER', 'UNDO'}
def execute(self, context):
if bpy.context.object.mode == "OBJECT":
bpy.ops.object.modifier_remove(modifier="Subsurf")
if bpy.context.object.mode == "EDIT":
bpy.ops.object.mode_set(mode = 'OBJECT')
bpy.ops.object.modifier_remove(modifier="Subsurf")
bpy.ops.object.mode_set(mode = 'EDIT')
return {'FINISHED'}
#Apply Subsurf
class ApplySubSurf(bpy.types.Operator):
bl_idname = "object.applysubsurf"
bl_label = "Apply subsurf"
bl_options = {'REGISTER', 'UNDO'}
def execute(self, context):
if bpy.context.object.mode == "OBJECT":
bpy.ops.object.modifier_apply(apply_as='DATA', modifier="Subsurf")
if bpy.context.object.mode == "EDIT":
bpy.ops.object.mode_set(mode = 'OBJECT')
bpy.ops.object.modifier_apply(apply_as='DATA', modifier="Subsurf")
bpy.ops.object.mode_set(mode = 'EDIT')
return {'FINISHED'}
#Sursurf On/Off
class SursurfOnOff(bpy.types.Operator):
bl_idname = "object.subsurfonoff"
bl_label = "Sursurf On/Off"
bl_options = {'REGISTER', 'UNDO'}
def execute(self, context):
layout = self.layout
bpy.context.object.modifiers["Subsurf"].show_viewport = not bpy.context.object.modifiers["Subsurf"].show_viewport
return {'FINISHED'}
#Sursurf Edit On/Off
class SursurfEditOnOff(bpy.types.Operator):
bl_idname = "object.subsurfeditonoff"
bl_label = "Sursurf Edit On/Off"
bl_options = {'REGISTER', 'UNDO'}
def execute(self, context):
layout = self.layout
bpy.context.object.modifiers["Subsurf"].show_in_editmode = not bpy.context.object.modifiers["Subsurf"].show_in_editmode
return {'FINISHED'}
#Sursurf Cage On/Off
class SursurfCageOnOff(bpy.types.Operator):
bl_idname = "object.subsurfcageonoff"
bl_label = "Sursurf Cage On/Off"
bl_options = {'REGISTER', 'UNDO'}
def execute(self, context):
layout = self.layout
bpy.context.object.modifiers["Subsurf"].show_on_cage = not bpy.context.object.modifiers["Subsurf"].show_on_cage
return {'FINISHED'}
#Sursurf Optimal Display
class SursurfOptimalDisplay(bpy.types.Operator):
bl_idname = "object.subsurfoptimaldisplay"
bl_label = "Sursurf Optimal Display"
bl_options = {'REGISTER', 'UNDO'}
def execute(self, context):
layout = self.layout
bpy.context.object.modifiers["Subsurf"].show_only_control_edges = not bpy.context.object.modifiers["Subsurf"].show_only_control_edges
return {'FINISHED'}
#######Mirror###########
#Mirror On/Off
class MirrorOnOff(bpy.types.Operator):
bl_idname = "object.mirroronoff"
bl_label = "Mirror On/Off"
bl_options = {'REGISTER', 'UNDO'}
def execute(self, context):
layout = self.layout
bpy.context.object.modifiers["Mirror"].show_viewport = not bpy.context.object.modifiers["Mirror"].show_viewport
return {'FINISHED'}
#Mirror Cage On/Off
class MirrorCageOnOff(bpy.types.Operator):
bl_idname = "object.mirrorcageonoff"
bl_label = "Mirror Cage On/Off"
bl_options = {'REGISTER', 'UNDO'}
def execute(self, context):
layout = self.layout
bpy.context.object.modifiers["Mirror"].show_on_cage = not bpy.context.object.modifiers["Mirror"].show_on_cage
return {'FINISHED'}
#Mirror Clipping
class MirrorClipping(bpy.types.Operator):
bl_idname = "object.mirrorclipping"
bl_label = "Mirror Clipping"
bl_options = {'REGISTER', 'UNDO'}
def execute(self, context):
layout = self.layout
bpy.context.object.modifiers["Mirror"].use_clip = not bpy.context.object.modifiers["Mirror"].use_clip
return {'FINISHED'}
#Add Mirror Object
class AddMirrorObject(bpy.types.Operator):
bl_idname = "add.mirrorobject"
bl_label = "Add Mirror Object"
bl_options = {'REGISTER', 'UNDO'}
def execute(self, context):
if bpy.context.object.mode == "OBJECT":
bpy.ops.object.modifier_add(type='MIRROR')
bpy.context.object.modifiers["Mirror"].use_clip = True
bpy.context.object.modifiers["Mirror"].show_on_cage = True
bpy.ops.object.modifier_move_up(modifier="Mirror")
bpy.ops.object.modifier_move_up(modifier="Mirror")
bpy.ops.object.modifier_move_up(modifier="Mirror")
elif bpy.context.object.mode == "EDIT":
bpy.ops.object.modifier_add(type='MIRROR')
bpy.context.object.modifiers["Mirror"].use_clip = True
bpy.context.object.modifiers["Mirror"].show_on_cage = True
bpy.context.object.modifiers["Mirror"].show_in_editmode = True
bpy.ops.object.modifier_move_up(modifier="Mirror")
bpy.ops.object.modifier_move_up(modifier="Mirror")
bpy.ops.object.modifier_move_up(modifier="Mirror")
return {'FINISHED'}
#Apply Mirror
class ApplyMirror(bpy.types.Operator):
bl_idname = "apply.mirror"
bl_label = "Apply Mirror"
bl_options = {'REGISTER', 'UNDO'}
def execute(self, context):
if bpy.context.object.mode == "OBJECT":
bpy.ops.object.modifier_apply(apply_as='DATA', modifier="Mirror")
elif bpy.context.object.mode == "EDIT":
bpy.ops.object.mode_set(mode = 'OBJECT')
bpy.ops.object.modifier_apply(apply_as='DATA', modifier="Mirror")
bpy.ops.object.mode_set(mode = 'EDIT')
return {'FINISHED'}
#######Subsurf###########
#Subsurf
class SubSurf2(bpy.types.Operator):
bl_idname = "object.subsurf2"
bl_label = "SubSurf 2"
bl_options = {'REGISTER', 'UNDO'}
def execute(self, context):
if bpy.context.object.mode == "OBJECT":
bpy.ops.object.subdivision_set(level=2)
bpy.context.object.modifiers["Subsurf"].show_only_control_edges = True
if bpy.context.object.mode == "EDIT":
bpy.ops.object.subdivision_set(level=2)
bpy.context.object.modifiers["Subsurf"].show_on_cage = True
bpy.context.object.modifiers["Subsurf"].show_only_control_edges = True
bpy.ops.object.mode_set(mode = 'EDIT')
return {'FINISHED'}
#Remove Subsurf
class RemoveSubSurf2(bpy.types.Operator):
bl_idname = "object.removesubsurf2"
bl_label = "Remove SubSurf"
bl_options = {'REGISTER', 'UNDO'}
def execute(self, context):
if bpy.context.object.mode == "OBJECT":
bpy.ops.object.modifier_remove(modifier="Subsurf")
if bpy.context.object.mode == "EDIT":
bpy.ops.object.mode_set(mode = 'OBJECT')
bpy.ops.object.modifier_remove(modifier="Subsurf")
bpy.ops.object.mode_set(mode = 'EDIT')
return {'FINISHED'}
#Apply Subsurf
class ApplySubSurf(bpy.types.Operator):
bl_idname = "object.applysubsurf"
bl_label = "Apply subsurf"
bl_options = {'REGISTER', 'UNDO'}
def execute(self, context):
if bpy.context.object.mode == "OBJECT":
bpy.ops.object.modifier_apply(apply_as='DATA', modifier="Subsurf")
if bpy.context.object.mode == "EDIT":
bpy.ops.object.mode_set(mode = 'OBJECT')
bpy.ops.object.modifier_apply(apply_as='DATA', modifier="Subsurf")
bpy.ops.object.mode_set(mode = 'EDIT')
return {'FINISHED'}
#Sursurf On/Off
class SursurfOnOff(bpy.types.Operator):
bl_idname = "object.subsurfonoff"
bl_label = "Sursurf On/Off"
bl_options = {'REGISTER', 'UNDO'}
def execute(self, context):
layout = self.layout
bpy.context.object.modifiers["Subsurf"].show_viewport = not bpy.context.object.modifiers["Subsurf"].show_viewport
return {'FINISHED'}
#Sursurf Edit On/Off
class SursurfEditOnOff(bpy.types.Operator):
bl_idname = "object.subsurfeditonoff"
bl_label = "Sursurf Edit On/Off"
bl_options = {'REGISTER', 'UNDO'}
def execute(self, context):
layout = self.layout
bpy.context.object.modifiers["Subsurf"].show_in_editmode = not bpy.context.object.modifiers["Subsurf"].show_in_editmode
return {'FINISHED'}
#Apply Skin
class ApplySubSurf(bpy.types.Operator):
bl_idname = "object.applyskin"
bl_label = "Apply Skin"
bl_options = {'REGISTER', 'UNDO'}
def execute(self, context):
if bpy.context.object.mode == "OBJECT":
bpy.ops.object.modifier_apply(apply_as='DATA', modifier="Mirror")
bpy.ops.object.modifier_apply(apply_as='DATA', modifier="Skin")
if bpy.context.object.mode == "EDIT":
bpy.ops.object.mode_set(mode = 'OBJECT')
bpy.ops.object.modifier_apply(apply_as='DATA', modifier="Mirror")
bpy.ops.object.modifier_apply(apply_as='DATA', modifier="Skin")
bpy.ops.object.mode_set(mode = 'EDIT')
return {'FINISHED'}
#################
#Panel #
#################
class Fast_Skin(bpy.types.Panel):
bl_idname = "view3D.fast_Skin"
bl_label = "Fast skin"
bl_space_type = "VIEW_3D"
bl_region_type = "TOOLS"
bl_category = "Tools"
def draw(self, context):
layout = self.layout
if bpy.context.area.type == 'VIEW_3D' and not bpy.context.object:
layout.operator("object.createskin", text='Create Skin', icon='POSE_HLT')
elif bpy.context.area.type == 'VIEW_3D' and bpy.context.object.mode == 'OBJECT':
layout.operator("object.createskin", text='Create Skin', icon='POSE_HLT')
elif bpy.context.object.mode == 'EDIT':
if context.scene.Skin_Skin==False:
layout.prop(context.scene, "Skin_Skin", text="Skin Properties", icon='TRIA_DOWN')
layout.operator("object.skin_root_mark", text='Mark Root', icon='META_EMPTY')
row = layout.row(align=True)
row.operator("object.skin_loose_mark_clear", text='Mark Loose').action='MARK'
row.operator("object.skin_loose_mark_clear", text='Clear Loose').action='CLEAR'
row = layout.row()
row.operator("object.skin_radii_equalize", text="Equalize Radii")
row = layout.row()
row.operator("object.applyskin", text="Apply skin/Mirror", icon='FILE_TICK')
else:
layout.prop(context.scene, "Skin_Skin", text="Skin Properties", icon='TRIA_RIGHT')
#box.operator("object.skin_radii_equalize", text='Equalize Radii')
if context.scene.Skin_Subdivs==False:
layout.prop(context.scene, "Skin_Subdivs", text="Subdivs Properties", icon='TRIA_DOWN')
#Subsurf
box = layout.box()
row = box.row(align=True)
is_subsurf = False
for mode in bpy.context.object.modifiers :
if mode.type == 'SUBSURF' :
is_subsurf = True
if is_subsurf == True :
row.operator("object.removesubsurf2", text="Del Subsurf", icon='X')
else :
row.operator("object.subsurf2", text="Add Subsurf", icon='MOD_SUBSURF')
row.operator("object.applysubsurf", text="Apply Subsurf", icon='FILE_TICK')
#On/Off, Edit
row = box.row(align=True)
for mode in bpy.context.object.modifiers :
if mode.type == 'SUBSURF' :
is_subsurf = True
if is_subsurf == True :
#View On/Off
if bpy.context.object.modifiers["Subsurf"].show_viewport == (True) :
row.operator("object.subsurfonoff", text="View",icon='RESTRICT_VIEW_OFF')
else:
row.operator("object.subsurfonoff", text="View",icon='VISIBLE_IPO_OFF')
#Edit On/Off
if bpy.context.object.modifiers["Subsurf"].show_in_editmode == (True) :
row.operator("object.subsurfeditonoff", text="Edit",icon='EDITMODE_HLT')
else:
row.operator("object.subsurfeditonoff", text="Edit",icon='SNAP_VERTEX')
row = box.row()
row.label('Subdivisions :')
row = box.row(align=True)
row.operator("object.subdivision_set", text='0').level=0
row.operator("object.subdivision_set", text='1').level=1
row.operator("object.subdivision_set", text='2').level=2
row.operator("object.subdivision_set", text='3').level=3
row.operator("object.subdivision_set", text='4').level=4
else:
layout.prop(context.scene, "Skin_Subdivs", text="Subdivs Properties", icon='TRIA_RIGHT')
#Mirror
if context.scene.Skin_Mirror==False:
layout.prop(context.scene, "Skin_Mirror", text="Mirror Properties", icon='TRIA_DOWN')
box = layout.box()
row = box.row()
is_mirror = False
for mode in bpy.context.object.modifiers :
if mode.type == 'MIRROR' :
is_mirror = True
if is_mirror == True :
row.operator("object.modifier_remove", text="Del Mirror", icon='X').modifier="Mirror"
else:
row.operator("add.mirrorobject", icon = 'MOD_MIRROR', text="Add Mirror")
#On/Off, Edit, Cage
row = box.row(align=True)
for mode in bpy.context.object.modifiers :
if mode.type == 'MIRROR' :
is_mirror = True
if is_mirror == True :
#View On/Off
if bpy.context.object.modifiers["Mirror"].show_viewport == (True) :
row.operator("object.mirroronoff", text="View",icon='RESTRICT_VIEW_OFF')
else:
row.operator("object.mirroronoff", text="View",icon='VISIBLE_IPO_OFF')
#Cage On/Off
if bpy.context.object.modifiers["Mirror"].show_on_cage == (True) :
row.operator("object.mirrorcageonoff", text="Cage",icon='OUTLINER_OB_MESH')
else:
row.operator("object.mirrorcageonoff", text="Cage",icon='OUTLINER_DATA_MESH')
#Clipping
if bpy.context.object.modifiers["Mirror"].use_clip == (True) :
row.operator("object.mirrorclipping", text="Clipping",icon='UV_EDGESEL')
else:
row.operator("object.mirrorclipping", text="Clipping",icon='SNAP_EDGE')
row = box.row()
row.operator("apply.mirror", text="Apply Mirror", icon='FILE_TICK')
else:
layout.prop(context.scene, "Skin_Mirror", text="Mirror Properties", icon='TRIA_RIGHT')
#Mirror
if context.scene.Skin_Shading==False:
layout.prop(context.scene, "Skin_Shading", text="Shading Properties", icon='TRIA_DOWN')
box = layout.box()
row = box.row()
row.prop(context.space_data, "use_occlude_geometry")
else:
layout.prop(context.scene, "Skin_Shading", text="Shading Properties", icon='TRIA_RIGHT')
layout.label('Info :')
layout.label('Skin Radius = CTRL + A, plus X or Y :')
layout.label('Add point on X = CTRL + RMB :')
def register():
bpy.utils.register_module(__name__)
update_panel(None, bpy.context)
def unregister():
bpy.utils.unregister_module(__name__)
if __name__ == "__main__":
register()