[Bf-blender-cvs] [ed348890c1d] temp-fracture-modifier-2.8: Merge remote-tracking branch 'origin/blender2.8' into fracture_modifier-2.8
Martin Felke
noreply at git.blender.org
Tue Nov 13 16:13:40 CET 2018
Commit: ed348890c1d4b27fa36820e721d9aac9640d9089
Author: Martin Felke
Date: Tue Nov 13 15:08:38 2018 +0100
Branches: temp-fracture-modifier-2.8
https://developer.blender.org/rBed348890c1d4b27fa36820e721d9aac9640d9089
Merge remote-tracking branch 'origin/blender2.8' into fracture_modifier-2.8
# Conflicts:
# release/scripts/addons
# release/scripts/addons_contrib
# source/blender/blenkernel/BKE_customdata.h
# source/blender/blenkernel/intern/bvhutils.c
# source/blender/depsgraph/intern/depsgraph_query_filter.cc
# source/blender/editors/interface/interface.c
# source/blender/editors/object/object_modifier.c
# source/blender/editors/object/object_relations.c
# source/blender/makesrna/RNA_access.h
# source/blender/modifiers/intern/MOD_boolean.c
===================================================================
===================================================================
diff --cc release/scripts/addons
index b5a35bbd39a,c2aef4a98f6..af1952328cf
--- a/release/scripts/addons
+++ b/release/scripts/addons
@@@ -1,1 -1,1 +1,1 @@@
- Subproject commit b5a35bbd39af54dee33fc5ea039e49e6e9f450a8
-Subproject commit c2aef4a98f6cabef9a6d38a33035f02cf8233dd0
++Subproject commit af1952328cf1def9c8002b3165713713704f9336
diff --cc release/scripts/addons_contrib
index b4496a81e4f,5c4210d5b78..e7ee79f7fd5
--- a/release/scripts/addons_contrib
+++ b/release/scripts/addons_contrib
@@@ -1,1 -1,1 +1,1 @@@
- Subproject commit b4496a81e4f3d607a692f7c2e12fce3dbd784de4
-Subproject commit 5c4210d5b78c61137c5f32e7deb7561177ac0894
++Subproject commit e7ee79f7fd53f9caa7536de178d2d7bf7ce1e4c7
diff --cc release/scripts/startup/bl_operators/presets.py
index 381b9c83916,5ff8f6f591c..ad2fceb274b
--- a/release/scripts/startup/bl_operators/presets.py
+++ b/release/scripts/startup/bl_operators/presets.py
@@@ -238,22 -238,16 +238,29 @@@ class ExecutePreset(Operator)
ext = splitext(filepath)[1].lower()
+ if ext not in {".py", ".xml"}:
+ self.report({'ERROR'}, "unknown filetype: %r" % ext)
+ return {'CANCELLED'}
+
+ if hasattr(preset_class, "reset_cb"):
+ preset_class.reset_cb(context)
+
# execute the preset using script.python_file_run
if ext == ".py":
- bpy.ops.script.python_file_run(filepath=filepath)
+ #FRACTURE MODIFIER HACK, cant get bpy.context.fracture to be run via py script else...
+ #so fake a context here
+ mod = False
+ if context.object is not None:
+ for md in context.object.modifiers:
+ if md.type == 'FRACTURE':
+ mod = True
+ break
+ if (mod):
+ ctx = bpy.context.copy()
+ ctx["fracture"] = md
+ bpy.ops.script.python_file_run(ctx, filepath=filepath)
+ else:
+ bpy.ops.script.python_file_run(filepath=filepath)
elif ext == ".xml":
import rna_xml
rna_xml.xml_file_run(context,
@@@ -600,111 -594,6 +607,111 @@@ class AddPresetKeyconfig(AddPresetBase
if self.remove_active:
keyconfigs.remove(keyconfigs.active)
+class AddPresetFracture(AddPresetBase, Operator):
+ """Add or remove a Fracture Preset"""
+ bl_idname = "fracture.preset_add"
+ bl_label = "Add Fracture Preset"
+ preset_menu = "FRACTURE_MT_presets"
+
+ preset_defines = [
+ "fracture = bpy.context.fracture"
+ ]
+
+ preset_values = [
+ "fracture.frac_algorithm",
+ "fracture.shard_count",
+ "fracture.cluster_count",
+ "fracture.point_seed",
- "fracture.shards_to_islands",
++ "fracture.split_to_islands",
+ "fracture.auto_execute",
+ "fracture.use_constraints",
+ "fracture.constraint_limit",
+ "fracture.contact_dist",
+ "fracture.breaking_threshold",
+ "fracture.cluster_breaking_threshold",
+ "fracture.point_source",
+ "fracture.extra_group",
+ "fracture.dm_group",
+ "fracture.use_particle_birth_coordinates",
+ "fracture.splinter_axis",
+ "fracture.splinter_length",
+ "fracture.percentage",
+ "fracture.breaking_percentage",
+ "fracture.breaking_percentage_weighted",
+ "fracture.breaking_angle",
+ "fracture.breaking_angle_weighted",
+ "fracture.breaking_distance",
+ "fracture.breaking_distance_weighted",
+ "fracture.cluster_breaking_percentage",
+ "fracture.cluster_breaking_angle",
+ "fracture.cluster_breaking_distance",
+ "fracture.solver_iterations_override",
+ "fracture.use_mass_dependent_thresholds",
+ "fracture.thresh_vertex_group",
+ "fracture.ground_vertex_group",
+ "fracture.inner_vertex_group",
+ "fracture.autohide_dist",
+ "fracture.fix_normals",
+ "fracture.execute_threaded",
+ "fracture.use_breaking",
+ "fracture.nor_range",
+ "fracture.cluster_group",
+ "fracture.cutter_group",
+ "fracture.grease_offset",
+ "fracture.grease_decimate",
+ "fracture.use_greasepencil_edges",
+ "fracture.cutter_axis",
+ "fracture.cluster_constraint_type",
+ "fracture.constraint_target",
+ "fracture.fracture_mode",
+ "fracture.dynamic_force",
+ "fracture.limit_impact",
+ "fracture.use_compounds",
+ # "fracture.impulse_dampening",
+ # "fracture.directional_factor",
+ "fracture.minimum_impulse",
+ "fracture.mass_threshold_factor",
+ "fracture.autohide_filter_group",
+ "fracture.uv_layer",
+ "fracture.inner_material",
- "fracture.boolean_solver",
++ #"fracture.boolean_solver",
+ "fracture.boolean_double_threshold",
+ "fracture.dynamic_percentage",
+ "fracture.dynamic_new_constraints",
+ "fracture.dynamic_min_size",
+ "fracture.use_constraint_collision",
+ "fracture.inner_crease",
+ "fracture.material_offset_difference",
+ "fracture.material_offset_intersect",
+ "fracture.orthogonality_factor",
+ "fracture.keep_distort",
+ "fracture.do_merge",
+ "fracture.constraint_type",
+ "fracture.automerge_dist",
+ "fracture.deform_distance",
+ "fracture.deform_distance_weighted",
+ "fracture.cluster_deform_distance",
+ "fracture.deform_angle",
+ "fracture.deform_angle_weighted",
+ "fracture.cluster_deform_angle",
+ "fracture.deform_weakening",
+ "fracture.use_centroids",
+ "fracture.use_vertices",
+ "fracture.use_self_collision",
+ "fracture.grid_resolution",
- "fracture.min_acceleration",
- "fracture.max_acceleration",
- "fracture.acceleration_fade",
++ #"fracture.min_acceleration",
++ #"fracture.max_acceleration",
++ #"fracture.acceleration_fade",
+ "fracture.use_animated_mesh",
+ "fracture.animated_mesh_input",
+ "fracture.use_animated_mesh_rotation",
+ "fracture.grid_offset",
+ "fracture.grid_spacing",
+ "fracture.use_constraint_group",
+ ]
+
+ preset_subdir = "fracture"
+
class AddPresetOperator(AddPresetBase, Operator):
"""Add or remove an Operator Preset"""
diff --cc release/scripts/startup/bl_ui/properties_physics_fracture.py
index b53777444d8,00000000000..b3be04f9c5d
mode 100644,000000..100644
--- a/release/scripts/startup/bl_ui/properties_physics_fracture.py
+++ b/release/scripts/startup/bl_ui/properties_physics_fracture.py
@@@ -1,345 -1,0 +1,343 @@@
+# ##### 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 #####
+
+# <pep8 compliant>
+import bpy
+from bpy.types import Panel, Menu, UIList
+from bpy.app.translations import pgettext_iface as iface_
++from bl_operators.presets import PresetMenu
+
+
- class FRACTURE_MT_presets(Menu):
++class FRACTURE_PT_presets(PresetMenu):
+ bl_label = "Fracture Presets"
+ preset_subdir = "fracture"
+ preset_operator = "script.execute_preset"
- draw = Menu.draw_preset
-
++ preset_add_operator = "fracture.preset_add"
+
+class PhysicButtonsPanel():
+ bl_space_type = 'PROPERTIES'
+ bl_region_type = 'WINDOW'
+ bl_context = "physics"
+
+ @classmethod
+ def poll(cls, context):
+ ob = context.object
+ return ob and (ob.type == 'MESH') and context.fracture
+
+class PHYSICS_PT_fracture_anim_mesh(PhysicButtonsPanel, Panel):
+ bl_label = "Animated Mesh"
+ bl_options = {'DEFAULT_CLOSED'}
+ bl_parent_id = 'PHYSICS_PT_fracture'
+
+ def draw_header(self, context):
+ md = context.fracture
+ self.layout.prop(md, "use_animated_mesh", text="")
+
+ def draw(self, context):
+ layout = self.layout
+ md = context.fracture
+ layout.context_pointer_set("modifier", md)
+ layout.active = md.use_animated_mesh
+ row = layout.row()
+ row.prop(md, "animated_mesh_limit")
+ row.prop(md, "use_animated_mesh_rotation")
+ row = layout.row()
+ row.prop(md, "animated_mesh_input")
+ row = layout.row()
+ row.operator("object.fracture_anim_bind", text="Bind", icon="UV_VERTEXSEL")
+
+class PHYSICS_PT_fracture_advanced(PhysicButtonsPanel, Panel):
+ bl_label = "Advanced"
+ bl_options = {'DEFAULT_CLOSED'}
+ bl_parent_id = 'PHYSICS_PT_fracture'
+
+ def draw(self, context):
+ layout = self.layout
+ md = context.fracture
+ ob = context.object
+
+ layout.label(text="Fracture Point Source")
+ col = layout.column()
+ col.context_pointer_set("modifier", md)
+ col.prop(md, "point_source")
+ if 'GRID' in md.point_source:
+ sub = col.split(factor=0.33)
+ sub.prop(md, "grid_resolution")
+ sub.prop(md, "grid_offset")
+ sub.prop(md, "grid_spacing")
+ #if 'GREASE_PENCIL' in md.point_source:
+ # col.prop(md, "use_greasepencil_edges")
+ # col.prop(md, "grease_offset")
+ # col.prop(md, "grease_decimate")
+ # col.prop(md, "cutter_axis")
+
@@ Diff output truncated at 10240 characters. @@
More information about the Bf-blender-cvs
mailing list