Newer
Older
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
bunchiness=self.bObject)
timings.add('objcreation')
if self.showMarkers:
obj_markers.parent = obj_new
self.updateTree = False
if self.timePerformance:
timings.add('Total')
print(timings)
return {'FINISHED'}
def draw(self, context):
layout = self.layout
layout.prop(self, 'updateTree', icon='MESH_DATA')
columns = layout.row()
col1 = columns.column()
col2 = columns.column()
box = col1.box()
box.label(text="Generation Settings:")
box.prop(self, 'randomSeed')
box.prop(self, 'maxIterations')
box = col1.box()
box.label(text="Shape Settings:")
box.prop(self, 'numberOfEndpoints')
box.prop(self, 'internodeLength')
box.prop(self, 'influenceRange')
box.prop(self, 'killDistance')
box.prop(self, 'power')
box.prop(self, 'scale')
box.prop(self, 'tropism')
newbox = col2.box()
newbox.label(text="Crown shape")
newbox.prop(self, 'useGroups')
if self.useGroups:
newbox.label(text="Object groups defining crown shape")
groupbox = newbox.box()
groupbox.prop(self, 'crownGroup')
groupbox = newbox.box()
groupbox.alert = (self.shadowGroup == self.crownGroup)
groupbox.prop(self, 'shadowGroup')
groupbox = newbox.box()
groupbox.alert = (self.exclusionGroup == self.crownGroup)
groupbox.prop(self, 'exclusionGroup')
else:
newbox.label(text="Simple ellipsoid defining crown shape")
newbox.prop(self, 'crownSize')
newbox.prop(self, 'crownShape')
newbox.prop(self, 'crownOffset')
newbox = col2.box()
newbox.prop(self, 'useTrunkGroup')
if self.useTrunkGroup:
newbox.prop(self, 'trunkGroup')
box.prop(self, 'surfaceBias')
box.prop(self, 'topBias')
box.prop(self, 'newEndPointsPer1000')
box = col2.box()
box.label(text="Skin options:")
box.prop(self, 'noModifiers')
if not self.noModifiers:
box.prop(self, 'skinMethod')
box.prop(self, 'subSurface')
layout.prop(self, 'addLeaves', icon='MESH_DATA')
if self.addLeaves:
box = layout.box()
box.label(text="Leaf Settings:")
box.prop(self, 'pLeaf')
box.prop(self, 'bLeaf')
box.prop(self, 'leafSize')
box.prop(self, 'leafRandomSize')
box.prop(self, 'leafRandomRot')
box.prop(self, 'connectoffset')
box.prop(self, 'leafMaxConnections')
layout.prop(self, 'addObjects', icon='MESH_DATA')
if self.addObjects:
box = layout.box()
box.label(text="Object Settings:")
box.prop(self, 'objectName')
box.prop(self, 'pObject')
box.prop(self, 'bObject')
box.prop(self, 'objectSize')
box.prop(self, 'objectRandomSize')
box.prop(self, 'objectRandomRot')
box.prop(self, 'objectMaxConnections')
box = layout.box()
box.label(text="Debug Settings:")
box.prop(self, 'showMarkers')
if self.showMarkers:
box.prop(self, 'markerScale')
box.prop(self, 'timePerformance')
self.layout.operator(
SCATree.bl_idname, text="Add Tree to Scene",
icon='PLUGIN').updateTree = True
bpy.utils.register_module(__name__)
Brecht Van Lommel
committed
bpy.types.VIEW3D_MT_mesh_add.append(menu_func)
Brecht Van Lommel
committed
bpy.types.VIEW3D_MT_mesh_add.remove(menu_func)
bpy.utils.unregister_module(__name__)