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

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2011-01-11 05:30:01 +0300
committerCampbell Barton <ideasman42@gmail.com>2011-01-11 05:30:01 +0300
commit35e68e97850b00e75a1488a59e7e9b85d240c37f (patch)
treee59a6637d6e5729dfd6f570a73c3aaa918901f9a /release
parentd72639323b5a2ab5dfc26e864c43d512ffb3cd58 (diff)
- bpy.data.lamps.new() now takes a type argument since lamp type also sets class type this avoids needing to use ugly lamp.type_recast() after changing type.
- default vertex color layer name was UTTex when added from python.
Diffstat (limited to 'release')
-rw-r--r--release/scripts/op/io_scene_3ds/import_3ds.py9
-rw-r--r--release/scripts/templates/background_job.py2
2 files changed, 4 insertions, 7 deletions
diff --git a/release/scripts/op/io_scene_3ds/import_3ds.py b/release/scripts/op/io_scene_3ds/import_3ds.py
index 7ffdcd3c853..26093078335 100644
--- a/release/scripts/op/io_scene_3ds/import_3ds.py
+++ b/release/scripts/op/io_scene_3ds/import_3ds.py
@@ -529,13 +529,10 @@ def process_next_chunk(file, previous_chunk, importedObjects, IMAGE_SEARCH):
new_chunk.bytes_read += STRUCT_SIZE_3FLOAT
# no lamp in dict that would be confusing
- ob = bpy.data.objects.new("Lamp", bpy.data.lamps.new("Lamp"))
- SCN.objects.link(ob)
+ contextLamp[1] = bpy.data.lamps.new("Lamp", 'POINT')
+ contextLamp[0] = ob = bpy.data.objects.new("Lamp", contextLamp[1])
- contextLamp[1]= ob.data
-# contextLamp[1]= bpy.data.lamps.new()
- contextLamp[0]= ob
-# contextLamp[0]= SCN_OBJECTS.new(contextLamp[1])
+ SCN.objects.link(ob)
importedObjects.append(contextLamp[0])
#print 'number of faces: ', num_faces
diff --git a/release/scripts/templates/background_job.py b/release/scripts/templates/background_job.py
index 5705e8ef53e..bf29de63830 100644
--- a/release/scripts/templates/background_job.py
+++ b/release/scripts/templates/background_job.py
@@ -34,7 +34,7 @@ def example_function(body_text, save_path, render_path):
cam_ob.location = 0.0, 0.0, 10.0
# Lamp
- lamp_data = bpy.data.lamps.new("MyLamp")
+ lamp_data = bpy.data.lamps.new("MyLamp", 'POINT')
lamp_ob = bpy.data.objects.new(name="MyCam", object_data=lamp_data)
scene.objects.link(lamp_ob)
lamp_ob.location = 2.0, 2.0, 5.0