0

I'm trying to scale down a copy that would be 75% smaller. However, when I execute my code, the copy becomes not smaller but opposite, bigger.

import bpy

reads selected object data

objektas = bpy.context.object

for loop index

i = 0

vertices data

v = objektas.data.vertices

if objektas.type == 'MESH': for i in range(len(v)): for v in objektas.data.vertices: v.co += (0.75 * v.normal) Cube = bpy.data.objects.new('Cube', objektas.data) bpy.data.collections["Collection"].objects.link(Cube)

  • Maybe inverted normals ? – lemon Dec 09 '20 at 15:33
  • Well I haven't done it yet, but I'll make 8 total copies of the bigger cube and then I'll move them to each vertice of original cube. – OMEGALULKEKW Dec 09 '20 at 15:33
  • 1
    you are manipulating the original object not the copy. whatever, in addition to mistaken + sign in v.co += (0.75 * v.normal) you should consider that normal vectors are unit vectors. you should use v.co *= 0.75 instead – MohammadHossein Jamshidi Dec 09 '20 at 15:42
  • Q code scales the shared (linked) mesh of both the original and copy. https://blender.stackexchange.com/a/135608/15543 Any reason not to use object scale? eg cube = context.object.copy() then cube.scale *= 0.75 – batFINGER Dec 09 '20 at 16:16

0 Answers0