Commit eab846e2 authored by CoDEmanX's avatar CoDEmanX

Clean-up: bl_info['tracker_url'] updated to developer.blender.org, some minor other edits

parent dc1b2653
......@@ -26,10 +26,8 @@ bl_info = {
"location": "View3D > Add > Mesh > Cad Objects",
"description": "Add building object types",
"warning": "",
"wiki_url": "http://wiki.blender.org/index.php/Extensions:2.6/Py/"\
"Scripts",
"tracker_url": "https://projects.blender.org/tracker/index.php?"\
"func=detail&aid=32711",
"wiki_url": "",
"tracker_url": "https://developer.blender.org/T32711",
"category": "Add Mesh"}
......
......@@ -4,7 +4,6 @@ bl_info = {
"author": "SayPRODUCTIONS",
"version": (1, 0),
"blender": (2, 59, 0),
"api": 33333,
"location": "View3D > Add > Mesh > Say3D",
"description": "Balcony olusturma",
"warning": "",
......
......@@ -3,14 +3,13 @@
"author": "SayPRODUCTIONS",
"version": (1, 0),
"blender": (2, 59, 0),
"api": 33333,
"location": "View3D > Add > Mesh > Say3D",
"description": "Sove Framema",
"warning": "",
"wiki_url": "",
"tracker_url": "",
"category": "Add Mesh"}
'''
'''
import bpy
from bpy.props import *
from bpy_extras.object_utils import object_data_add
......@@ -22,8 +21,8 @@ def MSVE():
if 'Sove' not in bpy.data.materials:
mtl=bpy.data.materials.new('Sove')
mtl.diffuse_color = (0.44,0.52,0.64)
mtl.diffuse_shader = 'LAMBERT'
mtl.diffuse_intensity = 1.0
mtl.diffuse_shader = 'LAMBERT'
mtl.diffuse_intensity = 1.0
else:
mtl=bpy.data.materials['Sove']
return mtl
......@@ -102,7 +101,7 @@ def add_object(self, context):
if self.dr==False:
fc.append([14,10,11,15]);fc.append([6,14,15,7])
#Yuvarlak-----------
else:
else:
if dh>mx:dh=mx;self.dh=mx*100
vr[ 6][2]-=dh;vr[ 7][2]-=dh
vr[14][2]-=dh;vr[15][2]-=dh
......@@ -197,7 +196,7 @@ class OBJECT_OT_add_object(bpy.types.Operator):
row=box.row();row.prop(self, 'fh');row.prop(self, 'fd')
for i in range(self.fg):
box.prop(self,'f'+str(i))
def execute(self, context):
if self.son!=self.prs:
if self.prs=='1':Prs(self,200,15,590,44,33,15,20,30,True,1,2,3,90,30,30,30,30,30,30,30,30,30)
......
......@@ -3,7 +3,6 @@ bl_info = {
"author": "SayPRODUCTIONS",
"version": (2, 0),
"blender": (2, 63, 0),
"api": 33333,
"location": "View3D > Add > Mesh > Say3D",
"description": "Window Generator 2",
"warning": "",
......@@ -158,7 +157,7 @@ def add_object(self, context):
for i in range(0,mx*4+2,2):fc.extend([[z+i+Y+0,z+i+Y+2,z+i+Y+V+4,z+i+Y+V+2],[z+i+Y +3,z+i+Y +1,z+i+Y+V+3,z+i+Y+V+5]])
for i in range(0,mx*4-3,4):fc.extend([[z+i+Y+2,z+i+Y+3,z+i+Y +5,z+i+Y +4],[z+i+Y+V+5,z+i+Y+V+4,z+i+Y+V+6,z+i+Y+V+7]])
#Dikey
for Y in range(0,my):
for Y in range(0,my):
z=Y*(mx*4+4)*2
for i in range(0,mx*4+2,4):fc.extend([[z+i+1,z+i+0,z+i+V+2,z+i+V+3],[z+i+3,z+i+1,z+i+V+3,z+i+V+5],[z+i+2,z+i+3,z+i+V+5,z+i+V+4],[z+i+0,z+i+2,z+i+V+4,z+i+V+2]])
#Fitil-------------------
......@@ -249,7 +248,7 @@ def add_object(self, context):
y=my-1
for x in range(0,mx):
if kx[x][y]==True:
fr=(k1+k2)*0.5-0.01;ek=k2
fr=(k1+k2)*0.5-0.01;ek=k2
R=C-k1;K=R-k2
x1=X[x*2+1];x2=X[x*2+2]
......@@ -329,7 +328,7 @@ def add_object(self, context):
vr.extend([[x2,fr-0.005,sqrt(K**2-x2**2)+z],[x2,fr+0.005,sqrt(K**2-x2**2)+z]])
n=len(vr);ON.extend([n-1,n-3,n-5,n-7]);AR.extend([n-2,n-4,n-6,n-8])
fc.append(ON);AR.reverse();fc.append(AR)
m=len(fc);cam.extend([m-1,m-2])
m=len(fc);cam.extend([m-1,m-2])
elif self.UST=='3':#Egri
if self.DT3=='1':H=(self.VL1/200)/u
......
bl_info = {
"name": "Oscurart Chain and Rope Maker",
"author": "Oscurart",
"version": (1,1),
"version": (1, 1),
"blender": (2, 63, 0),
"location": "Add > Mesh",
"description": "Create chains and ropes along armatures/curves",
"warning": "",
"wiki_url": "http://wiki.blender.org/index.php/Extensions:2.6/Py/"\
"wiki_url": "http://wiki.blender.org/index.php/Extensions:2.6/Py/"
"Scripts/Add_Mesh/Oscurart_Chain_Rope_Maker",
"tracker_url": "http://projects.blender.org/tracker/index.php?"\
"func=detail&aid=28136",
"tracker_url": "https://developer.blender.org/T28136",
"category": "Object"}
import bpy
from .oscurart_rope_maker import *
from .oscurart_rope_maker import *
from .oscurart_chain_maker import *
def register():
......@@ -27,7 +26,7 @@ def unregister():
bpy.utils.unregister_class(OBJECT_OT_add_object)
bpy.types.INFO_MT_curve_add.remove(oscRopeButton)
bpy.utils.unregister_module(__name__)
bpy.types.INFO_MT_mesh_add.remove(menu_oscChain)
bpy.types.INFO_MT_mesh_add.remove(menu_oscChain)
if __name__ == "__main__":
register()
......
......@@ -21,7 +21,6 @@ bl_info = {
"author": "Oscurart",
"version": (1,1),
"blender": (2, 56, 0),
"api": 3800,
"location": "Add > Mesh > Oscurart Chain",
"description": "Create chain links from armatures.",
"warning": "",
......@@ -36,12 +35,12 @@ bl_info = {
import bpy
def makeChain (self, context, mult, curverig):
def makeChain (self, context, mult, curverig):
if bpy.context.active_object.type == 'ARMATURE':
bpy.ops.object.mode_set(mode='OBJECT')
if bpy.context.active_object.type == 'ARMATURE':
bpy.ops.object.mode_set(mode='OBJECT')
VAR_SWITCH=abs(1)
ARMATURE=bpy.context.active_object
ARMATURE=bpy.context.active_object
def creahuesocero(hueso):
## CREO DATA PARA ESLABON
mesh=bpy.data.meshes.new("objectData"+str(hueso.name))
......@@ -53,11 +52,11 @@ def makeChain (self, context, mult, curverig):
)
bpy.context.scene.objects.link(object)
## ESCALO EL HUESO
bpy.data.objects['EslabonCero'+str(hueso.name)].scale= (hueso.length*mult,hueso.length*mult,hueso.length*mult)
bpy.data.objects['EslabonCero'+str(hueso.name)].scale= (hueso.length*mult,hueso.length*mult,hueso.length*mult)
## EMPARENTO
bpy.data.objects['EslabonCero'+str(hueso.name)].parent=ARMATURE
bpy.data.objects['EslabonCero'+str(hueso.name)].parent_type = 'BONE'
bpy.data.objects['EslabonCero'+str(hueso.name)].parent_bone=hueso.name
bpy.data.objects['EslabonCero'+str(hueso.name)].parent_bone=hueso.name
def creahuesonoventa(hueso):
## CREO DATA PARA ESLABON
mesh=bpy.data.meshes.new("objectData"+str(hueso.name))
......@@ -67,49 +66,49 @@ def makeChain (self, context, mult, curverig):
[(1,2),(0,3),(3,5),(2,4),(0,6),(5,6),(1,7),(4,7),(0,8),(1,8),(7,9),(6,9),(8,9),(2,10),(3,10),(4,11),(5,11),(10,11),(5,12),(12,13),(11,13),(13,14),(4,14),(10,16),(15,16),(3,15),(2,17),(16,17),(9,19),(18,19),(6,18),(7,20),(19,20),(8,22),(21,22),(1,21),(0,23),(22,23),(14,20),(12,18),(15,23),(17,21),(12,15),(13,16),(14,17),(20,21),(19,22),(18,23)],
[(6,0,3,5),(1,7,4,2),(0,6,9,8),(8,9,7,1),(2,4,11,10),(10,11,5,3),(11,13,12,5),(4,14,13,11),(3,15,16,10),(10,16,17,2),(6,18,19,9),(9,19,20,7),(1,21,22,8),(23,0,8,22),(7,20,14,4),(5,12,18,6),(0,23,15,3),(2,17,21,1),(16,15,12,13),(17,16,13,14),(22,21,20,19),(23,22,19,18),(21,17,14,20),(15,23,18,12)]
)
bpy.context.scene.objects.link(object)
bpy.context.scene.objects.link(object)
## ESCALO EL HUESO
bpy.data.objects['EslabonNov'+str(hueso.name)].scale= (hueso.length*mult,hueso.length*mult,hueso.length*mult)
bpy.data.objects['EslabonNov'+str(hueso.name)].scale= (hueso.length*mult,hueso.length*mult,hueso.length*mult)
## EMPARENTO
bpy.data.objects['EslabonNov'+str(hueso.name)].parent=ARMATURE
bpy.data.objects['EslabonNov'+str(hueso.name)].parent_type = 'BONE'
bpy.data.objects['EslabonNov'+str(hueso.name)].parent_bone=hueso.name
bpy.data.objects['EslabonNov'+str(hueso.name)].parent_bone=hueso.name
for hueso in bpy.context.active_object.pose.bones:
if VAR_SWITCH == 1:
creahuesocero(hueso)
else:
creahuesonoventa(hueso)
creahuesonoventa(hueso)
if VAR_SWITCH == 1:
VAR_SWITCH = 0
print(VAR_SWITCH)
else :
VAR_SWITCH = 1
print(VAR_SWITCH)
print(VAR_SWITCH)
# SI NO TILDAMOS CURVERIG
if curverig == True:
if curverig == True:
# VARIABLES
LISTA_POINTC=[]
ACTARM=bpy.context.active_object
ACTARM=bpy.context.active_object
# CREO DATA , OBJETO Y LO CONECTO A LA ESCENA
crv= bpy.data.curves.new("CurvaCable", "CURVE")
obCable=bpy.data.objects.new("Cable",crv)
bpy.context.scene.objects.link(obCable)
bpy.context.scene.objects.link(obCable)
# SETEO ATRIBUTOS
crv.dimensions = "3D"
crv.resolution_u = 10
crv.resolution_v = 10
crv.twist_mode = "MINIMUM"
# CREO LISTA DE COORDENADAS DE TAIL Y HEAD
crv.twist_mode = "MINIMUM"
# CREO LISTA DE COORDENADAS DE TAIL Y HEAD
LISTA_POINTC.append((
ACTARM.data.bones[0].head_local[0],
ACTARM.data.bones[0].head_local[1],
ACTARM.data.bones[0].head_local[2],
1
))
))
print("huesos: "+ str(len(ACTARM.data.bones)))
for hueso in ACTARM.data.bones:
LISTA_POINTC.append((hueso.tail_local[0],hueso.tail_local[1],hueso.tail_local[2],1))
LISTA_POINTC.append((hueso.tail_local[0],hueso.tail_local[1],hueso.tail_local[2],1))
# CREO EL SPLINE
spline=crv.splines.new("NURBS")
lencoord= len(LISTA_POINTC)
......@@ -120,20 +119,20 @@ def makeChain (self, context, mult, curverig):
spline.points[punto].co = LISTA_POINTC[punto]
print(LISTA_POINTC[punto])
# SETEO ENDPOINT
bpy.data.objects['Cable'].data.splines[0].use_endpoint_u= True
bpy.data.objects['Cable'].data.splines[0].use_endpoint_u= True
# SELECCIONO LA CURVA
bpy.ops.object.select_all(action='DESELECT')
bpy.data.objects['Cable'].select=1
bpy.context.scene.objects.active=bpy.data.objects['Cable']
bpy.context.scene.objects.active=bpy.data.objects['Cable']
# PASO A EDIT
bpy.ops.object.mode_set(mode='EDIT')
bpy.ops.object.mode_set(mode='EDIT')
# CREO HOOKS
POINTSTEP=0
for POINT in bpy.data.objects['Cable'].data.splines[0].points:
bpy.ops.curve.select_all(action="DESELECT")
bpy.data.objects['Cable'].data.splines[0].points[POINTSTEP].select=1
bpy.ops.object.hook_add_newob()
POINTSTEP+=1
POINTSTEP+=1
# PASO A SELECCIONAR LOS OBJETOS
bpy.ops.object.mode_set(mode='OBJECT')
bpy.ops.object.select_all(action='DESELECT')
......@@ -147,45 +146,45 @@ def makeChain (self, context, mult, curverig):
bpy.ops.pose.constraint_add_with_targets(type='SPLINE_IK')
ACTARM.pose.bones[-1].constraints['Spline IK'].target = bpy.data.objects['Cable']
ACTARM.pose.bones[-1].constraints['Spline IK'].chain_count=100
bpy.context.active_object.pose.bones[-1].constraints['Spline IK'].use_y_stretch= False
bpy.context.active_object.pose.bones[-1].constraints['Spline IK'].use_y_stretch= False
# VUELVO A OBJECT MODE
bpy.ops.object.mode_set(mode='OBJECT')
bpy.ops.object.mode_set(mode='OBJECT')
else:
self.report({'WARNING'}, "Active Object must be an Armature")
#---------------
self.report({'WARNING'}, "Active Object must be an Armature")
#---------------
from bpy.props import *
class MESH_OT_chain_maker(bpy.types.Operator):
bl_idname="mesh.primitive_oscurart_chain_add"
bl_label="Oscurart Chain"
bl_options={'REGISTER','UNDO'}
curverig= BoolProperty(name="Curve Rig", default=False)
multiplier= FloatProperty (name="Scale", default=1 , min=0.01, max=100.0)
@classmethod
def poll(cls, context):
return (context.object is not None)
return (context.object is not None)
def execute(self, context):
makeChain(self, context, self.multiplier,self.curverig)
return {'FINISHED'}
def menu_oscChain(self, context):
self.layout.operator("mesh.primitive_oscurart_chain_add",
text="Oscurart Chain",
self.layout.operator("mesh.primitive_oscurart_chain_add",
text="Oscurart Chain",
icon='LINKED')
def register():
bpy.utils.register_module(__name__)
bpy.types.INFO_MT_mesh_add.append(menu_oscChain)
def unregister():
bpy.utils.unregister_module(__name__)
bpy.types.INFO_MT_mesh_add.remove(menu_oscChain)
if __name__ == "__main__":
register()
\ No newline at end of file
register()
\ No newline at end of file
......@@ -21,7 +21,6 @@ bl_info = {
"author": "Oscurart",
"version": (1,1),
"blender": (2, 56, 0),
"api": 3800,
"location": "Add > Curve > Oscurart Rope",
"description": "Create ropes",
"warning": "",
......@@ -37,19 +36,19 @@ import bpy, math
def makeRope (context, DISTPOS, curvaResU, radius, FE, CUERDAS, stResU,DIAMETRO):
def makeRope (context, DISTPOS, curvaResU, radius, FE, CUERDAS, stResU,DIAMETRO):
# CREO DATA , OBJETO Y LO CONECTO A LA ESCENA
crv= bpy.data.curves.new("CurvaCable", "CURVE")
obCable=bpy.data.objects.new("Cable",crv)
bpy.context.scene.objects.link(obCable)
# SETEO ATRIBUTOS
crv.dimensions = "3D"
crv.resolution_u = 10
crv.resolution_v = 10
crv.twist_mode = "MINIMUM"
# LISTA DE COMPONENTES
coordenadas= [
(0,radius,0,radius),
......@@ -57,9 +56,9 @@ def makeRope (context, DISTPOS, curvaResU, radius, FE, CUERDAS, stResU,DIAMETRO)
(0,-radius,0,radius),
(-radius,0,0,radius)
]
# CREO EL SPLINE
spline=crv.splines.new("NURBS")
lencoord= len(coordenadas)
......@@ -69,70 +68,70 @@ def makeRope (context, DISTPOS, curvaResU, radius, FE, CUERDAS, stResU,DIAMETRO)
for punto in rango:
spline.points[punto].co = coordenadas[punto]
#print(punto)
# MODIFICACIONES DE DATA
spline.use_cyclic_u = True
spline.resolution_u = curvaResU
spline.order_u = 3
spline.order_u = 3
spline.use_endpoint_u = True
## ==CREO CADENAS==
## DIVIDO EL RADIO POR LA CANTIDAD DE LINEAS Y SETEO UNA LISTA
GRADOS=[]
VALORPORPARTE=[]
DIVISION=360/CUERDAS
TAJADA=0
for parte in range(0,CUERDAS):
GRADOS.append(TAJADA)
TAJADA+=DIVISION
for GRAD in GRADOS:
# VARIABLES
FC=0
VARLISTVER=[]
VARANGLEY=0
VARANGLEZ=90
VARPOSX=0
EDGEINDEX=0
# DEFINO EL PESO PARA LAS COORDENADAS
WEIGHT = 1
while FC < FE:
## CREA 3 CADENAS EN 0 90 Y 180 GRADOS
while FC < FE:
## CREA 3 CADENAS EN 0 90 Y 180 GRADOS
VARLISTVER.append((VARPOSX, math.sin(math.radians(GRAD))/(1/DIAMETRO) , math.sin(math.radians(GRAD+90))/(1/DIAMETRO),WEIGHT))
GRAD += 30
FC += 1
VARPOSX += DISTPOS
# CREO DATA , OBJETO Y LO CONECTO A LA ESCENA
crv= bpy.data.curves.new("curvaData", "CURVE")
ob=bpy.data.objects.new("Curva",crv)
bpy.context.scene.objects.link(ob)
# SETEO ATRIBUTOS
crv.dimensions = "3D"
crv.resolution_u = 10
crv.resolution_v = 10
crv.twist_mode = "MINIMUM"
# LISTA DE COMPONENTES
coordenadas= VARLISTVER
# CREO EL SPLINE
spline=crv.splines.new("NURBS")
lencoord= len(coordenadas)
......@@ -142,26 +141,26 @@ def makeRope (context, DISTPOS, curvaResU, radius, FE, CUERDAS, stResU,DIAMETRO)
for punto in rango:
spline.points[punto].co = coordenadas[punto]
#print(punto)
# MODIFICACIONES DE DATA
spline.use_cyclic_u = False
spline.resolution_u = stResU
spline.order_u = 3
spline.order_u = 3
spline.use_endpoint_u = True
ob.data.bevel_object= bpy.data.objects["Cable"]
#print(VARLISTVER)
#---------------
#---------------
from bpy.props import *
class OBJECT_OT_add_object(bpy.types.Operator):
bl_idname="curve.primitive_osc_rope_add"
bl_label="Oscurart Rope"
bl_options={'REGISTER','UNDO'}
strands = IntProperty (name="Strands", default=5 , min=1, max=1000, step=1)
diameter = FloatProperty (name="Diameter", default=1 , min=0, max=1000)
distPos= FloatProperty (name="Stretch", default=1 , min=0.01, max=100.0)
......@@ -171,10 +170,10 @@ class OBJECT_OT_add_object(bpy.types.Operator):
radio= FloatProperty (name="Radius", default=1 , min=0, max=1000)
def execute(self, context):
makeRope(context,
makeRope(context,
self.distPos,self.distResU,self.radio,self.vertices,self.strands, self.stResU,self.diameter)
return {'FINISHED'}
# Registration
def oscRopeButton(self, context):
......
......@@ -34,7 +34,7 @@
# 1. Include other shapes: dodecahedron, ...
# 2. Skin option for parabolic shaped clusters
# 3. Skin option for icosahedron
# 4. Icosahedron: unlimited size ...
# 4. Icosahedron: unlimited size ...
#
bl_info = {
......@@ -45,11 +45,11 @@ bl_info = {
"blender": (2, 60, 0),
"location": "Panel: View 3D - Tools (left side)",
"warning": "",
"wiki_url": "http://wiki.blender.org/index.php/Extensions:2.6/Py/Scripts/Add_Mesh/Cluster",
"tracker_url": "http://projects.blender.org/tracker/"
"index.php?func=detail&aid=31618&group_id=153&atid=468",
"category": "Add Mesh"
}
"wiki_url": "http://wiki.blender.org/index.php/Extensions:2.6/Py/"
"Scripts/Add_Mesh/Cluster",
"tracker_url": "https://developer.blender.org/T31618",
"category": "Add Mesh"}
import os
import io
......@@ -93,15 +93,15 @@ class CLASS_atom_cluster_panel(Panel):
@classmethod
def poll(self, context):
global ATOM_Cluster_PANEL
if ATOM_Cluster_PANEL == 0:
return False
return True
def draw(self, context):
layout = self.layout
scn = context.scene.atom_cluster
row = layout.row()
......@@ -129,24 +129,24 @@ class CLASS_atom_cluster_panel(Panel):
row = box.row()
row.prop(scn, "element")
row = box.row()
row.prop(scn, "radius_type")
row.prop(scn, "radius_type")
row = box.row()
row.prop(scn, "scale_radius")
row = box.row()
row.prop(scn, "scale_distances")
row = layout.row()
row.label(text="Load cluster")
box = layout.box()
row = box.row()
row = box.row()
row.operator("atom_cluster.load")
row = box.row()
row.label(text="Number of atoms")
row = box.row()
row.prop(scn, "atom_number_total")