[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [21002] branches/soc-2009-yukishiro: merge from 20928 to 21001
Jingyuan Huang
jingyuan.huang at gmail.com
Fri Jun 19 07:43:08 CEST 2009
Revision: 21002
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=21002
Author: yukishiro
Date: 2009-06-19 07:43:08 +0200 (Fri, 19 Jun 2009)
Log Message:
-----------
merge from 20928 to 21001
Modified Paths:
--------------
branches/soc-2009-yukishiro/SConstruct
branches/soc-2009-yukishiro/projectfiles_vc9/blender/nodes/nodes.vcproj
branches/soc-2009-yukishiro/release/scripts/bpymodules/dxfLibrary.py
branches/soc-2009-yukishiro/release/ui/buttons_data_armature.py
branches/soc-2009-yukishiro/release/ui/buttons_data_camera.py
branches/soc-2009-yukishiro/release/ui/buttons_data_curve.py
branches/soc-2009-yukishiro/release/ui/buttons_data_empty.py
branches/soc-2009-yukishiro/release/ui/buttons_data_lamp.py
branches/soc-2009-yukishiro/release/ui/buttons_data_lattice.py
branches/soc-2009-yukishiro/release/ui/buttons_data_mesh.py
branches/soc-2009-yukishiro/release/ui/buttons_data_text.py
branches/soc-2009-yukishiro/release/ui/buttons_material.py
branches/soc-2009-yukishiro/release/ui/buttons_physic_cloth.py
branches/soc-2009-yukishiro/release/ui/buttons_texture.py
branches/soc-2009-yukishiro/release/ui/buttons_world.py
branches/soc-2009-yukishiro/source/Makefile
branches/soc-2009-yukishiro/source/blender/blenfont/intern/blf_font.c
branches/soc-2009-yukishiro/source/blender/blenkernel/BKE_modifier.h
branches/soc-2009-yukishiro/source/blender/blenkernel/BKE_node.h
branches/soc-2009-yukishiro/source/blender/blenkernel/intern/BME_tools.c
branches/soc-2009-yukishiro/source/blender/blenkernel/intern/DerivedMesh.c
branches/soc-2009-yukishiro/source/blender/blenkernel/intern/action.c
branches/soc-2009-yukishiro/source/blender/blenkernel/intern/modifier.c
branches/soc-2009-yukishiro/source/blender/blenkernel/intern/node.c
branches/soc-2009-yukishiro/source/blender/blenkernel/intern/particle.c
branches/soc-2009-yukishiro/source/blender/blenkernel/intern/particle_system.c
branches/soc-2009-yukishiro/source/blender/blenkernel/intern/sequence.c
branches/soc-2009-yukishiro/source/blender/blenloader/intern/readfile.c
branches/soc-2009-yukishiro/source/blender/blenloader/intern/writefile.c
branches/soc-2009-yukishiro/source/blender/editors/Makefile
branches/soc-2009-yukishiro/source/blender/editors/SConscript
branches/soc-2009-yukishiro/source/blender/editors/include/ED_screen.h
branches/soc-2009-yukishiro/source/blender/editors/include/ED_space_api.h
branches/soc-2009-yukishiro/source/blender/editors/interface/interface.c
branches/soc-2009-yukishiro/source/blender/editors/interface/interface_handlers.c
branches/soc-2009-yukishiro/source/blender/editors/interface/interface_intern.h
branches/soc-2009-yukishiro/source/blender/editors/interface/interface_widgets.c
branches/soc-2009-yukishiro/source/blender/editors/interface/resources.c
branches/soc-2009-yukishiro/source/blender/editors/mesh/editmesh_lib.c
branches/soc-2009-yukishiro/source/blender/editors/mesh/editmesh_tools.c
branches/soc-2009-yukishiro/source/blender/editors/mesh/mesh_intern.h
branches/soc-2009-yukishiro/source/blender/editors/screen/area.c
branches/soc-2009-yukishiro/source/blender/editors/screen/screen_ops.c
branches/soc-2009-yukishiro/source/blender/editors/space_api/spacetypes.c
branches/soc-2009-yukishiro/source/blender/editors/space_buttons/buttons_context.c
branches/soc-2009-yukishiro/source/blender/editors/space_script/space_script.c
branches/soc-2009-yukishiro/source/blender/editors/space_sequencer/sequencer_draw.c
branches/soc-2009-yukishiro/source/blender/gpu/intern/gpu_extensions.c
branches/soc-2009-yukishiro/source/blender/gpu/intern/gpu_material.c
branches/soc-2009-yukishiro/source/blender/imbuf/intern/radiance_hdr.c
branches/soc-2009-yukishiro/source/blender/makesdna/DNA_sequence_types.h
branches/soc-2009-yukishiro/source/blender/makesdna/DNA_space_types.h
branches/soc-2009-yukishiro/source/blender/makesdna/DNA_userdef_types.h
branches/soc-2009-yukishiro/source/blender/makesrna/RNA_access.h
branches/soc-2009-yukishiro/source/blender/makesrna/RNA_define.h
branches/soc-2009-yukishiro/source/blender/makesrna/RNA_types.h
branches/soc-2009-yukishiro/source/blender/makesrna/intern/CMakeLists.txt
branches/soc-2009-yukishiro/source/blender/makesrna/intern/Makefile
branches/soc-2009-yukishiro/source/blender/makesrna/intern/SConscript
branches/soc-2009-yukishiro/source/blender/makesrna/intern/makesrna.c
branches/soc-2009-yukishiro/source/blender/makesrna/intern/rna_ID.c
branches/soc-2009-yukishiro/source/blender/makesrna/intern/rna_access.c
branches/soc-2009-yukishiro/source/blender/makesrna/intern/rna_cloth.c
branches/soc-2009-yukishiro/source/blender/makesrna/intern/rna_color.c
branches/soc-2009-yukishiro/source/blender/makesrna/intern/rna_curve.c
branches/soc-2009-yukishiro/source/blender/makesrna/intern/rna_define.c
branches/soc-2009-yukishiro/source/blender/makesrna/intern/rna_group.c
branches/soc-2009-yukishiro/source/blender/makesrna/intern/rna_internal.h
branches/soc-2009-yukishiro/source/blender/makesrna/intern/rna_internal_types.h
branches/soc-2009-yukishiro/source/blender/makesrna/intern/rna_key.c
branches/soc-2009-yukishiro/source/blender/makesrna/intern/rna_lattice.c
branches/soc-2009-yukishiro/source/blender/makesrna/intern/rna_main.c
branches/soc-2009-yukishiro/source/blender/makesrna/intern/rna_material.c
branches/soc-2009-yukishiro/source/blender/makesrna/intern/rna_mesh.c
branches/soc-2009-yukishiro/source/blender/makesrna/intern/rna_modifier.c
branches/soc-2009-yukishiro/source/blender/makesrna/intern/rna_object.c
branches/soc-2009-yukishiro/source/blender/makesrna/intern/rna_rna.c
branches/soc-2009-yukishiro/source/blender/makesrna/intern/rna_scene.c
branches/soc-2009-yukishiro/source/blender/makesrna/intern/rna_sequence.c
branches/soc-2009-yukishiro/source/blender/makesrna/intern/rna_space.c
branches/soc-2009-yukishiro/source/blender/makesrna/intern/rna_userdef.c
branches/soc-2009-yukishiro/source/blender/makesrna/intern/rna_wm.c
branches/soc-2009-yukishiro/source/blender/nodes/TEX_node.h
branches/soc-2009-yukishiro/source/blender/python/CMakeLists.txt
branches/soc-2009-yukishiro/source/blender/python/Makefile
branches/soc-2009-yukishiro/source/blender/python/SConscript
branches/soc-2009-yukishiro/source/blender/python/intern/Makefile
branches/soc-2009-yukishiro/source/blender/python/intern/bpy_compat.h
branches/soc-2009-yukishiro/source/blender/python/intern/bpy_interface.c
branches/soc-2009-yukishiro/source/blender/python/intern/bpy_operator_wrap.c
branches/soc-2009-yukishiro/source/blender/python/intern/bpy_rna.c
branches/soc-2009-yukishiro/source/blender/python/intern/bpy_rna.h
branches/soc-2009-yukishiro/source/blender/python/intern/bpy_util.c
branches/soc-2009-yukishiro/source/blender/render/intern/source/texture.c
branches/soc-2009-yukishiro/source/blender/windowmanager/intern/wm_cursors.c
branches/soc-2009-yukishiro/source/creator/CMakeLists.txt
branches/soc-2009-yukishiro/source/gameengine/Converter/BL_ActionActuator.cpp
branches/soc-2009-yukishiro/source/gameengine/Converter/BL_ActionActuator.h
branches/soc-2009-yukishiro/source/gameengine/Converter/BL_ArmatureObject.cpp
branches/soc-2009-yukishiro/source/gameengine/Converter/BL_ArmatureObject.h
branches/soc-2009-yukishiro/source/gameengine/Converter/BL_BlenderDataConversion.cpp
branches/soc-2009-yukishiro/source/gameengine/Converter/CMakeLists.txt
branches/soc-2009-yukishiro/source/gameengine/Converter/KX_BlenderScalarInterpolator.cpp
branches/soc-2009-yukishiro/source/gameengine/Converter/Makefile
branches/soc-2009-yukishiro/source/gameengine/Converter/SConscript
branches/soc-2009-yukishiro/source/gameengine/Expressions/InputParser.cpp
branches/soc-2009-yukishiro/source/gameengine/Expressions/ListValue.cpp
branches/soc-2009-yukishiro/source/gameengine/Expressions/SConscript
branches/soc-2009-yukishiro/source/gameengine/Expressions/Value.cpp
branches/soc-2009-yukishiro/source/gameengine/Ketsji/CMakeLists.txt
branches/soc-2009-yukishiro/source/gameengine/Ketsji/KX_PyConstraintBinding.cpp
branches/soc-2009-yukishiro/source/gameengine/Ketsji/KX_PythonInit.cpp
branches/soc-2009-yukishiro/source/gameengine/Ketsji/KX_PythonSeq.cpp
branches/soc-2009-yukishiro/source/gameengine/Ketsji/Makefile
branches/soc-2009-yukishiro/source/gameengine/Ketsji/SConscript
branches/soc-2009-yukishiro/source/gameengine/Physics/Bullet/CcdPhysicsController.cpp
branches/soc-2009-yukishiro/source/gameengine/PyDoc/API_intro.py
branches/soc-2009-yukishiro/source/gameengine/PyDoc/GameLogic.py
branches/soc-2009-yukishiro/source/gameengine/PyDoc/GameTypes.py
branches/soc-2009-yukishiro/source/gameengine/VideoTexture/blendVideoTex.cpp
Added Paths:
-----------
branches/soc-2009-yukishiro/source/blender/editors/space_logic/
branches/soc-2009-yukishiro/source/blender/editors/space_logic/Makefile
branches/soc-2009-yukishiro/source/blender/editors/space_logic/SConscript
branches/soc-2009-yukishiro/source/blender/editors/space_logic/logic_buttons.c
branches/soc-2009-yukishiro/source/blender/editors/space_logic/logic_header.c
branches/soc-2009-yukishiro/source/blender/editors/space_logic/logic_intern.h
branches/soc-2009-yukishiro/source/blender/editors/space_logic/logic_window.c
branches/soc-2009-yukishiro/source/blender/editors/space_logic/space_logic.c
branches/soc-2009-yukishiro/source/blender/makesrna/intern/rna_main_api.c
branches/soc-2009-yukishiro/source/blender/makesrna/intern/rna_mesh_api.c
branches/soc-2009-yukishiro/source/blender/makesrna/intern/rna_object_api.c
branches/soc-2009-yukishiro/source/blender/makesrna/intern/rna_ui_api.c
branches/soc-2009-yukishiro/source/blender/makesrna/intern/rna_wm_api.c
branches/soc-2009-yukishiro/source/blender/nodes/intern/TEX_nodes/TEX_at.c
branches/soc-2009-yukishiro/source/blender/python/generic/
branches/soc-2009-yukishiro/source/blender/python/generic/BGL.c
branches/soc-2009-yukishiro/source/blender/python/generic/BGL.h
branches/soc-2009-yukishiro/source/blender/python/generic/Geometry.c
branches/soc-2009-yukishiro/source/blender/python/generic/Geometry.h
branches/soc-2009-yukishiro/source/blender/python/generic/Makefile
branches/soc-2009-yukishiro/source/blender/python/generic/Mathutils.c
branches/soc-2009-yukishiro/source/blender/python/generic/Mathutils.h
branches/soc-2009-yukishiro/source/blender/python/generic/bpy_internal_import.c
branches/soc-2009-yukishiro/source/blender/python/generic/bpy_internal_import.h
branches/soc-2009-yukishiro/source/blender/python/generic/euler.c
branches/soc-2009-yukishiro/source/blender/python/generic/euler.h
branches/soc-2009-yukishiro/source/blender/python/generic/matrix.c
branches/soc-2009-yukishiro/source/blender/python/generic/matrix.h
branches/soc-2009-yukishiro/source/blender/python/generic/quat.c
branches/soc-2009-yukishiro/source/blender/python/generic/quat.h
branches/soc-2009-yukishiro/source/blender/python/generic/vector.c
branches/soc-2009-yukishiro/source/blender/python/generic/vector.h
Removed Paths:
-------------
branches/soc-2009-yukishiro/source/blender/editors/interface/interface_api.c
branches/soc-2009-yukishiro/source/blender/editors/space_logic/Makefile
branches/soc-2009-yukishiro/source/blender/editors/space_logic/SConscript
branches/soc-2009-yukishiro/source/blender/editors/space_logic/logic_buttons.c
branches/soc-2009-yukishiro/source/blender/editors/space_logic/logic_header.c
branches/soc-2009-yukishiro/source/blender/editors/space_logic/logic_intern.h
branches/soc-2009-yukishiro/source/blender/editors/space_logic/logic_window.c
branches/soc-2009-yukishiro/source/blender/editors/space_logic/space_logic.c
branches/soc-2009-yukishiro/source/blender/python/generic/BGL.c
branches/soc-2009-yukishiro/source/blender/python/generic/BGL.h
branches/soc-2009-yukishiro/source/blender/python/generic/Geometry.c
branches/soc-2009-yukishiro/source/blender/python/generic/Geometry.h
branches/soc-2009-yukishiro/source/blender/python/generic/Makefile
branches/soc-2009-yukishiro/source/blender/python/generic/Mathutils.c
branches/soc-2009-yukishiro/source/blender/python/generic/Mathutils.h
branches/soc-2009-yukishiro/source/blender/python/generic/bpy_internal_import.c
branches/soc-2009-yukishiro/source/blender/python/generic/bpy_internal_import.h
branches/soc-2009-yukishiro/source/blender/python/generic/euler.c
branches/soc-2009-yukishiro/source/blender/python/generic/euler.h
branches/soc-2009-yukishiro/source/blender/python/generic/matrix.c
branches/soc-2009-yukishiro/source/blender/python/generic/matrix.h
branches/soc-2009-yukishiro/source/blender/python/generic/quat.c
branches/soc-2009-yukishiro/source/blender/python/generic/quat.h
branches/soc-2009-yukishiro/source/blender/python/generic/vector.c
branches/soc-2009-yukishiro/source/blender/python/generic/vector.h
Modified: branches/soc-2009-yukishiro/SConstruct
===================================================================
--- branches/soc-2009-yukishiro/SConstruct 2009-06-19 05:22:58 UTC (rev 21001)
+++ branches/soc-2009-yukishiro/SConstruct 2009-06-19 05:43:08 UTC (rev 21002)
@@ -468,28 +468,18 @@
dotblenderinstall.append(env.Install(dir=td, source=srcfile))
if env['WITH_BF_PYTHON']:
- #-- .blender/scripts
- scriptpath='release/scripts'
- for dp, dn, df in os.walk(scriptpath):
- if 'CVS' in dn:
- dn.remove('CVS')
- if '.svn' in dn:
- dn.remove('.svn')
- dir=env['BF_INSTALLDIR']+'/.blender/scripts'+dp[len(scriptpath):]
- source=[dp+os.sep+f for f in df]
- scriptinstall.append(env.Install(dir=dir,source=source))
+ #-- .blender/scripts, .blender/ui, .blender/io
+ scriptpaths=['release/scripts', 'release/ui', 'release/io']
+ for scriptpath in scriptpaths:
+ for dp, dn, df in os.walk(scriptpath):
+ if 'CVS' in dn:
+ dn.remove('CVS')
+ if '.svn' in dn:
+ dn.remove('.svn')
+ dir=env['BF_INSTALLDIR']+'/.blender/'+os.path.basename(scriptpath)+dp[len(scriptpath):]
+ source=[dp+os.sep+f for f in df]
+ scriptinstall.append(env.Install(dir=dir,source=source))
- #-- .blender/ui
- scriptpath='release/ui'
- for dp, dn, df in os.walk(scriptpath):
- if 'CVS' in dn:
- dn.remove('CVS')
- if '.svn' in dn:
- dn.remove('.svn')
- dir=env['BF_INSTALLDIR']+'/.blender/ui'+dp[len(scriptpath):]
- source=[dp+os.sep+f for f in df]
- scriptinstall.append(env.Install(dir=dir,source=source))
-
#-- icons
if env['OURPLATFORM']=='linux2':
iconlist = []
Modified: branches/soc-2009-yukishiro/projectfiles_vc9/blender/nodes/nodes.vcproj
===================================================================
--- branches/soc-2009-yukishiro/projectfiles_vc9/blender/nodes/nodes.vcproj 2009-06-19 05:22:58 UTC (rev 21001)
+++ branches/soc-2009-yukishiro/projectfiles_vc9/blender/nodes/nodes.vcproj 2009-06-19 05:43:08 UTC (rev 21002)
@@ -609,6 +609,10 @@
Name="TEX_nodes"
>
<File
+ RelativePath="..\..\..\source\blender\nodes\intern\TEX_nodes\TEX_at.c"
+ >
+ </File>
+ <File
RelativePath="..\..\..\source\blender\nodes\intern\TEX_nodes\TEX_bricks.c"
>
</File>
Modified: branches/soc-2009-yukishiro/release/scripts/bpymodules/dxfLibrary.py
===================================================================
--- branches/soc-2009-yukishiro/release/scripts/bpymodules/dxfLibrary.py 2009-06-19 05:22:58 UTC (rev 21001)
+++ branches/soc-2009-yukishiro/release/scripts/bpymodules/dxfLibrary.py 2009-06-19 05:43:08 UTC (rev 21002)
@@ -1,6 +1,6 @@
#dxfLibrary.py : provides functions for generating DXF files
# --------------------------------------------------------------------------
-__version__ = "v1.32 - 2009.06.06"
+__version__ = "v1.33 - 2009.06.16"
__author__ = "Stani Michiels(Stani), Remigiusz Fiedler(migius)"
__license__ = "GPL"
__url__ = "http://wiki.blender.org/index.php/Scripts/Manual/Export/autodesk_dxf"
@@ -20,8 +20,14 @@
TODO:
- add support for DXFr14 (needs extended file header)
- add support for SPLINEs (possible first in DXFr14 version)
+- add user preset for floating point precision (3-16?)
History
+v1.33 - 2009.06.16 by migius
+ - modif _point(): converts all coords to floats
+ - modif LineType class: implement elements
+ - added VPORT class, incl. defaults
+ - fix Insert class
v1.32 - 2009.06.06 by migius
- modif Style class: changed defaults to widthFactor=1.0, obliqueAngle=0.0
- modif Text class: alignment parameter reactivated
@@ -88,7 +94,7 @@
def _point(x,index=0):
"""Convert tuple to a dxf point"""
#print 'deb: _point=', x #-------------
- return '\n'.join([' %s\n%s'%((i+1)*10+index,x[i]) for i in range(len(x))])
+ return '\n'.join([' %s\n%s'%((i+1)*10+index,float(x[i])) for i in range(len(x))])
def _points(plist):
"""Convert a list of tuples to dxf points"""
@@ -137,8 +143,8 @@
if parent.layer!=None: result+=' 8\n%s\n'%parent.layer
if parent.color!=None: result+=' 62\n%s\n'%parent.color
if parent.lineType!=None: result+=' 6\n%s\n'%parent.lineType
- #TODO: if parent.lineWeight!=None: result+='370\n%s\n'%parent.lineWeight
- #TODO: if parent.visible!=None: result+='60\n%s\n'%parent.visible
+ # TODO: if parent.lineWeight!=None: result+='370\n%s\n'%parent.lineWeight
+ # TODO: if parent.visible!=None: result+='60\n%s\n'%parent.visible
if parent.lineTypeScale!=None: result+=' 48\n%s\n'%parent.lineTypeScale
if parent.elevation!=None: result+=' 38\n%s\n'%parent.elevation
if parent.thickness!=None: result+=' 39\n%s\n'%parent.thickness
@@ -287,7 +293,7 @@
self.rotation=rotation
def __str__(self):
- result=' 0\nINSERT\n 2\n%s\n%s\n%s\n'%\
+ result=' 0\nINSERT\n 2\n%s\n%s%s\n'%\
(self.name,self._common(),_point(self.point))
if self.xscale!=None:result+=' 41\n%s\n'%self.xscale
if self.yscale!=None:result+=' 42\n%s\n'%self.yscale
@@ -383,7 +389,7 @@
def __init__(self,points=None,**common):
_Entity.__init__(self,**common)
self.points=points
- def __str__(self): #TODO:
+ def __str__(self): # TODO:
return ' 0\nPOINT\n%s%s\n' %(self._common(),
_points(self.points)
)
@@ -515,7 +521,7 @@
self.name=name
self.flag=0
self.base=base
- def __str__(self): #TODO:
+ def __str__(self): # TODO:
e=''.join([str(x)for x in self.entities])
return ' 0\nBLOCK\n 8\n%s\n 2\n%s\n 70\n%s\n%s\n 3\n%s\n%s 0\nENDBLK\n'%\
(self.layer,self.name.upper(),self.flag,_point(self.base),self.name.upper(),e)
@@ -535,15 +541,22 @@
#-----------------------------------------------
class LineType(_Call):
"""Custom linetype"""
- def __init__(self,name='continuous',description='Solid line',elements=[],flag=64):
- # TODO: Implement lineType elements
+ def __init__(self,name='CONTINUOUS',description='Solid line',elements=[0.0],flag=0):
self.name=name
self.description=description
self.elements=copy.copy(elements)
self.flag=flag
def __str__(self):
- return ' 0\nLTYPE\n 2\n%s\n 70\n%s\n 3\n%s\n 72\n65\n 73\n%s\n 40\n0.0\n'%\
- (self.name.upper(),self.flag,self.description,len(self.elements))
+ result = ' 0\nLTYPE\n 2\n%s\n 70\n%s\n 3\n%s\n 72\n65\n'%\
+ (self.name.upper(),self.flag,self.description)
+ if self.elements:
+ elements = ' 73\n%s\n' %(len(self.elements)-1)
+ elements += ' 40\n%s\n' %(self.elements[0])
+ for e in self.elements[1:]:
+ elements += ' 49\n%s\n' %e
+ result += elements
+ return result
+
#-----------------------------------------------
class Style(_Call):
@@ -566,27 +579,137 @@
self.font.upper(),self.bigFont.upper())
#-----------------------------------------------
+class VPort(_Call):
+ def __init__(self,name,flag=0,
+ leftBottom=(0.0,0.0),
+ rightTop=(1.0,1.0),
+ center=(0.5,0.5),
+ snap_base=(0.0,0.0),
+ snap_spacing=(0.1,0.1),
+ grid_spacing=(0.1,0.1),
+ direction=(0.0,0.0,1.0),
+ target=(0.0,0.0,0.0),
+ height=1.0,
+ ratio=1.0,
+ lens=50,
+ frontClipping=0,
+ backClipping=0,
+ snap_rotation=0,
+ twist=0,
+ mode=0,
+ circle_zoom=100,
+ fast_zoom=1,
+ ucsicon=1,
+ snap_on=0,
+ grid_on=0,
+ snap_style=0,
+ snap_isopair=0
+ ):
+ self.name=name
+ self.flag=flag
+ self.leftBottom=leftBottom
+ self.rightTop=rightTop
+ self.center=center
+ self.snap_base=snap_base
+ self.snap_spacing=snap_spacing
+ self.grid_spacing=grid_spacing
+ self.direction=direction
+ self.target=target
+ self.height=float(height)
+ self.ratio=float(ratio)
+ self.lens=float(lens)
+ self.frontClipping=float(frontClipping)
+ self.backClipping=float(backClipping)
+ self.snap_rotation=float(snap_rotation)
+ self.twist=float(twist)
+ self.mode=mode
+ self.circle_zoom=circle_zoom
+ self.fast_zoom=fast_zoom
+ self.ucsicon=ucsicon
+ self.snap_on=snap_on
+ self.grid_on=grid_on
+ self.snap_style=snap_style
+ self.snap_isopair=snap_isopair
+ def __str__(self):
+ output = [' 0', 'VPORT',
+ ' 2', self.name,
+ ' 70', self.flag,
+ _point(self.leftBottom),
+ _point(self.rightTop,1),
+ _point(self.center,2), # View center point (in DCS)
+ _point(self.snap_base,3),
+ _point(self.snap_spacing,4),
+ _point(self.grid_spacing,5),
+ _point(self.direction,6), #view direction from target (in WCS)
+ _point(self.target,7),
+ ' 40', self.height,
+ ' 41', self.ratio,
+ ' 42', self.lens,
+ ' 43', self.frontClipping,
+ ' 44', self.backClipping,
+ ' 50', self.snap_rotation,
+ ' 51', self.twist,
+ ' 71', self.mode,
+ ' 72', self.circle_zoom,
+ ' 73', self.fast_zoom,
+ ' 74', self.ucsicon,
+ ' 75', self.snap_on,
+ ' 76', self.grid_on,
+ ' 77', self.snap_style,
+ ' 78', self.snap_isopair
+ ]
+
+ output_str = ''
+ for s in output:
+ output_str += '%s\n' %s
+ return output_str
+
+
+
+#-----------------------------------------------
class View(_Call):
- def __init__(self,name,flag=0,width=1,height=1,center=(0.5,0.5),
- direction=(0,0,1),target=(0,0,0),lens=50,
- frontClipping=0,backClipping=0,twist=0,mode=0):
+ def __init__(self,name,flag=0,
+ width=1,
+ height=1,
+ center=(0.5,0.5),
+ direction=(0,0,1),
+ target=(0,0,0),
+ lens=50,
+ frontClipping=0,
+ backClipping=0,
+ twist=0,mode=0
+ ):
self.name=name
self.flag=flag
- self.width=width
- self.height=height
+ self.width=float(width)
+ self.height=float(height)
self.center=center
self.direction=direction
self.target=target
- self.lens=lens
- self.frontClipping=frontClipping
- self.backClipping=backClipping
- self.twist=twist
+ self.lens=float(lens)
+ self.frontClipping=float(frontClipping)
+ self.backClipping=float(backClipping)
+ self.twist=float(twist)
self.mode=mode
def __str__(self):
- return ' 0\nVIEW\n 2\n%s\n 70\n%s\n 40\n%s\n%s\n 41\n%s\n%s\n%s\n 42\n%s\n 43\n%s\n 44\n%s\n 50\n%s\n 71\n%s\n'%\
- (self.name,self.flag,self.height,_point(self.center),self.width,
- _point(self.direction,1),_point(self.target,2),self.lens,
- self.frontClipping,self.backClipping,self.twist,self.mode)
+ output = [' 0', 'VIEW',
+ ' 2', self.name,
+ ' 70', self.flag,
+ ' 40', self.height,
+ _point(self.center),
+ ' 41', self.width,
+ _point(self.direction,1),
+ _point(self.target,2),
+ ' 42', self.lens,
+ ' 43', self.frontClipping,
+ ' 44', self.backClipping,
+ ' 50', self.twist,
+ ' 71', self.mode
+ ]
+ output_str = ''
+ for s in output:
+ output_str += '%s\n' %s
@@ Diff output truncated at 10240 characters. @@
More information about the Bf-blender-cvs
mailing list