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:
Diffstat (limited to 'io_scene_x3d/import_x3d.py')
-rw-r--r--io_scene_x3d/import_x3d.py48
1 files changed, 24 insertions, 24 deletions
diff --git a/io_scene_x3d/import_x3d.py b/io_scene_x3d/import_x3d.py
index 84f46fa2..896e4793 100644
--- a/io_scene_x3d/import_x3d.py
+++ b/io_scene_x3d/import_x3d.py
@@ -55,9 +55,9 @@ def imageConvertCompat(path):
# =============================== VRML Spesific
def vrmlFormat(data):
- '''
+ """
Keep this as a valid vrml file, but format in a way we can predict.
- '''
+ """
# Strip all commends - # not in strings - warning multiline strings are ignored.
def strip_comment(l):
#l = ' '.join(l.split())
@@ -270,9 +270,9 @@ def is_nodeline(i, words):
def is_numline(i):
- '''
+ """
Does this line start with a number?
- '''
+ """
# Works but too slow.
'''
@@ -490,7 +490,7 @@ class vrmlNode(object):
return child
def getSerialized(self, results, ancestry):
- ''' Return this node and all its children in a flat list '''
+ """ Return this node and all its children in a flat list """
ancestry = ancestry[:] # always use a copy
# self_real = self.getRealNode()
@@ -720,9 +720,9 @@ class vrmlNode(object):
return default
def getFieldAsArray(self, field, group, ancestry):
- '''
+ """
For this parser arrays are children
- '''
+ """
def array_as_number(array_string):
array_data = []
@@ -813,9 +813,9 @@ class vrmlNode(object):
return new_array
def getFieldAsStringArray(self, field, ancestry):
- '''
+ """
Get a list of strings
- '''
+ """
self_real = self.getRealNode() # in case we're an instance
child_array = None
@@ -1181,10 +1181,10 @@ class vrmlNode(object):
return False
def split_fields(value):
- '''
+ """
key 0.0 otherkey 1,2,3 opt1 opt1 0.0
-> [key 0.0], [otherkey 1,2,3], [opt1 opt1 0.0]
- '''
+ """
field_list = []
field_context = []
@@ -1243,10 +1243,10 @@ def gzipOpen(path):
def vrml_parse(path):
- '''
+ """
Sets up the root node and returns it so load_web3d() can deal with the blender side of things.
Return root (vrmlNode, '') or (None, 'Error String')
- '''
+ """
data = gzipOpen(path)
if data is None:
@@ -1358,10 +1358,10 @@ class x3dNode(vrmlNode):
def x3d_parse(path):
- '''
+ """
Sets up the root node and returns it so load_web3d() can deal with the blender side of things.
Return root (x3dNode, '') or (None, 'Error String')
- '''
+ """
try:
import xml.dom.minidom
@@ -1422,7 +1422,7 @@ GLOBALS = {'CIRCLE_DETAIL': 16}
def translateRotation(rot):
- ''' axis, angle '''
+ """ axis, angle """
return Matrix.Rotation(rot[3], 4, Vector(rot[:3]))
@@ -1707,14 +1707,14 @@ def importMesh_IndexedFaceSet(geom, bpyima, ancestry):
# we have to create VRML's coords as UVs instead.
# VRML docs
- '''
+ """
If the texCoord field is NULL, a default texture coordinate mapping is calculated using the local
coordinate system bounding box of the shape. The longest dimension of the bounding box defines the S coordinates,
and the next longest defines the T coordinates. If two or all three dimensions of the bounding box are equal,
ties shall be broken by choosing the X, Y, or Z dimension in that order of preference.
The value of the S coordinate ranges from 0 to 1, from one end of the bounding box to the other.
The T coordinate ranges between 0 and the ratio of the second greatest dimension of the bounding box to the greatest dimension.
- '''
+ """
# Note, S,T == U,V
# U gets longest, V gets second longest
@@ -2422,10 +2422,10 @@ def translateScalarInterpolator(node, action, ancestry):
def translateTimeSensor(node, action, ancestry):
- '''
+ """
Apply a time sensor to an action, VRML has many combinations of loop/start/stop/cycle times
to give different results, for now just do the basics
- '''
+ """
# XXX25 TODO
if 1:
@@ -2452,9 +2452,9 @@ def translateTimeSensor(node, action, ancestry):
def importRoute(node, ancestry):
- '''
+ """
Animation route only at the moment
- '''
+ """
if not hasattr(node, 'fields'):
return
@@ -2470,7 +2470,7 @@ def importRoute(node, ancestry):
# for getting definitions
defDict = node.getDefDict()
- '''
+ """
Handles routing nodes to eachother
ROUTE vpPI.value_changed TO champFly001.set_position
@@ -2478,7 +2478,7 @@ ROUTE vpOI.value_changed TO champFly001.set_orientation
ROUTE vpTs.fraction_changed TO vpPI.set_fraction
ROUTE vpTs.fraction_changed TO vpOI.set_fraction
ROUTE champFly001.bindTime TO vpTs.set_startTime
- '''
+ """
#from_id, from_type = node.id[1].split('.')
#to_id, to_type = node.id[3].split('.')