[Bf-extensions-cvs] SVN commit: /data/svn/bf-extensions [4714] contrib/py/scripts/addons/ io_scene_fpx: fix some curve texture handling + modified some models ( thickness e.g.
Alexander N.
alpha-beta-release at gmx.net
Sat Aug 31 08:30:49 CEST 2013
Revision: 4714
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-extensions&revision=4714
Author: beta-tester
Date: 2013-08-31 06:30:48 +0000 (Sat, 31 Aug 2013)
Log Message:
-----------
fix some curve texture handling + modified some models (thickness e.g. of bulb)
Modified Paths:
--------------
contrib/py/scripts/addons/io_scene_fpx/__init__.py
contrib/py/scripts/addons/io_scene_fpx/fpx_import.py
contrib/py/scripts/addons/io_scene_fpx/fpx_resource.blend
Modified: contrib/py/scripts/addons/io_scene_fpx/__init__.py
===================================================================
--- contrib/py/scripts/addons/io_scene_fpx/__init__.py 2013-08-31 03:40:49 UTC (rev 4713)
+++ contrib/py/scripts/addons/io_scene_fpx/__init__.py 2013-08-31 06:30:48 UTC (rev 4714)
@@ -34,7 +34,7 @@
'name': "Future Pinball FPx format (.fpm/.fpl/.fpt)",
'description': "Import Future Pinball Model, Library and Table files",
'author': "Alexander Nussbaumer",
- 'version': (0, 0, 0, '2013-08-28'),
+ 'version': (0, 0, 0, '2013-08-30'),
'blender': (2, 68, 0),
'location': "File > Import",
'warning': "",
Modified: contrib/py/scripts/addons/io_scene_fpx/fpx_import.py
===================================================================
--- contrib/py/scripts/addons/io_scene_fpx/fpx_import.py 2013-08-31 03:40:49 UTC (rev 4713)
+++ contrib/py/scripts/addons/io_scene_fpx/fpx_import.py 2013-08-31 06:30:48 UTC (rev 4714)
@@ -143,6 +143,7 @@
#DEFAULT_LAMP_TEXTURE = "{1}.rsrc_bmp_254.i"
DEFAULT_LAMP_TEXTURE = "rsrc_bmp_254"
+DEFAULT_LAMP_TEXTURE = "rsrc_bmp_290"
TRANSLITE_OBJECT = 2
###############################################################################
@@ -1391,16 +1392,7 @@
transparency = fpx_item.get_value("transparency")
obj, cu, act_spline = self.create_curve(name, layers, self.resolution_shape)
- if texture and not sphere_map_the_top:
- self.append_texture_material(obj, texture)
- elif transparency:
- self.append_christal_material(obj)
- if cookie_cut:
- cu.use_auto_texspace = False
- cu.texspace_location = Vector((self.__table_width / 2.0, self.__table_length / 2.0, 0))
- cu.texspace_size = Vector((self.__table_width / 2.0, self.__table_length / 2.0, 0))
-
modifier_edge_split = obj.modifiers.new("edge_split", type='EDGE_SPLIT')
if top is None:
@@ -1414,6 +1406,21 @@
self.create_curve_points(act_spline, fpx_points)
obj.location = Vector((obj.location.x, obj.location.y, (top - cu.extrude)))
+ if texture and not sphere_map_the_top:
+ self.append_texture_material(obj, texture)
+ elif transparency:
+ self.append_christal_material(obj)
+
+ if cookie_cut:
+ cu.use_auto_texspace = False
+ cu.texspace_location = Vector((self.__table_width / 2.0, self.__table_length / 2.0, 0))
+ cu.texspace_size = Vector((self.__table_width / 2.0, self.__table_length / 2.0, 0))
+ else:
+ cu.use_auto_texspace = False
+ self.__context.scene.update()
+ cu.texspace_location = Vector(obj.bound_box[0]) + (obj.dimensions / 2.0)
+ cu.texspace_size = Vector(obj.dimensions / 2.0)
+
return obj
def CreateRubberShapeable(self, fpx_item, name, layers, fpx_points, surface):
@@ -1557,12 +1564,6 @@
sphere_map_the_top = fpx_item.get_value("sphere_map_the_top")
obj, cu, act_spline = self.create_curve(name, layers, self.resolution_shape)
- if texture and not sphere_map_the_top:
- self.append_texture_material(obj, texture)
- if cookie_cut:
- cu.use_auto_texspace = False
- cu.texspace_location = Vector((self.__table_width / 2.0, self.__table_length / 2.0, 0))
- cu.texspace_size = Vector((self.__table_width / 2.0, self.__table_length / 2.0, 0))
modifier_solidify = obj.modifiers.new("width", type='SOLIDIFY')
modifier_solidify.thickness = width
@@ -1580,6 +1581,19 @@
self.create_curve_points(act_spline, fpx_points)
obj.location = Vector((obj.location.x, obj.location.y, (surface + cu.extrude)))
+
+ if texture and not sphere_map_the_top:
+ self.append_texture_material(obj, texture)
+ if cookie_cut:
+ cu.use_auto_texspace = False
+ cu.texspace_location = Vector((self.__table_width / 2.0, self.__table_length / 2.0, 0))
+ cu.texspace_size = Vector((self.__table_width / 2.0, self.__table_length / 2.0, 0))
+ else:
+ cu.use_auto_texspace = False
+ self.__context.scene.update()
+ cu.texspace_location = Vector(obj.bound_box[0]) + (obj.dimensions / 2.0)
+ cu.texspace_size = Vector(obj.dimensions / 2.0)
+
return obj
def CreateLightRound(self, fpx_item, name, layers, position_xy, surface):
@@ -1620,6 +1634,11 @@
cu.use_auto_texspace = False
cu.texspace_location = Vector((self.__table_width / 2.0, self.__table_length / 2.0, 0))
cu.texspace_size = Vector((self.__table_width / 2.0, self.__table_length / 2.0, 0))
+ else:
+ cu.use_auto_texspace = False
+ self.__context.scene.update()
+ cu.texspace_location = Vector(obj.bound_box[0]) + (obj.dimensions / 2.0)
+ cu.texspace_size = Vector(obj.dimensions / 2.0)
else:
self.append_texture_material(obj, DEFAULT_LAMP_TEXTURE, light_on=True)
cu.use_auto_texspace = False
@@ -1653,6 +1672,11 @@
cu.use_auto_texspace = False
cu.texspace_location = Vector((self.__table_width / 2.0, self.__table_length / 2.0, 0))
cu.texspace_size = Vector((self.__table_width / 2.0, self.__table_length / 2.0, 0))
+ else:
+ cu.use_auto_texspace = False
+ self.__context.scene.update()
+ cu.texspace_location = Vector(obj.bound_box[0]) + (obj.dimensions / 2.0)
+ cu.texspace_size = Vector(obj.dimensions / 2.0)
else:
self.append_texture_material(obj, DEFAULT_LAMP_TEXTURE, light_on=True)
cu.use_auto_texspace = False
Modified: contrib/py/scripts/addons/io_scene_fpx/fpx_resource.blend
===================================================================
(Binary files differ)
More information about the Bf-extensions-cvs
mailing list