~ubuntu-branches/ubuntu/trusty/blender/trusty

« back to all changes in this revision

Viewing changes to release/scripts/addons/io_export_pc2.py

  • Committer: Package Import Robot
  • Author(s): Jeremy Bicha
  • Date: 2013-03-06 12:08:47 UTC
  • mfrom: (1.5.1) (14.1.8 experimental)
  • Revision ID: package-import@ubuntu.com-20130306120847-frjfaryb2zrotwcg
Tags: 2.66a-1ubuntu1
* Resynchronize with Debian (LP: #1076930, #1089256, #1052743, #999024,
  #1122888, #1147084)
* debian/control:
  - Lower build-depends on libavcodec-dev since we're not
    doing the libav9 transition in Ubuntu yet

Show diffs side-by-side

added added

removed removed

Lines of Context:
20
20
    "name": "Export Pointcache Format(.pc2)",
21
21
    "author": "Florian Meyer (tstscr)",
22
22
    "version": (1, 0),
23
 
    "blender": (2, 5, 7),
 
23
    "blender": (2, 57, 0),
24
24
    "location": "File > Export > Pointcache (.pc2)",
25
25
    "description": "Export mesh Pointcache data (.pc2)",
26
26
    "warning": "",
27
 
    "wiki_url": "http://wiki.blender.org/index.php/Extensions:2.5/Py/"\
 
27
    "wiki_url": "http://wiki.blender.org/index.php/Extensions:2.6/Py/"\
28
28
        "Scripts/Import-Export/PC2_Pointcache_export",
29
29
    "tracker_url": "https://projects.blender.org/tracker/index.php?"\
30
30
        "func=detail&aid=24703",
31
31
    "category": "Import-Export"}
32
32
 
33
 
'''
 
33
"""
34
34
Usage Notes:
35
35
 
36
36
in Maya Mel:
37
37
cacheFile -pc2 1 -pcf "<insert filepath of source>" -f "<insert target filename w/o extension>" -dir "<insert directory path for target>" -format "OneFile";
38
38
 
39
 
'''
 
39
"""
40
40
 
41
41
import bpy
42
42
from bpy.props import *
46
46
from bpy_extras.io_utils import ExportHelper
47
47
 
48
48
def getSampling(start, end, sampling):
49
 
    samples = [start - sampling
50
 
               + x * sampling
51
 
               for x in range(start, int((end-start) * 1.0 / sampling) + 1)]
 
49
    samples = [start + x * sampling
 
50
               for x in range(int((end - start) / sampling) + 1)]
52
51
    return samples
53
52
 
54
53
def do_export(context, props, filepath):
105
104
 
106
105
###### EXPORT OPERATOR #######
107
106
class Export_pc2(bpy.types.Operator, ExportHelper):
108
 
    '''Exports the active Object as a .pc2 Pointcache file'''
 
107
    """Export the active Object as a .pc2 Pointcache file"""
109
108
    bl_idname = "export_shape.pc2"
110
109
    bl_label = "Export Pointcache (.pc2)"
111
110