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

git.blender.org/blender-addons.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2015-10-24 06:49:09 +0300
committerCampbell Barton <ideasman42@gmail.com>2015-10-24 06:49:09 +0300
commit22602daa3df7fc4ee18d80475269dc3e9d1b082b (patch)
treeae2d690ec9d7647bfdaabb7dd018c84cf16c8ae3 /io_scene_x3d/import_x3d.py
parentf780885f119d5986366425ba62f77774ebedb8d8 (diff)
X3D: Don't write line-no into objects by default
This is handy for debugging, not general use. so only do this when DEBUG is set. Also use a custom property instead of registering RNA.
Diffstat (limited to 'io_scene_x3d/import_x3d.py')
-rw-r--r--io_scene_x3d/import_x3d.py10
1 files changed, 3 insertions, 7 deletions
diff --git a/io_scene_x3d/import_x3d.py b/io_scene_x3d/import_x3d.py
index 2af00882..c67eba93 100644
--- a/io_scene_x3d/import_x3d.py
+++ b/io_scene_x3d/import_x3d.py
@@ -3024,10 +3024,12 @@ def importShape_ProcessObject(vrmlname, bpydata, geom, geom_spec, node,
# the data
# bpymesh.transform(getFinalMatrix(node))
bpyob = node.blendObject = bpy.data.objects.new(vrmlname, bpydata)
- bpyob.source_line_no = geom.lineno
bpyob.matrix_world = getFinalMatrix(node, None, ancestry, global_matrix)
bpy.context.scene.objects.link(bpyob).select = True
+ if DEBUG:
+ bpyob["source_line_no"] = geom.lineno
+
def importText(geom, ancestry, bpyima):
fmt = geom.getChildBySpec('FontStyle')
@@ -3454,12 +3456,6 @@ def load_web3d(path,
# Used when adding blender primitives
GLOBALS['CIRCLE_DETAIL'] = PREF_CIRCLE_DIV
- # Enable custom property for source line number
- if not hasattr(bpy.types.Object, "source_line_no"):
- bpy.types.Object.source_line_no = bpy.props.IntProperty(
- name="Source Line #",
- description="Node position in the source X3D/VRML file")
-
#root_node = vrml_parse('/_Cylinder.wrl')
if path.lower().endswith('.x3d'):
root_node, msg = x3d_parse(path)