Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender-addons.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEugenio Pignataro <info@oscurart.com.ar>2017-12-14 16:23:03 +0300
committerEugenio Pignataro <info@oscurart.com.ar>2017-12-14 16:23:03 +0300
commit512687f54e26dc4cde5cf94455df3e395c23cae2 (patch)
tree93ef5fcadc506b015cb7ff91ea3aa831f87d6043 /oscurart_tools
parent36190021e9293d647aeb5171dd16e668845199e6 (diff)
Now edit MultiMesh support rotation scale location, and code cleanup
Diffstat (limited to 'oscurart_tools')
-rw-r--r--oscurart_tools/__init__.py6
-rw-r--r--oscurart_tools/oscurart_meshes.py10
2 files changed, 8 insertions, 8 deletions
diff --git a/oscurart_tools/__init__.py b/oscurart_tools/__init__.py
index de285c15..8affc8bb 100644
--- a/oscurart_tools/__init__.py
+++ b/oscurart_tools/__init__.py
@@ -205,11 +205,11 @@ class OscPanelMesh(Panel):
colrow = col.row(align=1)
colrow.operator("lattice.mirror_selected", icon="LATTICE_DATA")
colrow = col.row(align=1)
- colrow.label(text="Multimesh")
+ colrow.label(text="Edit Multimesh")
colrow.prop_search(scene, "multimeshedit", bpy.data, "groups", text="")
colrow = col.row(align=1)
- colrow.operator("mesh.create_edit_multimesh", icon="IMPORT")
- colrow.operator("mesh.apply_edit_multimesh", icon="EXPORT")
+ colrow.operator("mesh.create_edit_multimesh", icon="IMPORT", text= "StartEdit")
+ colrow.operator("mesh.apply_edit_multimesh", icon="EXPORT", text="FinishEdit")
class OscPanelShapes(Panel):
bl_idname = "Oscurart Shapes Tools"
diff --git a/oscurart_tools/oscurart_meshes.py b/oscurart_tools/oscurart_meshes.py
index 1b0d9d3c..ea899d53 100644
--- a/oscurart_tools/oscurart_meshes.py
+++ b/oscurart_tools/oscurart_meshes.py
@@ -660,11 +660,10 @@ class createEditMultimesh(Operator):
vertlist = []
polylist = []
for ob in temp:
+ objectMatrix = ob[0].matrix_world.copy()
for vert in ob[0].data.vertices:
- #print(vert.co[:])
- vertlist.append(vert.co+ob[0].location)
- for poly in ob[0].data.polygons:
- #print(poly.vertices[:])
+ vertlist.append(objectMatrix*vert.co)
+ for poly in ob[0].data.polygons:
polylist.append(tuple([vert+vi for vert in poly.vertices[:]]))
relvert[ob[0]] = {vert.index:vert.index+vi for vert in ob[0].data.vertices}
vi += len(ob[0].data.vertices)
@@ -688,8 +687,9 @@ class ApplyEditMultimesh(Operator):
def execute(self,context):
bpy.ops.object.mode_set(mode='OBJECT', toggle=False)
for object,rv in relvert.items():
+ objectMatrix = object.matrix_world.inverted().copy()
for source, target in rv.items():
- object.data.vertices[source].co = me.vertices[target].co-object.location
+ object.data.vertices[source].co = objectMatrix * me.vertices[target].co
object.hide = 0
bpy.context.scene.objects.unlink(ob)
return {'FINISHED'}