[Bf-extensions-cvs] [0ed1a7e9] master: object_fracture_crack: update to full version: T61901
meta-androcto
noreply at git.blender.org
Mon Sep 2 04:07:52 CEST 2019
Commit: 0ed1a7e9724a932259552dd319f73171226f444b
Author: meta-androcto
Date: Mon Sep 2 12:07:20 2019 +1000
Branches: master
https://developer.blender.org/rBAC0ed1a7e9724a932259552dd319f73171226f444b
object_fracture_crack: update to full version: T61901
===================================================================
M object_fracture_crack/__init__.py
D object_fracture_crack/crack_it.py
M object_fracture_crack/operator.py
A object_fracture_crack/process/cell_calc.py
A object_fracture_crack/process/cell_functions.py
A object_fracture_crack/process/cell_main.py
A object_fracture_crack/process/crack_functions.py
A object_fracture_crack/process/material_functions.py
R100 object_fracture_crack/materials/materials1.blend object_fracture_crack/process/materials/materials1.blend
A object_fracture_crack/utilities.py
===================================================================
diff --git a/object_fracture_crack/__init__.py b/object_fracture_crack/__init__.py
index eb29e1a1..135be2aa 100644
--- a/object_fracture_crack/__init__.py
+++ b/object_fracture_crack/__init__.py
@@ -18,18 +18,18 @@
bl_info = {
"name": "Cell Fracture Crack It",
- "author": "Nobuyuki Hirakata",
- "version": (0, 1, 3),
+ "author": "ideasman42, phymec, Sergey Sharybin, Nobuyuki Hirakata",
+ "version": (1, 0, 2),
"blender": (2, 80, 0),
- "location": "View3D > Toolshelf > Create Tab",
- "description": "Displaced Cell Fracture Addon",
- "warning": "Make sure to enable 'Object: Cell Fracture' Addon",
- "wiki_url": "https://wiki.blender.org/index.php/Extensions:2.6/"
- "Py/Scripts/Object/CrackIt",
- "category": "Object"
-}
-
-if 'bpy' in locals():
+ "location": "View3D > Sidebar > Create Tab",
+ "description": "Fractured Object, or Cracked Surface",
+ "warning": "Developmental",
+ "wiki_url": "http://wiki.blender.org/index.php/Extensions:2.6/Py/"
+ "Scripts/Object/CellFracture",
+ "category": "Object"}
+
+
+if "bpy" in locals():
import importlib
importlib.reload(operator)
@@ -37,87 +37,336 @@ else:
from . import operator
import bpy
-from bpy.types import PropertyGroup
from bpy.props import (
+ StringProperty,
BoolProperty,
- EnumProperty,
- FloatProperty,
IntProperty,
+ FloatProperty,
+ FloatVectorProperty,
+ EnumProperty,
+ BoolVectorProperty,
PointerProperty,
)
-from .operator import (
- CRACKIT_OT_fracture,
- CRACKIT_OT_material,
- CRACKIT_PT_main,
- )
-import os
+from bpy.types import (
+ Panel,
+ PropertyGroup,
+ )
-class CrackItProperties(PropertyGroup):
- # Input on toolshelf before execution
- # In Panel subclass, In bpy.types.Operator subclass,
- # reference them by context.scene.crackit
- fracture_childverts: BoolProperty(
- name="From Child Verts",
- description="Use child object's vertices and position for origin of crack",
- default=False
+class OBJECT_PT_FRACTURE_Panel(Panel):
+ bl_idname = 'FRACTURE_PT_Panel'
+ bl_label = "Fracture It"
+ bl_space_type = "VIEW_3D"
+ bl_region_type = "UI"
+ bl_category = "Create"
+ bl_context = 'objectmode'
+ bl_options = {"DEFAULT_CLOSED"}
+
+
+ def draw(self, context):
+ # Show pop-upped menu when the button is hit.
+ layout = self.layout
+ layout.label(text="Use Fracture It First")
+ layout.operator("object.add_fracture_cell",
+ text="Fracture It")
+ layout.label(text="Use Crack It To Displace")
+ layout.operator(operator.FRACTURE_OT_Crack.bl_idname,
+ text="Crack It")
+
+ material_props = context.window_manager.fracture_material_props
+ layout.separator()
+ box = layout.box()
+ col = box.column()
+ row = col.row(align=True)
+ col.label(text="Material Preset:")
+ col.label(text="Add Materials Last")
+ '''
+ row_sub = row.row()
+ row_sub.prop(material_props, "material_lib_name", text="",
+ toggle=True, icon="LONGDISPLAY")
+ '''
+ row = box.row()
+ row.prop(material_props, "material_preset", text="")
+
+ row = box.row()
+ row.operator(operator.FRACTURE_OT_Material.bl_idname, icon="MATERIAL_DATA",
+ text="Append Material")
+
+
+class FractureCellProperties(PropertyGroup):
+ # -------------------------------------------------------------------------
+ # Source Options
+ source_vert_own: IntProperty(
+ name="Own Verts",
+ description="Use own vertices",
+ min=0, max=2000,
+ default=100,
)
- fracture_scalex: FloatProperty(
- name="Scale X",
- description="Scale X",
- default=1.00,
- min=0.00,
- max=1.00
+ source_vert_child: IntProperty(
+ name="Child Verts",
+ description="Use child object vertices",
+ min=0, max=2000,
+ default=0,
)
- fracture_scaley: FloatProperty(
- name="Scale Y",
- description="Scale Y",
- default=1.00,
+ source_particle_own: IntProperty(
+ name="Own Particles",
+ description="All particle systems of the source object",
+ min=0, max=2000,
+ default=0,
+ )
+ source_particle_child: IntProperty(
+ name="Child Particles",
+ description="All particle systems of the child objects",
+ min=0, max=2000,
+ default=0,
+ )
+ source_pencil: IntProperty(
+ name="Annotation Pencil",
+ description="Annotation Grease Pencil",
+ min=0, max=2000,
+ default=0,
+ )
+ source_random: IntProperty(
+ name="Random",
+ description="Random seed position",
+ min=0, max=2000,
+ default=0,
+ )
+ '''
+ source_limit: IntProperty(
+ name="Source Limit",
+ description="Limit the number of input points, 0 for unlimited",
+ min=0, max=5000,
+ default=100,
+ )
+ '''
+ # -------------------------------------------------------------------------
+ # Transform
+ source_noise: FloatProperty(
+ name="Noise",
+ description="Randomize point distribution",
+ min=0.0, max=1.0,
+ default=0.0,
+ )
+ margin: FloatProperty(
+ name="Margin",
+ description="Gaps for the fracture (gives more stable physics)",
+ min=0.0, max=0.5,
+ default=0.001,
+ )
+ cell_scale: FloatVectorProperty(
+ name="Scale",
+ description="Scale Cell Shape",
+ size=3,
+ min=0.0, max=1.0,
+ default=(1.0, 1.0, 1.0),
+ )
+ pre_simplify : FloatProperty(
+ name="Simplify Base Mesh",
+ description="Simplify base mesh before making cell. Lower face size, faster calculation",
+ default=0.00,
min=0.00,
max=1.00
)
- fracture_scalez: FloatProperty(
- name="Scale Z",
- description="Scale Z",
+ use_recenter: BoolProperty(
+ name="Recenter",
+ description="Recalculate the center points after splitting",
+ default=True,
+ )
+ use_island_split: BoolProperty(
+ name="Split Islands",
+ description="Split disconnected meshes",
+ default=True,
+ )
+ # -------------------------------------------------------------------------
+ # Recursion
+ recursion: IntProperty(
+ name="Recursion",
+ description="Break shards recursively",
+ min=0, max=2000,
+ default=0,
+ )
+ recursion_source_limit: IntProperty(
+ name="Fracture Each",
+ description="Limit the number of input points, 0 for unlimited (applies to recursion only)",
+ min=2, max=2000, # Oviously, dividing in more than two objects is needed, to avoid no fracture object.
+ default=8,
+ )
+ recursion_clamp: IntProperty(
+ name="Max Fracture",
+ description="Finish recursion when this number of objects is reached (prevents recursing for extended periods of time), zero disables",
+ min=0, max=10000,
+ default=250,
+ )
+ recursion_chance: FloatProperty(
+ name="Recursion Chance",
+ description="Likelihood of recursion",
+ min=0.0, max=1.0,
default=1.00,
- min=0.00,
- max=1.00
)
- fracture_div: IntProperty(
- name="Max Crack",
- description="Max Crack",
- default=100,
- min=0,
- max=10000
+ recursion_chance_select: EnumProperty(
+ name="Target",
+ items=(('RANDOM', "Random", ""),
+ ('SIZE_MIN', "Small", "Recursively subdivide smaller objects"),
+ ('SIZE_MAX', "Big", "Recursively subdivide bigger objects"),
+ ('CURSOR_MIN', "Cursor Close", "Recursively subdivide objects closer to the cursor"),
+ ('CURSOR_MAX', "Cursor Far", "Recursively subdivide objects farther from the cursor"),
+ ),
+ default='SIZE_MIN',
)
- fracture_margin: FloatProperty(
- name="Margin Size",
- description="Margin Size",
- default=0.001,
- min=0.000,
- max=1.000
+ # -------------------------------------------------------------------------
+ # Interior Meshes Options
+ use_smooth_faces: BoolProperty(
+ name="Smooth Faces",
+ description="Smooth Faces of inner side",
+ default=False,
+ )
+ use_sharp_edges: BoolProperty(
+ name="Mark Sharp Edges",
+ description="Set sharp edges when disabled",
+ default=False,
+ )
+ use_sharp_edges_apply: BoolProperty(
+ name="Edge Split Modifier",
+ description="Add edge split modofier for sharp edges",
+ default=False,
+ )
+ use_data_match: BoolProperty(
+ name="Copy Original Data",
+ description="Match original mesh materials and data layers",
+ default=True,
+ )
+ material_index: IntProperty(
+ name="Interior Material Slot",
+ description="Material index for interior faces",
+ default=0,
+ )
+ use_interior_vgroup: BoolProperty(
+ name="Vertex Group",
+ description="Create a vertex group for interior verts",
+ default=False,
+ )
+ # -----------------------------------------------------------------
@@ Diff output truncated at 10240 characters. @@
More information about the Bf-extensions-cvs
mailing list