[Bf-extensions-cvs] SVN commit: /data/svn/bf-extensions [921] trunk/py/scripts/addons: updates for blender api changes
Campbell Barton
ideasman42 at gmail.com
Wed Aug 18 11:25:05 CEST 2010
Revision: 921
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-extensions&revision=921
Author: campbellbarton
Date: 2010-08-18 11:25:04 +0200 (Wed, 18 Aug 2010)
Log Message:
-----------
updates for blender api changes
Modified Paths:
--------------
trunk/py/scripts/addons/io_import_scene_mhx.py
trunk/py/scripts/addons/object_cloud_gen.py
trunk/py/scripts/addons/object_fracture/fracture_setup.py
Modified: trunk/py/scripts/addons/io_import_scene_mhx.py
===================================================================
--- trunk/py/scripts/addons/io_import_scene_mhx.py 2010-08-18 07:14:32 UTC (rev 920)
+++ trunk/py/scripts/addons/io_import_scene_mhx.py 2010-08-18 09:25:04 UTC (rev 921)
@@ -622,8 +622,8 @@
def parseKeyFramePoint(pt, args, tokens):
pt.co = (float(args[0]), float(args[1]))
if len(args) > 2:
- pt.handle1 = (float(args[2]), float(args[3]))
- pt.handle2 = (float(args[3]), float(args[5]))
+ pt.handle_left = (float(args[2]), float(args[3]))
+ pt.handle_right = (float(args[3]), float(args[5]))
return pt
#
@@ -909,7 +909,7 @@
return None
img.name = imgName
else:
- defaultKey(key, val, sub, "img", ['depth', 'dirty', 'has_data', 'size', 'type'], globals(), locals())
+ defaultKey(key, val, sub, "img", ['depth', 'is_dirty', 'has_data', 'size', 'type'], globals(), locals())
print ("Image %s" % img )
loadedData['Image'][imgName] = img
return img
@@ -1055,7 +1055,7 @@
n = 0
for (key, val, sub) in tokens:
if key == 'h':
- h = par.hair[n]
+ h = par.is_hair[n]
h.location = eval(val[0])
h.time = int(val[1])
h.weight = float(val[2])
@@ -1615,7 +1615,7 @@
var.targets[0].bone_target = bone
var.targets[0].transform_type = 'LOC_X'
# controller_path = fk_chain.arm_p.path_to_id()
- #var.targets[0].data_path = controller_path + '["hinge"]'
+ #var.targets[0].data_path = controller_path + '["use_hinge"]'
mod = fcurve.modifiers[0]
mod.poly_order = 2
@@ -1680,10 +1680,10 @@
def parseBezier(nurb, n, args, tokens):
bez = nurb[n]
bez.co = eval(args[0])
- bez.handle1 = eval(args[1])
- bez.handle1_type = args[2]
- bez.handle2 = eval(args[3])
- bez.handle2_type = args[4]
+ bez.handle_left = eval(args[1])
+ bez.handle_left_type = args[2]
+ bez.handle_right = eval(args[3])
+ bez.handle_right_type = args[4]
return
def parsePoint(nurb, n, args, tokens):
@@ -1853,7 +1853,7 @@
for (bname, pname) in parents.items():
eb = ebones[bname]
par = ebones[pname]
- if eb.connected:
+ if eb.use_connect:
par.tail = eb.head
eb.parent = par
bpy.ops.object.mode_set(mode='OBJECT')
Modified: trunk/py/scripts/addons/object_cloud_gen.py
===================================================================
--- trunk/py/scripts/addons/object_cloud_gen.py 2010-08-18 07:14:32 UTC (rev 920)
+++ trunk/py/scripts/addons/object_cloud_gen.py 2010-08-18 09:25:04 UTC (rev 921)
@@ -535,10 +535,10 @@
vMaterialTextureSlots[1].map_density = True
vMaterialTextureSlots[1].rgb_to_intensity = True
vMaterialTextureSlots[1].texture_coordinates = 'GLOBAL'
- pDensity.pointdensity.vertices_cache = 'WORLD_SPACE'
- pDensity.pointdensity.turbulence = True
- pDensity.pointdensity.noise_basis = 'VORONOI_F2'
- pDensity.pointdensity.turbulence_depth = 3
+ pDensity.point_density.vertices_cache = 'WORLD_SPACE'
+ pDensity.point_density.turbulence = True
+ pDensity.point_density.noise_basis = 'VORONOI_F2'
+ pDensity.point_density.turbulence_depth = 3
pDensity.use_color_ramp = True
pRamp = pDensity.color_ramp
@@ -562,7 +562,7 @@
# of bounds.
cloudParticles.settings.amount = numParticles
- pDensity.pointdensity.radius = (.00013764 * volumeBoundBox + .3989) * pointDensityRadiusFactor
+ pDensity.point_density.radius = (.00013764 * volumeBoundBox + .3989) * pointDensityRadiusFactor
# Set time to 1.
scene.frame_current = 1
@@ -612,8 +612,8 @@
# Apply modifier
bpy.ops.object.modifier_apply(apply_as='DATA', modifier=cldPntsModifiers[0].name)
- pDensity.pointdensity.point_source = 'OBJECT'
- pDensity.pointdensity.object = cloudPnts
+ pDensity.point_density.point_source = 'OBJECT'
+ pDensity.point_density.object = cloudPnts
# Deselect All
bpy.ops.object.select_all(action='DESELECT')
@@ -629,22 +629,22 @@
else:
- pDensity.pointdensity.point_source = 'PARTICLE_SYSTEM'
- pDensity.pointdensity.object = cloud
- pDensity.pointdensity.particle_system = cloudParticles
+ pDensity.point_density.point_source = 'PARTICLE_SYSTEM'
+ pDensity.point_density.object = cloud
+ pDensity.point_density.particle_system = cloudParticles
if scene.cloud_type == '1': # Cumulous
print("Cumulous")
mVolume.density_scale = 2.22
- pDensity.pointdensity.turbulence_depth = 10
- pDensity.pointdensity.turbulence_strength = 6.3
- pDensity.pointdensity.turbulence_size = 2.9
+ pDensity.point_density.turbulence_depth = 10
+ pDensity.point_density.turbulence_strength = 6.3
+ pDensity.point_density.turbulence_size = 2.9
pRampElements[1].position = .606
- pDensity.pointdensity.radius = pDensity.pointdensity.radius + .1
+ pDensity.point_density.radius = pDensity.point_density.radius + .1
elif scene.cloud_type == '2': # Cirrus
print("Cirrus")
- pDensity.pointdensity.turbulence_strength = 22
+ pDensity.point_density.turbulence_strength = 22
mVolume.transmission_color = [3.5, 3.5, 3.5]
mVolume.scattering = .13
Modified: trunk/py/scripts/addons/object_fracture/fracture_setup.py
===================================================================
--- trunk/py/scripts/addons/object_fracture/fracture_setup.py 2010-08-18 07:14:32 UTC (rev 920)
+++ trunk/py/scripts/addons/object_fracture/fracture_setup.py 2010-08-18 09:25:04 UTC (rev 921)
@@ -31,7 +31,7 @@
def setupshards(context):
sce = context.scene
#print(dir(context))
- #bpy.data.scenes[0].game_data.all_frames
+ #bpy.data.scenes[0].game_settings.all_frames
tobeprocessed = []
for ob in sce.objects:
More information about the Bf-extensions-cvs
mailing list