-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathConva.py
45 lines (35 loc) · 834 Bytes
/
Conva.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
import bpy
#Funciones Extra
def ressum(lx):
if lx < 0:
return lx*-1
else:
return lx
def asd(lz):
if lz < 0:
return lz
else:
return lz*-1
def tweakUp(lx,ly,lz,sy,salida):
if ly < 0:
salida += ly*10
elif ly > 0:
salida += ly*10
else:
salida = ly
salida -= ((sy-1)-((ressum(lx)-asd(lz))*2))
print(salida)
return salida
#region Funciones que salen
def tweakDown(lx,ly,lz,sy,salida):
if ly < 0:
salida += ly*10
elif ly > 0:
salida += ly*10
else:
salida = ly
salida += ((sy-1)-((ressum(lx)-asd(lz))*2))
print(salida)
return salida*-1
bpy.app.driver_namespace["TBUP"] = tweakUp
bpy.app.driver_namespace["TBDOWN"] = tweakDown