1 # ##### BEGIN GPL LICENSE BLOCK #####
3 # This program is free software; you can redistribute it and/or
4 # modify it under the terms of the GNU General Public License
5 # as published by the Free Software Foundation; either version 2
6 # of the License, or (at your option) any later version.
8 # This program is distributed in the hope that it will be useful,
9 # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 # GNU General Public License for more details.
13 # You should have received a copy of the GNU General Public License
14 # along with this program; if not, write to the Free Software Foundation,
15 # Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
17 # ##### END GPL LICENSE BLOCK #####
20 "name": "Cell Fracture Crack It",
21 "author": "Nobuyuki Hirakata",
23 "blender": (2, 78, 5),
24 "location": "View3D > Toolshelf > Create Tab",
25 "description": "Displaced Cell Fracture Addon",
26 "warning": "Make sure to enable 'Object: Cell Fracture' Addon",
27 "wiki_url": "https://wiki.blender.org/index.php/Extensions:2.6/"
28 "Py/Scripts/Object/CrackIt",
34 importlib
.reload(operator
)
37 from . import operator
40 from bpy
.types
import PropertyGroup
41 from bpy
.props
import (
51 class CrackItProperties(PropertyGroup
):
52 # Input on toolshelf before execution
53 # In Panel subclass, In bpy.types.Operator subclass,
54 # reference them by context.scene.crackit
56 fracture_childverts
= BoolProperty(
57 name
="From Child Verts",
58 description
="Use child object's vertices and position for origin of crack",
61 fracture_scalex
= FloatProperty(
63 description
="Scale X",
68 fracture_scaley
= FloatProperty(
70 description
="Scale Y",
75 fracture_scalez
= FloatProperty(
77 description
="Scale Z",
82 fracture_div
= IntProperty(
84 description
="Max Crack",
89 fracture_margin
= FloatProperty(
91 description
="Margin Size",
96 extrude_offset
= FloatProperty(
98 description
="Extrude Offset",
103 extrude_random
= FloatProperty(
105 description
="Extrude Random",
111 material_addonpath
= os
.path
.dirname(__file__
)
112 # Selection of material preset
113 # Note: you can choose the original name in the library blend
115 material_preset
= EnumProperty(
117 description
="Material Preset",
119 ('crackit_organic_mud', "Organic Mud", "Mud material"),
120 ('crackit_mud1', "Mud", "Mud material"),
121 ('crackit_tree1_moss1', "Tree Moss", "Tree Material"),
122 ('crackit_tree2_dry1', "Tree Dry", "Tree Material"),
123 ('crackit_tree3_red1', "Tree Red", "Tree Material"),
124 ('crackit_rock1', "Rock", "Rock Material")
127 material_lib_name
= BoolProperty(
129 description
="Use the original Material name from the .blend library\n"
130 "instead of the one defined in the Preset",
136 bpy
.utils
.register_module(__name__
)
137 bpy
.types
.Scene
.crackit
= PointerProperty(
138 type=CrackItProperties
143 del bpy
.types
.Scene
.crackit
144 bpy
.utils
.unregister_module(__name__
)
147 if __name__
== "__main__":