[Bf-extensions-cvs] SVN commit: /data/svn/bf-extensions [3968] contrib/py/scripts/addons/ io_scene_ms3d: fix: string issues
Alexander Nussbaumer
alpha-beta-release at gmx.net
Wed Nov 14 23:39:48 CET 2012
Revision: 3968
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-extensions&revision=3968
Author: beta-tester
Date: 2012-11-14 22:39:45 +0000 (Wed, 14 Nov 2012)
Log Message:
-----------
fix: string issues
Modified Paths:
--------------
contrib/py/scripts/addons/io_scene_ms3d/__init__.py
contrib/py/scripts/addons/io_scene_ms3d/ms3d_export.py
contrib/py/scripts/addons/io_scene_ms3d/ms3d_import.py
contrib/py/scripts/addons/io_scene_ms3d/ms3d_ui.py
Modified: contrib/py/scripts/addons/io_scene_ms3d/__init__.py
===================================================================
--- contrib/py/scripts/addons/io_scene_ms3d/__init__.py 2012-11-14 20:42:52 UTC (rev 3967)
+++ contrib/py/scripts/addons/io_scene_ms3d/__init__.py 2012-11-14 22:39:45 UTC (rev 3968)
@@ -23,7 +23,7 @@
'description': "Import / Export MilkShape3D MS3D files"\
" (conform with v1.8.4)",
'author': "Alexander Nussbaumer",
- 'version': (0, 4, 9, 0),
+ 'version': (0, 4, 9, 1),
'blender': (2, 6, 3, 0),
'location': "File > Import & File > Export",
#'warning': "[2012-11-14] exporter is working (without animation)",
Modified: contrib/py/scripts/addons/io_scene_ms3d/ms3d_export.py
===================================================================
--- contrib/py/scripts/addons/io_scene_ms3d/ms3d_export.py 2012-11-14 20:42:52 UTC (rev 3967)
+++ contrib/py/scripts/addons/io_scene_ms3d/ms3d_export.py 2012-11-14 22:39:45 UTC (rev 3968)
@@ -516,8 +516,8 @@
if ms3d_material.__index < 0 or ms3d_material.__index >= len(ms3d_model.materials):
return None
- markerName = "MaterialGroup." + ms3d_material.__index
- markerComment = "material group conflict dissolver (" + ms3d_material.name + ")"
+ markerName = "MaterialGroup.{}".format(ms3d_material.__index)
+ markerComment = "material group conflict dissolver ({})".format(ms3d_material.name)
for ms3d_group in ms3d_model._groups:
if ms3d_group.name == markerName and ms3d_group._comment_object and ms3d_group._comment_object.comment == markerComment:
@@ -529,7 +529,7 @@
ms3d_group._comment_object = Ms3dCommentEx()
ms3d_group._comment_object.comment = markerComment
ms3d_group._comment_object.index = len(ms3d_model._groups)
- ms3d_group.material_index = ms3d_material_index
+ ms3d_group.material_index = ms3d_material.__index
ms3d_model._groups.append(ms3d_group)
Modified: contrib/py/scripts/addons/io_scene_ms3d/ms3d_import.py
===================================================================
--- contrib/py/scripts/addons/io_scene_ms3d/ms3d_import.py 2012-11-14 20:42:52 UTC (rev 3967)
+++ contrib/py/scripts/addons/io_scene_ms3d/ms3d_import.py 2012-11-14 22:39:45 UTC (rev 3968)
@@ -234,9 +234,9 @@
blender_scene = blender_context.scene
blender_group = blender_context.blend_data.groups.new(
- ms3d_model.name + ".g")
+ "{}.g".format(ms3d_model.name))
blender_empty_object = blender_context.blend_data.objects.new(
- ms3d_model.name + ".e", None)
+ "{}.e".format(ms3d_model.name), None)
blender_empty_object.location = blender_scene.cursor_location
blender_scene.objects.link(blender_empty_object)
blender_group.objects.link(blender_empty_object)
@@ -253,7 +253,7 @@
# blender stuff:
# create a blender Mesh
blender_mesh = blender_context.blend_data.meshes.new(
- ms3d_model.name + ".m")
+ "{}.m".format(ms3d_model.name))
blender_mesh.ms3d.name = ms3d_model.name
ms3d_comment = ms3d_model.comment_object
@@ -271,7 +271,7 @@
# blender stuff:
# link to blender object
blender_mesh_object = blender_context.blend_data.objects.new(
- ms3d_model.name + ".m", blender_mesh)
+ "{}.m".format(ms3d_model.name), blender_mesh)
##########################
# blender stuff:
@@ -590,8 +590,8 @@
return
##########################
- ms3d_armature_name = ms3d_model.name + ".a"
- ms3d_action_name = ms3d_model.name + ".act"
+ ms3d_armature_name = "{}.a".format(ms3d_model.name)
+ ms3d_action_name = "{}.act".format(ms3d_model.name)
##########################
# create new blender_armature_object
Modified: contrib/py/scripts/addons/io_scene_ms3d/ms3d_ui.py
===================================================================
--- contrib/py/scripts/addons/io_scene_ms3d/ms3d_ui.py 2012-11-14 20:42:52 UTC (rev 3967)
+++ contrib/py/scripts/addons/io_scene_ms3d/ms3d_ui.py 2012-11-14 22:39:45 UTC (rev 3968)
@@ -514,6 +514,7 @@
##EXPORT_ACTIVE_ONLY:
##box.prop(self, 'prop_selected', icon='ROTACTIVE')
box.label(ms3d_str['PROP_NAME_ACTIVE'], icon='ROTACTIVE')
+ box.box().label(context.active_object.name)
##
"""
More information about the Bf-extensions-cvs
mailing list