Guest User

typewriter_text.py

a guest
Mar 9th, 2017
129
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <!DOCTYPE html>
  2. <html class="" lang="en">
  3. <head prefix="og: http://ogp.me/ns#">
  4. <meta charset="utf-8">
  5. <meta content="IE=edge" http-equiv="X-UA-Compatible">
  6. <meta content="object" property="og:type">
  7. <meta content="GitLab" property="og:site_name">
  8. <meta content="typewriter_text.py · master · Bassam Kurdali / blender-addon-experiments" property="og:title">
  9. <meta content="Miscellaneous Blender Addons - some are for personal use, some are experiments that could lead to bigger things" property="og:description">
  10. <meta content="https://gitlab.com/assets/gitlab_logo-7ae504fe4f68fdebb3c2034e36621930cd36ea87924c11ff65dbcb8ed50dca58.png" property="og:image">
  11. <meta content="https://gitlab.com/bkurdali/blender-addon-experiments/blob/master/typewriter_text.py" property="og:url">
  12. <meta content="summary" property="twitter:card">
  13. <meta content="typewriter_text.py · master · Bassam Kurdali / blender-addon-experiments" property="twitter:title">
  14. <meta content="Miscellaneous Blender Addons - some are for personal use, some are experiments that could lead to bigger things" property="twitter:description">
  15. <meta content="https://gitlab.com/assets/gitlab_logo-7ae504fe4f68fdebb3c2034e36621930cd36ea87924c11ff65dbcb8ed50dca58.png" property="twitter:image">
  16.  
  17. <title>typewriter_text.py · master · Bassam Kurdali / blender-addon-experiments · GitLab</title>
  18. <meta content="Miscellaneous Blender Addons - some are for personal use, some are experiments that could lead to bigger things" name="description">
  19. <link rel="shortcut icon" type="image/x-icon" href="/assets/favicon-075eba76312e8421991a0c1f89a89ee81678bcde72319dd3e8047e2a47cd3a42.ico" />
  20. <link rel="stylesheet" media="all" href="/assets/application-e364b8e72a9507319b25fd03b69fea255cf1eab9a47a1f79c849d774fc8e8783.css" />
  21. <link rel="stylesheet" media="print" href="/assets/print-9c3a1eb4a2f45c9f3d7dd4de03f14c2e6b921e757168b595d7f161bbc320fc05.css" />
  22. <script src="/assets/webpack/application-d3fec7cb08dfc6c97016-v2.js"></script>
  23.  
  24. <meta name="csrf-param" content="authenticity_token" />
  25. <meta name="csrf-token" content="G+4wwDhMomkmZCZjT7HQzxbCi78OjPOxgAgUv26q7LZMo58LraURZXFPwBuhxRJrTReJ28G0nBGz+QdkEftp2Q==" />
  26. <meta content="origin-when-cross-origin" name="referrer">
  27. <meta content="width=device-width, initial-scale=1, maximum-scale=1" name="viewport">
  28. <meta content="#474D57" name="theme-color">
  29. <link rel="apple-touch-icon" type="image/x-icon" href="/assets/touch-icon-iphone-5a9cee0e8a51212e70b90c87c12f382c428870c0ff67d1eb034d884b78d2dae7.png" />
  30. <link rel="apple-touch-icon" type="image/x-icon" href="/assets/touch-icon-ipad-a6eec6aeb9da138e507593b464fdac213047e49d3093fc30e90d9a995df83ba3.png" sizes="76x76" />
  31. <link rel="apple-touch-icon" type="image/x-icon" href="/assets/touch-icon-iphone-retina-72e2aadf86513a56e050e7f0f2355deaa19cc17ed97bbe5147847f2748e5a3e3.png" sizes="120x120" />
  32. <link rel="apple-touch-icon" type="image/x-icon" href="/assets/touch-icon-ipad-retina-8ebe416f5313483d9c1bc772b5bbe03ecad52a54eba443e5215a22caed2a16a2.png" sizes="152x152" />
  33. <link color="rgb(226, 67, 41)" href="/assets/logo-d36b5212042cebc89b96df4bf6ac24e43db316143e89926c0db839ff694d2de4.svg" rel="mask-icon">
  34. <meta content="/assets/msapplication-tile-1196ec67452f618d39cdd85e2e3a542f76574c071051ae7effbfde01710eb17d.png" name="msapplication-TileImage">
  35. <meta content="#30353E" name="msapplication-TileColor">
  36.  
  37.  
  38. <!-- Piwik -->
  39. <script>
  40. var _paq = _paq || [];
  41. _paq.push(['trackPageView']);
  42. _paq.push(['enableLinkTracking']);
  43. (function() {
  44. var u="//piwik.gitlab.com/";
  45. _paq.push(['setTrackerUrl', u+'piwik.php']);
  46. _paq.push(['setSiteId', 1]);
  47. var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
  48. g.type='text/javascript'; g.async=true; g.defer=true; g.src=u+'piwik.js'; s.parentNode.insertBefore(g,s);
  49. })();
  50. </script>
  51. <noscript><p><img src="//piwik.gitlab.com/piwik.php?idsite=1" style="border:0;" alt="" /></p></noscript>
  52. <!-- End Piwik Code -->
  53.  
  54.  
  55. </head>
  56.  
  57. <body class="ui_charcoal" data-group="" data-page="projects:blob:show" data-project="blender-addon-experiments">
  58. <script>
  59. //<![CDATA[
  60. window.gon={};gon.api_version="v4";gon.default_avatar_url="https:\/\/gitlab.com\/assets\/no_avatar-849f9c04a3a0d0cea2424ae97b27447dc64a7dbfae83c036c45b403392f0e8ba.png";gon.max_file_size=10;gon.relative_url_root="";gon.shortcuts_path="\/help\/shortcuts";gon.user_color_scheme="white";gon.award_menu_url="\/emojis";gon.katex_css_url="\/assets\/katex-e46cafe9c3fa73920a7c2c063ee8bb0613e0cf85fd96a3aea25f8419c4bfcfba.css";gon.katex_js_url="\/assets\/katex-04bcf56379fcda0ee7c7a63f71d0fc15ffd2e014d017cd9d51fd6554dfccf40a.js";
  61. //]]>
  62. </script>
  63. <header class="navbar navbar-fixed-top navbar-gitlab with-horizontal-nav">
  64. <a class="sr-only gl-accessibility" href="#content-body" tabindex="1">Skip to content</a>
  65. <div class="container-fluid">
  66. <div class="header-content">
  67. <button aria-label="Toggle global navigation" class="side-nav-toggle" type="button">
  68. <span class="sr-only">Toggle navigation</span>
  69. <i class="fa fa-bars"></i>
  70. </button>
  71. <button class="navbar-toggle" type="button">
  72. <span class="sr-only">Toggle navigation</span>
  73. <i class="fa fa-ellipsis-v"></i>
  74. </button>
  75. <div class="navbar-collapse collapse">
  76. <ul class="nav navbar-nav">
  77. <li class="hidden-sm hidden-xs">
  78. <div class="has-location-badge search search-form">
  79. <form class="navbar-form" action="/search" accept-charset="UTF-8" method="get"><input name="utf8" type="hidden" value="&#x2713;" /><div class="search-input-container">
  80. <div class="location-badge">This project</div>
  81. <div class="search-input-wrap">
  82. <div class="dropdown" data-url="/search/autocomplete">
  83. <input type="search" name="search" id="search" placeholder="Search" class="search-input dropdown-menu-toggle no-outline js-search-dashboard-options" spellcheck="false" tabindex="1" autocomplete="off" data-toggle="dropdown" data-issues-path="https://gitlab.com/dashboard/issues" data-mr-path="https://gitlab.com/dashboard/merge_requests" />
  84. <div class="dropdown-menu dropdown-select">
  85. <div class="dropdown-content"><ul>
  86. <li>
  87. <a class="is-focused dropdown-menu-empty-link">
  88. Loading...
  89. </a>
  90. </li>
  91. </ul>
  92. </div><div class="dropdown-loading"><i class="fa fa-spinner fa-spin"></i></div>
  93. </div>
  94. <i class="search-icon"></i>
  95. <i class="clear-icon js-clear-input"></i>
  96. </div>
  97. </div>
  98. </div>
  99. <input type="hidden" name="group_id" id="group_id" class="js-search-group-options" />
  100. <input type="hidden" name="project_id" id="search_project_id" value="1107061" class="js-search-project-options" data-project-path="blender-addon-experiments" data-name="blender-addon-experiments" data-issues-path="/bkurdali/blender-addon-experiments/issues" data-mr-path="/bkurdali/blender-addon-experiments/merge_requests" />
  101. <input type="hidden" name="search_code" id="search_code" value="true" />
  102. <input type="hidden" name="repository_ref" id="repository_ref" value="master" />
  103.  
  104. <div class="search-autocomplete-opts hide" data-autocomplete-path="/search/autocomplete" data-autocomplete-project-id="1107061" data-autocomplete-project-ref="master"></div>
  105. </form></div>
  106.  
  107. </li>
  108. <li class="visible-sm visible-xs">
  109. <a title="Search" aria-label="Search" data-toggle="tooltip" data-placement="bottom" data-container="body" href="/search"><i class="fa fa-search"></i>
  110. </a></li>
  111. <li>
  112. <div>
  113. <a class="btn btn-sign-in btn-success" href="/users/sign_in?redirect_to_referer=yes">Sign in</a>
  114. </div>
  115. </li>
  116. </ul>
  117. </div>
  118. <h1 class="title"><a href="/bkurdali">Bassam Kurdali</a> / <a class="project-item-select-holder" href="/bkurdali/blender-addon-experiments">blender-addon-experiments</a></h1>
  119. <div class="header-logo">
  120. <a class="home" title="Dashboard" id="logo" href="/"><svg width="36" height="36" class="tanuki-logo">
  121. <path class="tanuki-shape tanuki-left-ear" fill="#e24329" d="M2 14l9.38 9v-9l-4-12.28c-.205-.632-1.176-.632-1.38 0z"/>
  122. <path class="tanuki-shape tanuki-right-ear" fill="#e24329" d="M34 14l-9.38 9v-9l4-12.28c.205-.632 1.176-.632 1.38 0z"/>
  123. <path class="tanuki-shape tanuki-nose" fill="#e24329" d="M18,34.38 3,14 33,14 Z"/>
  124. <path class="tanuki-shape tanuki-left-eye" fill="#fc6d26" d="M18,34.38 11.38,14 2,14 6,25Z"/>
  125. <path class="tanuki-shape tanuki-right-eye" fill="#fc6d26" d="M18,34.38 24.62,14 34,14 30,25Z"/>
  126. <path class="tanuki-shape tanuki-left-cheek" fill="#fca326" d="M2 14L.1 20.16c-.18.565 0 1.2.5 1.56l17.42 12.66z"/>
  127. <path class="tanuki-shape tanuki-right-cheek" fill="#fca326" d="M34 14l1.9 6.16c.18.565 0 1.2-.5 1.56L18 34.38z"/>
  128. </svg>
  129.  
  130. </a></div>
  131. <div class="js-dropdown-menu-projects">
  132. <div class="dropdown-menu dropdown-select dropdown-menu-projects">
  133. <div class="dropdown-title"><span>Go to a project</span><button class="dropdown-title-button dropdown-menu-close" aria-label="Close" type="button"><i class="fa fa-times dropdown-menu-close-icon"></i></button></div>
  134. <div class="dropdown-input"><input type="search" id="" class="dropdown-input-field" placeholder="Search your projects" autocomplete="off" /><i class="fa fa-search dropdown-input-search"></i><i role="button" class="fa fa-times dropdown-input-clear js-dropdown-input-clear"></i></div>
  135. <div class="dropdown-content"></div>
  136. <div class="dropdown-loading"><i class="fa fa-spinner fa-spin"></i></div>
  137. </div>
  138. </div>
  139.  
  140. </div>
  141. </div>
  142. </header>
  143.  
  144. <script>
  145. var findFileURL = "/bkurdali/blender-addon-experiments/find_file/master";
  146. </script>
  147.  
  148. <div class="page-with-sidebar">
  149. <div class="sidebar-wrapper nicescroll">
  150. <div class="sidebar-action-buttons">
  151. <div class="nav-header-btn toggle-nav-collapse" title="Open/Close">
  152. <span class="sr-only">Toggle navigation</span>
  153. <i class="fa fa-bars"></i>
  154. </div>
  155. <div class="nav-header-btn pin-nav-btn has-tooltip js-nav-pin" data-container="body" data-placement="right" title="Pin Navigation">
  156. <span class="sr-only">Toggle navigation pinning</span>
  157. <i class="fa fa-fw fa-thumb-tack"></i>
  158. </div>
  159. </div>
  160. <ul class="nav nav-sidebar">
  161. <li class="home"><a title="Projects" href="/explore"><span>
  162. Projects
  163. </span>
  164. </a></li><li class=""><a title="Groups" href="/explore/groups"><span>
  165. Groups
  166. </span>
  167. </a></li><li class=""><a title="Snippets" href="/explore/snippets"><span>
  168. Snippets
  169. </span>
  170. </a></li><li class=""><a title="Help" href="/help"><span>
  171. Help
  172. </span>
  173. </a></li></ul>
  174.  
  175. </div>
  176. <div class="layout-nav">
  177. <div class="container-fluid">
  178. <div class="scrolling-tabs-container">
  179. <div class="fade-left">
  180. <i class="fa fa-angle-left"></i>
  181. </div>
  182. <div class="fade-right">
  183. <i class="fa fa-angle-right"></i>
  184. </div>
  185. <ul class="nav-links scrolling-tabs">
  186. <li class="home"><a title="Project" class="shortcuts-project" href="/bkurdali/blender-addon-experiments"><span>
  187. Project
  188. </span>
  189. </a></li><li class=""><a title="Activity" class="shortcuts-project-activity" href="/bkurdali/blender-addon-experiments/activity"><span>
  190. Activity
  191. </span>
  192. </a></li><li class="active"><a title="Repository" class="shortcuts-tree" href="/bkurdali/blender-addon-experiments/tree/master"><span>
  193. Repository
  194. </span>
  195. </a></li><li class=""><a title="Pipelines" class="shortcuts-pipelines" href="/bkurdali/blender-addon-experiments/pipelines"><span>
  196. Pipelines
  197. </span>
  198. </a></li><li class=""><a title="Graphs" class="shortcuts-graphs" href="/bkurdali/blender-addon-experiments/graphs/master"><span>
  199. Graphs
  200. </span>
  201. </a></li><li class=""><a title="Issues" class="shortcuts-issues" href="/bkurdali/blender-addon-experiments/issues"><span>
  202. Issues
  203. <span class="badge count issue_counter">0</span>
  204. </span>
  205. </a></li><li class=""><a title="Merge Requests" class="shortcuts-merge_requests" href="/bkurdali/blender-addon-experiments/merge_requests"><span>
  206. Merge Requests
  207. <span class="badge count merge_counter">0</span>
  208. </span>
  209. </a></li><li class=""><a title="Wiki" class="shortcuts-wiki" href="/bkurdali/blender-addon-experiments/wikis/home"><span>
  210. Wiki
  211. </span>
  212. </a></li><li class="hidden">
  213. <a title="Network" class="shortcuts-network" href="/bkurdali/blender-addon-experiments/network/master">Network
  214. </a></li>
  215. <li class="hidden">
  216. <a class="shortcuts-new-issue" href="/bkurdali/blender-addon-experiments/issues/new">Create a new issue
  217. </a></li>
  218. <li class="hidden">
  219. <a title="Jobs" class="shortcuts-builds" href="/bkurdali/blender-addon-experiments/builds">Jobs
  220. </a></li>
  221. <li class="hidden">
  222. <a title="Commits" class="shortcuts-commits" href="/bkurdali/blender-addon-experiments/commits/master">Commits
  223. </a></li>
  224. <li class="hidden">
  225. <a title="Issue Boards" class="shortcuts-issue-boards" href="/bkurdali/blender-addon-experiments/boards">Issue Boards</a>
  226. </li>
  227. </ul>
  228. </div>
  229.  
  230. </div>
  231. </div>
  232. <div class="content-wrapper page-with-layout-nav">
  233. <div class="scrolling-tabs-container sub-nav-scroll">
  234. <div class="fade-left">
  235. <i class="fa fa-angle-left"></i>
  236. </div>
  237. <div class="fade-right">
  238. <i class="fa fa-angle-right"></i>
  239. </div>
  240.  
  241. <div class="nav-links sub-nav scrolling-tabs">
  242. <ul class="container-fluid container-limited">
  243. <li class="active"><a href="/bkurdali/blender-addon-experiments/tree/master">Files
  244. </a></li><li class=""><a href="/bkurdali/blender-addon-experiments/commits/master">Commits
  245. </a></li><li class=""><a href="/bkurdali/blender-addon-experiments/network/master">Network
  246. </a></li><li class=""><a href="/bkurdali/blender-addon-experiments/compare?from=master&amp;to=master">Compare
  247. </a></li><li class=""><a href="/bkurdali/blender-addon-experiments/branches">Branches
  248. </a></li><li class=""><a href="/bkurdali/blender-addon-experiments/tags">Tags
  249. </a></li><li class=""><a href="/bkurdali/blender-addon-experiments/path_locks">Locked Files
  250. </a></li></ul>
  251. </div>
  252. </div>
  253.  
  254. <div class="alert-wrapper">
  255.  
  256.  
  257. <div class="flash-container flash-container-page">
  258. </div>
  259.  
  260.  
  261. </div>
  262. <div class=" ">
  263. <div class="content" id="content-body">
  264.  
  265. <div class="container-fluid container-limited">
  266.  
  267. <div class="tree-holder" id="tree-holder">
  268. <div class="nav-block">
  269. <div class="tree-ref-holder">
  270. <form class="project-refs-form" action="/bkurdali/blender-addon-experiments/refs/switch" accept-charset="UTF-8" method="get"><input name="utf8" type="hidden" value="&#x2713;" /><input type="hidden" name="destination" id="destination" value="blob" />
  271. <input type="hidden" name="path" id="path" value="typewriter_text.py" />
  272. <div class="dropdown">
  273. <button class="dropdown-menu-toggle js-project-refs-dropdown" type="button" data-toggle="dropdown" data-selected="master" data-ref="master" data-refs-url="/bkurdali/blender-addon-experiments/refs" data-field-name="ref" data-submit-form-on-click="true"><span class="dropdown-toggle-text ">master</span><i class="fa fa-chevron-down"></i></button>
  274. <div class="dropdown-menu dropdown-menu-selectable">
  275. <div class="dropdown-title"><span>Switch branch/tag</span><button class="dropdown-title-button dropdown-menu-close" aria-label="Close" type="button"><i class="fa fa-times dropdown-menu-close-icon"></i></button></div>
  276. <div class="dropdown-input"><input type="search" id="" class="dropdown-input-field" placeholder="Search branches and tags" autocomplete="off" /><i class="fa fa-search dropdown-input-search"></i><i role="button" class="fa fa-times dropdown-input-clear js-dropdown-input-clear"></i></div>
  277. <div class="dropdown-content"></div>
  278. <div class="dropdown-loading"><i class="fa fa-spinner fa-spin"></i></div>
  279. </div>
  280. </div>
  281. </form>
  282. </div>
  283. <ul class="breadcrumb repo-breadcrumb">
  284. <li>
  285. <a href="/bkurdali/blender-addon-experiments/tree/master">blender-addon-experiments
  286. </a></li>
  287. <li>
  288. <a href="/bkurdali/blender-addon-experiments/blob/master/typewriter_text.py"><strong>
  289. typewriter_text.py
  290. </strong>
  291. </a>
  292. </li>
  293. </ul>
  294. </div>
  295. <ul class="blob-commit-info table-list hidden-xs">
  296. <li class="commit table-list-row js-toggle-container" id="commit-db5a0837">
  297. <div class="table-list-cell avatar-cell hidden-xs">
  298. <a href="/bkurdali"><img class="avatar has-tooltip s36 hidden-xs" alt="Bassam Kurdali&#39;s avatar" title="Bassam Kurdali" data-container="body" src="https://gitlab.com/uploads/user/avatar/11355/me_with_glasses.jpg" /></a>
  299. </div>
  300. <div class="table-list-cell commit-content">
  301. <a class="commit-row-message item-title" href="/bkurdali/blender-addon-experiments/commit/db5a08370cf0f68ecb1878e084edff6c1a014e24">adding more files</a>
  302. <span class="commit-row-message visible-xs-inline">
  303. &middot;
  304. db5a0837
  305. </span>
  306. <div class="commiter">
  307. <a class="commit-author-link has-tooltip" title="bassam@urchn.org" href="/bkurdali">Bassam Kurdali</a>
  308. committed
  309. <time class="js-timeago" title="May 23, 2016 7:56pm" datetime="2016-05-23T19:56:09Z" data-toggle="tooltip" data-placement="top" data-container="body">2016-05-23 15:56:09 -0400</time>
  310. </div>
  311. </div>
  312. <div class="table-list-cell commit-actions hidden-xs">
  313. <button class="btn btn-clipboard btn-transparent" data-toggle="tooltip" data-placement="bottom" data-container="body" data-clipboard-text="db5a08370cf0f68ecb1878e084edff6c1a014e24" data-title="Copy commit SHA to clipboard" type="button" title="Copy commit SHA to clipboard"><i class="fa fa-clipboard"></i></button>
  314. <a class="commit-short-id btn btn-transparent" href="/bkurdali/blender-addon-experiments/commit/db5a08370cf0f68ecb1878e084edff6c1a014e24">db5a0837</a>
  315.  
  316. </div>
  317. </li>
  318.  
  319. </ul>
  320. <div class="blob-content-holder" id="blob-content-holder">
  321. <article class="file-holder">
  322. <div class="file-title">
  323. <i class="fa fa-file-text-o fa-fw"></i>
  324. <strong>
  325. typewriter_text.py
  326. </strong>
  327. <small>
  328. 4.19 KB
  329. </small>
  330. <div class="file-actions hidden-xs">
  331. <div class="btn-group">
  332.  
  333. </div>
  334. <div class="btn-group tree-btn-group">
  335. <a class="btn btn-sm" target="_blank" href="/bkurdali/blender-addon-experiments/raw/master/typewriter_text.py">Raw</a>
  336. <a class="btn btn-sm" href="/bkurdali/blender-addon-experiments/blame/master/typewriter_text.py">Blame</a>
  337. <a class="btn btn-sm" href="/bkurdali/blender-addon-experiments/commits/master/typewriter_text.py">History</a>
  338. <a class="btn btn-sm js-data-file-blob-permalink-url" href="/bkurdali/blender-addon-experiments/blob/5fe0367eb2db69f147aefb719badbe674bc98989/typewriter_text.py">Permalink</a>
  339. </div>
  340. <script>
  341. PathLocks.init(
  342. '/bkurdali/blender-addon-experiments/path_locks/toggle',
  343. 'typewriter_text.py'
  344. );
  345. </script>
  346.  
  347. </div>
  348. </div>
  349. <div class="file-content code js-syntax-highlight">
  350. <div class="line-numbers">
  351. <a class="diff-line-num" data-line-number="1" href="#L1" id="L1">
  352. <i class="fa fa-link"></i>
  353. 1
  354. </a>
  355. <a class="diff-line-num" data-line-number="2" href="#L2" id="L2">
  356. <i class="fa fa-link"></i>
  357. 2
  358. </a>
  359. <a class="diff-line-num" data-line-number="3" href="#L3" id="L3">
  360. <i class="fa fa-link"></i>
  361. 3
  362. </a>
  363. <a class="diff-line-num" data-line-number="4" href="#L4" id="L4">
  364. <i class="fa fa-link"></i>
  365. 4
  366. </a>
  367. <a class="diff-line-num" data-line-number="5" href="#L5" id="L5">
  368. <i class="fa fa-link"></i>
  369. 5
  370. </a>
  371. <a class="diff-line-num" data-line-number="6" href="#L6" id="L6">
  372. <i class="fa fa-link"></i>
  373. 6
  374. </a>
  375. <a class="diff-line-num" data-line-number="7" href="#L7" id="L7">
  376. <i class="fa fa-link"></i>
  377. 7
  378. </a>
  379. <a class="diff-line-num" data-line-number="8" href="#L8" id="L8">
  380. <i class="fa fa-link"></i>
  381. 8
  382. </a>
  383. <a class="diff-line-num" data-line-number="9" href="#L9" id="L9">
  384. <i class="fa fa-link"></i>
  385. 9
  386. </a>
  387. <a class="diff-line-num" data-line-number="10" href="#L10" id="L10">
  388. <i class="fa fa-link"></i>
  389. 10
  390. </a>
  391. <a class="diff-line-num" data-line-number="11" href="#L11" id="L11">
  392. <i class="fa fa-link"></i>
  393. 11
  394. </a>
  395. <a class="diff-line-num" data-line-number="12" href="#L12" id="L12">
  396. <i class="fa fa-link"></i>
  397. 12
  398. </a>
  399. <a class="diff-line-num" data-line-number="13" href="#L13" id="L13">
  400. <i class="fa fa-link"></i>
  401. 13
  402. </a>
  403. <a class="diff-line-num" data-line-number="14" href="#L14" id="L14">
  404. <i class="fa fa-link"></i>
  405. 14
  406. </a>
  407. <a class="diff-line-num" data-line-number="15" href="#L15" id="L15">
  408. <i class="fa fa-link"></i>
  409. 15
  410. </a>
  411. <a class="diff-line-num" data-line-number="16" href="#L16" id="L16">
  412. <i class="fa fa-link"></i>
  413. 16
  414. </a>
  415. <a class="diff-line-num" data-line-number="17" href="#L17" id="L17">
  416. <i class="fa fa-link"></i>
  417. 17
  418. </a>
  419. <a class="diff-line-num" data-line-number="18" href="#L18" id="L18">
  420. <i class="fa fa-link"></i>
  421. 18
  422. </a>
  423. <a class="diff-line-num" data-line-number="19" href="#L19" id="L19">
  424. <i class="fa fa-link"></i>
  425. 19
  426. </a>
  427. <a class="diff-line-num" data-line-number="20" href="#L20" id="L20">
  428. <i class="fa fa-link"></i>
  429. 20
  430. </a>
  431. <a class="diff-line-num" data-line-number="21" href="#L21" id="L21">
  432. <i class="fa fa-link"></i>
  433. 21
  434. </a>
  435. <a class="diff-line-num" data-line-number="22" href="#L22" id="L22">
  436. <i class="fa fa-link"></i>
  437. 22
  438. </a>
  439. <a class="diff-line-num" data-line-number="23" href="#L23" id="L23">
  440. <i class="fa fa-link"></i>
  441. 23
  442. </a>
  443. <a class="diff-line-num" data-line-number="24" href="#L24" id="L24">
  444. <i class="fa fa-link"></i>
  445. 24
  446. </a>
  447. <a class="diff-line-num" data-line-number="25" href="#L25" id="L25">
  448. <i class="fa fa-link"></i>
  449. 25
  450. </a>
  451. <a class="diff-line-num" data-line-number="26" href="#L26" id="L26">
  452. <i class="fa fa-link"></i>
  453. 26
  454. </a>
  455. <a class="diff-line-num" data-line-number="27" href="#L27" id="L27">
  456. <i class="fa fa-link"></i>
  457. 27
  458. </a>
  459. <a class="diff-line-num" data-line-number="28" href="#L28" id="L28">
  460. <i class="fa fa-link"></i>
  461. 28
  462. </a>
  463. <a class="diff-line-num" data-line-number="29" href="#L29" id="L29">
  464. <i class="fa fa-link"></i>
  465. 29
  466. </a>
  467. <a class="diff-line-num" data-line-number="30" href="#L30" id="L30">
  468. <i class="fa fa-link"></i>
  469. 30
  470. </a>
  471. <a class="diff-line-num" data-line-number="31" href="#L31" id="L31">
  472. <i class="fa fa-link"></i>
  473. 31
  474. </a>
  475. <a class="diff-line-num" data-line-number="32" href="#L32" id="L32">
  476. <i class="fa fa-link"></i>
  477. 32
  478. </a>
  479. <a class="diff-line-num" data-line-number="33" href="#L33" id="L33">
  480. <i class="fa fa-link"></i>
  481. 33
  482. </a>
  483. <a class="diff-line-num" data-line-number="34" href="#L34" id="L34">
  484. <i class="fa fa-link"></i>
  485. 34
  486. </a>
  487. <a class="diff-line-num" data-line-number="35" href="#L35" id="L35">
  488. <i class="fa fa-link"></i>
  489. 35
  490. </a>
  491. <a class="diff-line-num" data-line-number="36" href="#L36" id="L36">
  492. <i class="fa fa-link"></i>
  493. 36
  494. </a>
  495. <a class="diff-line-num" data-line-number="37" href="#L37" id="L37">
  496. <i class="fa fa-link"></i>
  497. 37
  498. </a>
  499. <a class="diff-line-num" data-line-number="38" href="#L38" id="L38">
  500. <i class="fa fa-link"></i>
  501. 38
  502. </a>
  503. <a class="diff-line-num" data-line-number="39" href="#L39" id="L39">
  504. <i class="fa fa-link"></i>
  505. 39
  506. </a>
  507. <a class="diff-line-num" data-line-number="40" href="#L40" id="L40">
  508. <i class="fa fa-link"></i>
  509. 40
  510. </a>
  511. <a class="diff-line-num" data-line-number="41" href="#L41" id="L41">
  512. <i class="fa fa-link"></i>
  513. 41
  514. </a>
  515. <a class="diff-line-num" data-line-number="42" href="#L42" id="L42">
  516. <i class="fa fa-link"></i>
  517. 42
  518. </a>
  519. <a class="diff-line-num" data-line-number="43" href="#L43" id="L43">
  520. <i class="fa fa-link"></i>
  521. 43
  522. </a>
  523. <a class="diff-line-num" data-line-number="44" href="#L44" id="L44">
  524. <i class="fa fa-link"></i>
  525. 44
  526. </a>
  527. <a class="diff-line-num" data-line-number="45" href="#L45" id="L45">
  528. <i class="fa fa-link"></i>
  529. 45
  530. </a>
  531. <a class="diff-line-num" data-line-number="46" href="#L46" id="L46">
  532. <i class="fa fa-link"></i>
  533. 46
  534. </a>
  535. <a class="diff-line-num" data-line-number="47" href="#L47" id="L47">
  536. <i class="fa fa-link"></i>
  537. 47
  538. </a>
  539. <a class="diff-line-num" data-line-number="48" href="#L48" id="L48">
  540. <i class="fa fa-link"></i>
  541. 48
  542. </a>
  543. <a class="diff-line-num" data-line-number="49" href="#L49" id="L49">
  544. <i class="fa fa-link"></i>
  545. 49
  546. </a>
  547. <a class="diff-line-num" data-line-number="50" href="#L50" id="L50">
  548. <i class="fa fa-link"></i>
  549. 50
  550. </a>
  551. <a class="diff-line-num" data-line-number="51" href="#L51" id="L51">
  552. <i class="fa fa-link"></i>
  553. 51
  554. </a>
  555. <a class="diff-line-num" data-line-number="52" href="#L52" id="L52">
  556. <i class="fa fa-link"></i>
  557. 52
  558. </a>
  559. <a class="diff-line-num" data-line-number="53" href="#L53" id="L53">
  560. <i class="fa fa-link"></i>
  561. 53
  562. </a>
  563. <a class="diff-line-num" data-line-number="54" href="#L54" id="L54">
  564. <i class="fa fa-link"></i>
  565. 54
  566. </a>
  567. <a class="diff-line-num" data-line-number="55" href="#L55" id="L55">
  568. <i class="fa fa-link"></i>
  569. 55
  570. </a>
  571. <a class="diff-line-num" data-line-number="56" href="#L56" id="L56">
  572. <i class="fa fa-link"></i>
  573. 56
  574. </a>
  575. <a class="diff-line-num" data-line-number="57" href="#L57" id="L57">
  576. <i class="fa fa-link"></i>
  577. 57
  578. </a>
  579. <a class="diff-line-num" data-line-number="58" href="#L58" id="L58">
  580. <i class="fa fa-link"></i>
  581. 58
  582. </a>
  583. <a class="diff-line-num" data-line-number="59" href="#L59" id="L59">
  584. <i class="fa fa-link"></i>
  585. 59
  586. </a>
  587. <a class="diff-line-num" data-line-number="60" href="#L60" id="L60">
  588. <i class="fa fa-link"></i>
  589. 60
  590. </a>
  591. <a class="diff-line-num" data-line-number="61" href="#L61" id="L61">
  592. <i class="fa fa-link"></i>
  593. 61
  594. </a>
  595. <a class="diff-line-num" data-line-number="62" href="#L62" id="L62">
  596. <i class="fa fa-link"></i>
  597. 62
  598. </a>
  599. <a class="diff-line-num" data-line-number="63" href="#L63" id="L63">
  600. <i class="fa fa-link"></i>
  601. 63
  602. </a>
  603. <a class="diff-line-num" data-line-number="64" href="#L64" id="L64">
  604. <i class="fa fa-link"></i>
  605. 64
  606. </a>
  607. <a class="diff-line-num" data-line-number="65" href="#L65" id="L65">
  608. <i class="fa fa-link"></i>
  609. 65
  610. </a>
  611. <a class="diff-line-num" data-line-number="66" href="#L66" id="L66">
  612. <i class="fa fa-link"></i>
  613. 66
  614. </a>
  615. <a class="diff-line-num" data-line-number="67" href="#L67" id="L67">
  616. <i class="fa fa-link"></i>
  617. 67
  618. </a>
  619. <a class="diff-line-num" data-line-number="68" href="#L68" id="L68">
  620. <i class="fa fa-link"></i>
  621. 68
  622. </a>
  623. <a class="diff-line-num" data-line-number="69" href="#L69" id="L69">
  624. <i class="fa fa-link"></i>
  625. 69
  626. </a>
  627. <a class="diff-line-num" data-line-number="70" href="#L70" id="L70">
  628. <i class="fa fa-link"></i>
  629. 70
  630. </a>
  631. <a class="diff-line-num" data-line-number="71" href="#L71" id="L71">
  632. <i class="fa fa-link"></i>
  633. 71
  634. </a>
  635. <a class="diff-line-num" data-line-number="72" href="#L72" id="L72">
  636. <i class="fa fa-link"></i>
  637. 72
  638. </a>
  639. <a class="diff-line-num" data-line-number="73" href="#L73" id="L73">
  640. <i class="fa fa-link"></i>
  641. 73
  642. </a>
  643. <a class="diff-line-num" data-line-number="74" href="#L74" id="L74">
  644. <i class="fa fa-link"></i>
  645. 74
  646. </a>
  647. <a class="diff-line-num" data-line-number="75" href="#L75" id="L75">
  648. <i class="fa fa-link"></i>
  649. 75
  650. </a>
  651. <a class="diff-line-num" data-line-number="76" href="#L76" id="L76">
  652. <i class="fa fa-link"></i>
  653. 76
  654. </a>
  655. <a class="diff-line-num" data-line-number="77" href="#L77" id="L77">
  656. <i class="fa fa-link"></i>
  657. 77
  658. </a>
  659. <a class="diff-line-num" data-line-number="78" href="#L78" id="L78">
  660. <i class="fa fa-link"></i>
  661. 78
  662. </a>
  663. <a class="diff-line-num" data-line-number="79" href="#L79" id="L79">
  664. <i class="fa fa-link"></i>
  665. 79
  666. </a>
  667. <a class="diff-line-num" data-line-number="80" href="#L80" id="L80">
  668. <i class="fa fa-link"></i>
  669. 80
  670. </a>
  671. <a class="diff-line-num" data-line-number="81" href="#L81" id="L81">
  672. <i class="fa fa-link"></i>
  673. 81
  674. </a>
  675. <a class="diff-line-num" data-line-number="82" href="#L82" id="L82">
  676. <i class="fa fa-link"></i>
  677. 82
  678. </a>
  679. <a class="diff-line-num" data-line-number="83" href="#L83" id="L83">
  680. <i class="fa fa-link"></i>
  681. 83
  682. </a>
  683. <a class="diff-line-num" data-line-number="84" href="#L84" id="L84">
  684. <i class="fa fa-link"></i>
  685. 84
  686. </a>
  687. <a class="diff-line-num" data-line-number="85" href="#L85" id="L85">
  688. <i class="fa fa-link"></i>
  689. 85
  690. </a>
  691. <a class="diff-line-num" data-line-number="86" href="#L86" id="L86">
  692. <i class="fa fa-link"></i>
  693. 86
  694. </a>
  695. <a class="diff-line-num" data-line-number="87" href="#L87" id="L87">
  696. <i class="fa fa-link"></i>
  697. 87
  698. </a>
  699. <a class="diff-line-num" data-line-number="88" href="#L88" id="L88">
  700. <i class="fa fa-link"></i>
  701. 88
  702. </a>
  703. <a class="diff-line-num" data-line-number="89" href="#L89" id="L89">
  704. <i class="fa fa-link"></i>
  705. 89
  706. </a>
  707. <a class="diff-line-num" data-line-number="90" href="#L90" id="L90">
  708. <i class="fa fa-link"></i>
  709. 90
  710. </a>
  711. <a class="diff-line-num" data-line-number="91" href="#L91" id="L91">
  712. <i class="fa fa-link"></i>
  713. 91
  714. </a>
  715. <a class="diff-line-num" data-line-number="92" href="#L92" id="L92">
  716. <i class="fa fa-link"></i>
  717. 92
  718. </a>
  719. <a class="diff-line-num" data-line-number="93" href="#L93" id="L93">
  720. <i class="fa fa-link"></i>
  721. 93
  722. </a>
  723. <a class="diff-line-num" data-line-number="94" href="#L94" id="L94">
  724. <i class="fa fa-link"></i>
  725. 94
  726. </a>
  727. <a class="diff-line-num" data-line-number="95" href="#L95" id="L95">
  728. <i class="fa fa-link"></i>
  729. 95
  730. </a>
  731. <a class="diff-line-num" data-line-number="96" href="#L96" id="L96">
  732. <i class="fa fa-link"></i>
  733. 96
  734. </a>
  735. <a class="diff-line-num" data-line-number="97" href="#L97" id="L97">
  736. <i class="fa fa-link"></i>
  737. 97
  738. </a>
  739. <a class="diff-line-num" data-line-number="98" href="#L98" id="L98">
  740. <i class="fa fa-link"></i>
  741. 98
  742. </a>
  743. <a class="diff-line-num" data-line-number="99" href="#L99" id="L99">
  744. <i class="fa fa-link"></i>
  745. 99
  746. </a>
  747. <a class="diff-line-num" data-line-number="100" href="#L100" id="L100">
  748. <i class="fa fa-link"></i>
  749. 100
  750. </a>
  751. <a class="diff-line-num" data-line-number="101" href="#L101" id="L101">
  752. <i class="fa fa-link"></i>
  753. 101
  754. </a>
  755. <a class="diff-line-num" data-line-number="102" href="#L102" id="L102">
  756. <i class="fa fa-link"></i>
  757. 102
  758. </a>
  759. <a class="diff-line-num" data-line-number="103" href="#L103" id="L103">
  760. <i class="fa fa-link"></i>
  761. 103
  762. </a>
  763. <a class="diff-line-num" data-line-number="104" href="#L104" id="L104">
  764. <i class="fa fa-link"></i>
  765. 104
  766. </a>
  767. <a class="diff-line-num" data-line-number="105" href="#L105" id="L105">
  768. <i class="fa fa-link"></i>
  769. 105
  770. </a>
  771. <a class="diff-line-num" data-line-number="106" href="#L106" id="L106">
  772. <i class="fa fa-link"></i>
  773. 106
  774. </a>
  775. <a class="diff-line-num" data-line-number="107" href="#L107" id="L107">
  776. <i class="fa fa-link"></i>
  777. 107
  778. </a>
  779. <a class="diff-line-num" data-line-number="108" href="#L108" id="L108">
  780. <i class="fa fa-link"></i>
  781. 108
  782. </a>
  783. <a class="diff-line-num" data-line-number="109" href="#L109" id="L109">
  784. <i class="fa fa-link"></i>
  785. 109
  786. </a>
  787. <a class="diff-line-num" data-line-number="110" href="#L110" id="L110">
  788. <i class="fa fa-link"></i>
  789. 110
  790. </a>
  791. <a class="diff-line-num" data-line-number="111" href="#L111" id="L111">
  792. <i class="fa fa-link"></i>
  793. 111
  794. </a>
  795. <a class="diff-line-num" data-line-number="112" href="#L112" id="L112">
  796. <i class="fa fa-link"></i>
  797. 112
  798. </a>
  799. <a class="diff-line-num" data-line-number="113" href="#L113" id="L113">
  800. <i class="fa fa-link"></i>
  801. 113
  802. </a>
  803. <a class="diff-line-num" data-line-number="114" href="#L114" id="L114">
  804. <i class="fa fa-link"></i>
  805. 114
  806. </a>
  807. <a class="diff-line-num" data-line-number="115" href="#L115" id="L115">
  808. <i class="fa fa-link"></i>
  809. 115
  810. </a>
  811. <a class="diff-line-num" data-line-number="116" href="#L116" id="L116">
  812. <i class="fa fa-link"></i>
  813. 116
  814. </a>
  815. <a class="diff-line-num" data-line-number="117" href="#L117" id="L117">
  816. <i class="fa fa-link"></i>
  817. 117
  818. </a>
  819. <a class="diff-line-num" data-line-number="118" href="#L118" id="L118">
  820. <i class="fa fa-link"></i>
  821. 118
  822. </a>
  823. <a class="diff-line-num" data-line-number="119" href="#L119" id="L119">
  824. <i class="fa fa-link"></i>
  825. 119
  826. </a>
  827. <a class="diff-line-num" data-line-number="120" href="#L120" id="L120">
  828. <i class="fa fa-link"></i>
  829. 120
  830. </a>
  831. <a class="diff-line-num" data-line-number="121" href="#L121" id="L121">
  832. <i class="fa fa-link"></i>
  833. 121
  834. </a>
  835. <a class="diff-line-num" data-line-number="122" href="#L122" id="L122">
  836. <i class="fa fa-link"></i>
  837. 122
  838. </a>
  839. <a class="diff-line-num" data-line-number="123" href="#L123" id="L123">
  840. <i class="fa fa-link"></i>
  841. 123
  842. </a>
  843. <a class="diff-line-num" data-line-number="124" href="#L124" id="L124">
  844. <i class="fa fa-link"></i>
  845. 124
  846. </a>
  847. <a class="diff-line-num" data-line-number="125" href="#L125" id="L125">
  848. <i class="fa fa-link"></i>
  849. 125
  850. </a>
  851. <a class="diff-line-num" data-line-number="126" href="#L126" id="L126">
  852. <i class="fa fa-link"></i>
  853. 126
  854. </a>
  855. <a class="diff-line-num" data-line-number="127" href="#L127" id="L127">
  856. <i class="fa fa-link"></i>
  857. 127
  858. </a>
  859. <a class="diff-line-num" data-line-number="128" href="#L128" id="L128">
  860. <i class="fa fa-link"></i>
  861. 128
  862. </a>
  863. <a class="diff-line-num" data-line-number="129" href="#L129" id="L129">
  864. <i class="fa fa-link"></i>
  865. 129
  866. </a>
  867. <a class="diff-line-num" data-line-number="130" href="#L130" id="L130">
  868. <i class="fa fa-link"></i>
  869. 130
  870. </a>
  871. <a class="diff-line-num" data-line-number="131" href="#L131" id="L131">
  872. <i class="fa fa-link"></i>
  873. 131
  874. </a>
  875. <a class="diff-line-num" data-line-number="132" href="#L132" id="L132">
  876. <i class="fa fa-link"></i>
  877. 132
  878. </a>
  879. <a class="diff-line-num" data-line-number="133" href="#L133" id="L133">
  880. <i class="fa fa-link"></i>
  881. 133
  882. </a>
  883. <a class="diff-line-num" data-line-number="134" href="#L134" id="L134">
  884. <i class="fa fa-link"></i>
  885. 134
  886. </a>
  887. <a class="diff-line-num" data-line-number="135" href="#L135" id="L135">
  888. <i class="fa fa-link"></i>
  889. 135
  890. </a>
  891. <a class="diff-line-num" data-line-number="136" href="#L136" id="L136">
  892. <i class="fa fa-link"></i>
  893. 136
  894. </a>
  895. <a class="diff-line-num" data-line-number="137" href="#L137" id="L137">
  896. <i class="fa fa-link"></i>
  897. 137
  898. </a>
  899. <a class="diff-line-num" data-line-number="138" href="#L138" id="L138">
  900. <i class="fa fa-link"></i>
  901. 138
  902. </a>
  903. <a class="diff-line-num" data-line-number="139" href="#L139" id="L139">
  904. <i class="fa fa-link"></i>
  905. 139
  906. </a>
  907. <a class="diff-line-num" data-line-number="140" href="#L140" id="L140">
  908. <i class="fa fa-link"></i>
  909. 140
  910. </a>
  911. <a class="diff-line-num" data-line-number="141" href="#L141" id="L141">
  912. <i class="fa fa-link"></i>
  913. 141
  914. </a>
  915. <a class="diff-line-num" data-line-number="142" href="#L142" id="L142">
  916. <i class="fa fa-link"></i>
  917. 142
  918. </a>
  919. <a class="diff-line-num" data-line-number="143" href="#L143" id="L143">
  920. <i class="fa fa-link"></i>
  921. 143
  922. </a>
  923. </div>
  924. <div class="blob-content" data-blob-id="ff646ecdfc24e59b217bd34cdc5b71ea7c69f0e6">
  925. <pre class="code highlight"><code><span id="LC1" class="line"><span class="c"># ##### BEGIN GPL LICENSE BLOCK #####</span></span>
  926. <span id="LC2" class="line"><span class="c">#</span></span>
  927. <span id="LC3" class="line"><span class="c"># This program is free software; you can redistribute it and/or</span></span>
  928. <span id="LC4" class="line"><span class="c"># modify it under the terms of the GNU General Public License</span></span>
  929. <span id="LC5" class="line"><span class="c"># as published by the Free Software Foundation; either version 2</span></span>
  930. <span id="LC6" class="line"><span class="c"># of the License, or (at your option) any later version.</span></span>
  931. <span id="LC7" class="line"><span class="c">#</span></span>
  932. <span id="LC8" class="line"><span class="c"># This program is distributed in the hope that it will be useful,</span></span>
  933. <span id="LC9" class="line"><span class="c"># but WITHOUT ANY WARRANTY; without even the implied warranty of</span></span>
  934. <span id="LC10" class="line"><span class="c"># MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the</span></span>
  935. <span id="LC11" class="line"><span class="c"># GNU General Public License for more details.</span></span>
  936. <span id="LC12" class="line"><span class="c">#</span></span>
  937. <span id="LC13" class="line"><span class="c"># You should have received a copy of the GNU General Public License</span></span>
  938. <span id="LC14" class="line"><span class="c"># along with this program; if not, write to the Free Software Foundation,</span></span>
  939. <span id="LC15" class="line"><span class="c"># Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.</span></span>
  940. <span id="LC16" class="line"><span class="c">#</span></span>
  941. <span id="LC17" class="line"><span class="c"># ##### END GPL LICENSE BLOCK #####</span></span>
  942. <span id="LC18" class="line"></span>
  943. <span id="LC19" class="line"><span class="c"># &lt;pep8-80 compliant&gt;</span></span>
  944. <span id="LC20" class="line"><span class="kn">import</span> <span class="nn">bpy</span></span>
  945. <span id="LC21" class="line"><span class="kn">from</span> <span class="nn">bpy.app.handlers</span> <span class="kn">import</span> <span class="n">persistent</span></span>
  946. <span id="LC22" class="line"></span>
  947. <span id="LC23" class="line"><span class="n">bl_info</span> <span class="o">=</span> <span class="p">{</span></span>
  948. <span id="LC24" class="line"> <span class="s">'name'</span><span class="p">:</span> <span class="s">'Text FX'</span><span class="p">,</span></span>
  949. <span id="LC25" class="line"> <span class="s">'author'</span><span class="p">:</span> <span class="s">'Bassam Kurdali'</span><span class="p">,</span></span>
  950. <span id="LC26" class="line"> <span class="s">'version'</span><span class="p">:</span> <span class="s">'1.0'</span><span class="p">,</span></span>
  951. <span id="LC27" class="line"> <span class="s">'blender'</span><span class="p">:</span> <span class="p">(</span><span class="mi">2</span><span class="p">,</span> <span class="mi">7</span><span class="p">,</span> <span class="mi">2</span><span class="p">),</span></span>
  952. <span id="LC28" class="line"> <span class="s">'location'</span><span class="p">:</span> <span class="s">'Properties Editor, Text Context'</span><span class="p">,</span></span>
  953. <span id="LC29" class="line"> <span class="s">'description'</span><span class="p">:</span> <span class="s">'Text Animation Effects, formerly Typewriter Text'</span><span class="p">,</span></span>
  954. <span id="LC30" class="line"> <span class="s">'url'</span><span class="p">:</span> <span class="s">'http://urchn.org'</span><span class="p">,</span></span>
  955. <span id="LC31" class="line"> <span class="s">'category'</span><span class="p">:</span> <span class="s">'Text'</span><span class="p">}</span></span>
  956. <span id="LC32" class="line"></span>
  957. <span id="LC33" class="line"><span class="n">__bpydoc__</span> <span class="o">=</span> <span class="s">"""</span></span>
  958. <span id="LC34" class="line"><span class="s">Typewriter Text Animation For Font Objects</span></span>
  959. <span id="LC35" class="line"></span>
  960. <span id="LC36" class="line"><span class="s">"""</span></span>
  961. <span id="LC37" class="line"></span>
  962. <span id="LC38" class="line"></span>
  963. <span id="LC39" class="line"><span class="k">def</span> <span class="nf">uptext</span><span class="p">(</span><span class="n">text</span><span class="p">):</span></span>
  964. <span id="LC40" class="line"> <span class="s">'''</span></span>
  965. <span id="LC41" class="line"><span class="s"> slice the source text up to the character_count</span></span>
  966. <span id="LC42" class="line"><span class="s"> '''</span></span>
  967. <span id="LC43" class="line"> <span class="n">source</span> <span class="o">=</span> <span class="n">text</span><span class="o">.</span><span class="n">source_text</span></span>
  968. <span id="LC44" class="line"> <span class="k">if</span> <span class="n">source</span> <span class="ow">in</span> <span class="n">bpy</span><span class="o">.</span><span class="n">data</span><span class="o">.</span><span class="n">texts</span><span class="p">:</span></span>
  969. <span id="LC45" class="line"> <span class="n">text</span><span class="o">.</span><span class="n">body</span> <span class="o">=</span> <span class="n">bpy</span><span class="o">.</span><span class="n">data</span><span class="o">.</span><span class="n">texts</span><span class="p">[</span><span class="n">source</span><span class="p">]</span><span class="o">.</span><span class="n">as_string</span><span class="p">()[:</span><span class="n">text</span><span class="o">.</span><span class="n">character_count</span><span class="p">]</span></span>
  970. <span id="LC46" class="line"> <span class="k">else</span><span class="p">:</span></span>
  971. <span id="LC47" class="line"> <span class="n">text</span><span class="o">.</span><span class="n">body</span> <span class="o">=</span> <span class="n">source</span><span class="p">[:</span><span class="n">text</span><span class="o">.</span><span class="n">character_count</span><span class="p">]</span></span>
  972. <span id="LC48" class="line"></span>
  973. <span id="LC49" class="line"></span>
  974. <span id="LC50" class="line"><span class="nd">@persistent</span> </span>
  975. <span id="LC51" class="line"><span class="k">def</span> <span class="nf">typewriter_text_update_frame</span><span class="p">(</span><span class="n">scene</span><span class="p">):</span></span>
  976. <span id="LC52" class="line"> <span class="s">'''</span></span>
  977. <span id="LC53" class="line"><span class="s"> sadly we need this for frame change updating</span></span>
  978. <span id="LC54" class="line"><span class="s"> '''</span></span>
  979. <span id="LC55" class="line"> <span class="k">for</span> <span class="n">text</span> <span class="ow">in</span> <span class="n">scene</span><span class="o">.</span><span class="n">objects</span><span class="p">:</span></span>
  980. <span id="LC56" class="line"> <span class="k">if</span> <span class="n">text</span><span class="o">.</span><span class="nb">type</span> <span class="o">==</span> <span class="s">'FONT'</span> <span class="ow">and</span> <span class="n">text</span><span class="o">.</span><span class="n">data</span><span class="o">.</span><span class="n">use_animated_text</span><span class="p">:</span></span>
  981. <span id="LC57" class="line"> <span class="n">uptext</span><span class="p">(</span><span class="n">text</span><span class="o">.</span><span class="n">data</span><span class="p">)</span></span>
  982. <span id="LC58" class="line"></span>
  983. <span id="LC59" class="line"></span>
  984. <span id="LC60" class="line"><span class="k">def</span> <span class="nf">update_func</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">context</span><span class="p">):</span></span>
  985. <span id="LC61" class="line"> <span class="s">'''</span></span>
  986. <span id="LC62" class="line"><span class="s"> updates when changing the value</span></span>
  987. <span id="LC63" class="line"><span class="s"> '''</span></span>
  988. <span id="LC64" class="line"> <span class="n">uptext</span><span class="p">(</span><span class="bp">self</span><span class="p">)</span></span>
  989. <span id="LC65" class="line"></span>
  990. <span id="LC66" class="line"></span>
  991. <span id="LC67" class="line"><span class="k">class</span> <span class="nc">TEXT_PT_Typewriter</span><span class="p">(</span><span class="n">bpy</span><span class="o">.</span><span class="n">types</span><span class="o">.</span><span class="n">Panel</span><span class="p">):</span></span>
  992. <span id="LC68" class="line"> <span class="s">'''</span></span>
  993. <span id="LC69" class="line"><span class="s"> Typewriter Effect Panel</span></span>
  994. <span id="LC70" class="line"><span class="s"> '''</span></span>
  995. <span id="LC71" class="line"> <span class="n">bl_label</span> <span class="o">=</span> <span class="s">"Typewriter Effect"</span></span>
  996. <span id="LC72" class="line"> <span class="n">bl_idname</span> <span class="o">=</span> <span class="s">"TEXT_PT_Typewriter"</span></span>
  997. <span id="LC73" class="line"> <span class="n">bl_space_type</span> <span class="o">=</span> <span class="s">'PROPERTIES'</span></span>
  998. <span id="LC74" class="line"> <span class="n">bl_region_type</span> <span class="o">=</span> <span class="s">'WINDOW'</span></span>
  999. <span id="LC75" class="line"> <span class="n">bl_context</span> <span class="o">=</span> <span class="s">'data'</span></span>
  1000. <span id="LC76" class="line"></span>
  1001. <span id="LC77" class="line"> <span class="nd">@classmethod</span></span>
  1002. <span id="LC78" class="line"> <span class="k">def</span> <span class="nf">poll</span><span class="p">(</span><span class="n">cls</span><span class="p">,</span> <span class="n">context</span><span class="p">):</span></span>
  1003. <span id="LC79" class="line"> <span class="k">return</span> <span class="n">context</span><span class="o">.</span><span class="n">active_object</span> <span class="ow">and</span> <span class="n">context</span><span class="o">.</span><span class="n">active_object</span><span class="o">.</span><span class="nb">type</span> <span class="o">==</span> <span class="s">'FONT'</span></span>
  1004. <span id="LC80" class="line"></span>
  1005. <span id="LC81" class="line"> <span class="k">def</span> <span class="nf">draw_header</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">context</span><span class="p">):</span></span>
  1006. <span id="LC82" class="line"> <span class="n">text</span> <span class="o">=</span> <span class="n">context</span><span class="o">.</span><span class="n">active_object</span><span class="o">.</span><span class="n">data</span></span>
  1007. <span id="LC83" class="line"> <span class="n">layout</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">layout</span></span>
  1008. <span id="LC84" class="line"> <span class="n">layout</span><span class="o">.</span><span class="n">prop</span><span class="p">(</span><span class="n">text</span><span class="p">,</span> <span class="s">'use_animated_text'</span><span class="p">,</span> <span class="n">text</span><span class="o">=</span><span class="s">""</span><span class="p">)</span></span>
  1009. <span id="LC85" class="line"></span>
  1010. <span id="LC86" class="line"> <span class="k">def</span> <span class="nf">draw</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">context</span><span class="p">):</span></span>
  1011. <span id="LC87" class="line"> <span class="n">st</span> <span class="o">=</span> <span class="n">context</span><span class="o">.</span><span class="n">space_data</span></span>
  1012. <span id="LC88" class="line"> <span class="n">text</span> <span class="o">=</span> <span class="n">context</span><span class="o">.</span><span class="n">active_object</span><span class="o">.</span><span class="n">data</span></span>
  1013. <span id="LC89" class="line"> <span class="n">layout</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">layout</span></span>
  1014. <span id="LC90" class="line"> <span class="n">layout</span><span class="o">.</span><span class="n">prop</span><span class="p">(</span><span class="n">text</span><span class="p">,</span> <span class="s">'character_count'</span><span class="p">)</span></span>
  1015. <span id="LC91" class="line"> <span class="n">layout</span><span class="o">.</span><span class="n">prop</span><span class="p">(</span><span class="n">text</span><span class="p">,</span> <span class="s">'use_text_datablock'</span><span class="p">)</span></span>
  1016. <span id="LC92" class="line"> <span class="k">if</span> <span class="ow">not</span> <span class="n">text</span><span class="o">.</span><span class="n">use_text_datablock</span><span class="p">:</span></span>
  1017. <span id="LC93" class="line"> <span class="n">layout</span><span class="o">.</span><span class="n">prop</span><span class="p">(</span><span class="n">text</span><span class="p">,</span> <span class="s">'source_text'</span><span class="p">)</span></span>
  1018. <span id="LC94" class="line"> <span class="k">else</span><span class="p">:</span></span>
  1019. <span id="LC95" class="line"> <span class="n">layout</span><span class="o">.</span><span class="n">prop</span><span class="p">(</span><span class="n">text</span><span class="p">,</span> <span class="s">'source_text_file'</span><span class="p">)</span></span>
  1020. <span id="LC96" class="line"></span>
  1021. <span id="LC97" class="line"></span>
  1022. <span id="LC98" class="line"><span class="k">def</span> <span class="nf">get_text_blocks</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">context</span><span class="p">):</span></span>
  1023. <span id="LC99" class="line"> <span class="s">'''Return Text Datablocks for Enum Property'''</span></span>
  1024. <span id="LC100" class="line"> <span class="k">return</span> <span class="p">[</span><span class="nb">tuple</span><span class="p">([</span><span class="n">dblock</span><span class="o">.</span><span class="n">name</span><span class="p">]</span> <span class="o">*</span> <span class="mi">3</span><span class="p">)</span> <span class="k">for</span> <span class="n">dblock</span> <span class="ow">in</span> <span class="n">bpy</span><span class="o">.</span><span class="n">data</span><span class="o">.</span><span class="n">texts</span><span class="p">]</span></span>
  1025. <span id="LC101" class="line"></span>
  1026. <span id="LC102" class="line"></span>
  1027. <span id="LC103" class="line"><span class="k">def</span> <span class="nf">register</span><span class="p">():</span></span>
  1028. <span id="LC104" class="line"> <span class="s">'''</span></span>
  1029. <span id="LC105" class="line"><span class="s"> addon registration function</span></span>
  1030. <span id="LC106" class="line"><span class="s"> '''</span></span>
  1031. <span id="LC107" class="line"> <span class="c"># create properties</span></span>
  1032. <span id="LC108" class="line"> <span class="n">bpy</span><span class="o">.</span><span class="n">types</span><span class="o">.</span><span class="n">TextCurve</span><span class="o">.</span><span class="n">character_count</span> <span class="o">=</span> <span class="n">bpy</span><span class="o">.</span><span class="n">props</span><span class="o">.</span><span class="n">IntProperty</span><span class="p">(</span></span>
  1033. <span id="LC109" class="line"> <span class="n">update</span><span class="o">=</span><span class="n">update_func</span><span class="p">,</span> <span class="nb">min</span><span class="o">=</span><span class="mi">0</span><span class="p">,</span> <span class="n">options</span><span class="o">=</span><span class="p">{</span><span class="s">'ANIMATABLE'</span><span class="p">})</span></span>
  1034. <span id="LC110" class="line"> <span class="n">bpy</span><span class="o">.</span><span class="n">types</span><span class="o">.</span><span class="n">TextCurve</span><span class="o">.</span><span class="n">backup_text</span> <span class="o">=</span> <span class="n">bpy</span><span class="o">.</span><span class="n">props</span><span class="o">.</span><span class="n">StringProperty</span><span class="p">()</span></span>
  1035. <span id="LC111" class="line"> <span class="n">bpy</span><span class="o">.</span><span class="n">types</span><span class="o">.</span><span class="n">TextCurve</span><span class="o">.</span><span class="n">use_animated_text</span> <span class="o">=</span> <span class="n">bpy</span><span class="o">.</span><span class="n">props</span><span class="o">.</span><span class="n">BoolProperty</span><span class="p">(</span></span>
  1036. <span id="LC112" class="line"> <span class="n">default</span><span class="o">=</span><span class="bp">False</span><span class="p">)</span></span>
  1037. <span id="LC113" class="line"> <span class="n">bpy</span><span class="o">.</span><span class="n">types</span><span class="o">.</span><span class="n">TextCurve</span><span class="o">.</span><span class="n">source_text</span> <span class="o">=</span> <span class="n">bpy</span><span class="o">.</span><span class="n">props</span><span class="o">.</span><span class="n">StringProperty</span><span class="p">()</span></span>
  1038. <span id="LC114" class="line"> <span class="n">bpy</span><span class="o">.</span><span class="n">types</span><span class="o">.</span><span class="n">TextCurve</span><span class="o">.</span><span class="n">use_text_datablock</span> <span class="o">=</span> <span class="n">bpy</span><span class="o">.</span><span class="n">props</span><span class="o">.</span><span class="n">BoolProperty</span><span class="p">(</span></span>
  1039. <span id="LC115" class="line"> <span class="n">default</span><span class="o">=</span><span class="bp">False</span><span class="p">)</span></span>
  1040. <span id="LC116" class="line"> <span class="n">bpy</span><span class="o">.</span><span class="n">types</span><span class="o">.</span><span class="n">TextCurve</span><span class="o">.</span><span class="n">source_datablock</span> <span class="o">=</span> <span class="n">bpy</span><span class="o">.</span><span class="n">props</span><span class="o">.</span><span class="n">EnumProperty</span><span class="p">(</span></span>
  1041. <span id="LC117" class="line"> <span class="n">items</span><span class="o">=</span><span class="n">get_text_blocks</span><span class="p">)</span></span>
  1042. <span id="LC118" class="line"> <span class="c"># register the module:</span></span>
  1043. <span id="LC119" class="line"> <span class="n">bpy</span><span class="o">.</span><span class="n">utils</span><span class="o">.</span><span class="n">register_class</span><span class="p">(</span><span class="n">TEXT_PT_Typewriter</span><span class="p">)</span></span>
  1044. <span id="LC120" class="line"> <span class="c"># add the frame change handler</span></span>
  1045. <span id="LC121" class="line"> <span class="n">bpy</span><span class="o">.</span><span class="n">app</span><span class="o">.</span><span class="n">handlers</span><span class="o">.</span><span class="n">frame_change_post</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="n">typewriter_text_update_frame</span><span class="p">)</span></span>
  1046. <span id="LC122" class="line"></span>
  1047. <span id="LC123" class="line"></span>
  1048. <span id="LC124" class="line"><span class="k">def</span> <span class="nf">unregister</span><span class="p">():</span></span>
  1049. <span id="LC125" class="line"> <span class="s">'''</span></span>
  1050. <span id="LC126" class="line"><span class="s"> addon unregistration function</span></span>
  1051. <span id="LC127" class="line"><span class="s"> '''</span></span>
  1052. <span id="LC128" class="line"> <span class="c"># remove the frame change handler</span></span>
  1053. <span id="LC129" class="line"> <span class="n">bpy</span><span class="o">.</span><span class="n">app</span><span class="o">.</span><span class="n">handlers</span><span class="o">.</span><span class="n">frame_change_post</span><span class="o">.</span><span class="n">remove</span><span class="p">(</span><span class="n">typewriter_text_update_frame</span><span class="p">)</span></span>
  1054. <span id="LC130" class="line"> <span class="c"># remove the panel</span></span>
  1055. <span id="LC131" class="line"> <span class="n">bpy</span><span class="o">.</span><span class="n">utils</span><span class="o">.</span><span class="n">unregister_class</span><span class="p">(</span><span class="n">TEXT_PT_Typewriter</span><span class="p">)</span></span>
  1056. <span id="LC132" class="line"> <span class="c"># remove the properties</span></span>
  1057. <span id="LC133" class="line"> <span class="k">del</span><span class="p">(</span><span class="n">bpy</span><span class="o">.</span><span class="n">types</span><span class="o">.</span><span class="n">TextCurve</span><span class="o">.</span><span class="n">character_count</span><span class="p">)</span></span>
  1058. <span id="LC134" class="line"> <span class="k">del</span><span class="p">(</span><span class="n">bpy</span><span class="o">.</span><span class="n">types</span><span class="o">.</span><span class="n">TextCurve</span><span class="o">.</span><span class="n">backup_text</span><span class="p">)</span></span>
  1059. <span id="LC135" class="line"> <span class="k">del</span><span class="p">(</span><span class="n">bpy</span><span class="o">.</span><span class="n">types</span><span class="o">.</span><span class="n">TextCurve</span><span class="o">.</span><span class="n">use_animated_text</span><span class="p">)</span></span>
  1060. <span id="LC136" class="line"> <span class="k">del</span><span class="p">(</span><span class="n">bpy</span><span class="o">.</span><span class="n">types</span><span class="o">.</span><span class="n">TextCurve</span><span class="o">.</span><span class="n">source_text</span><span class="p">)</span></span>
  1061. <span id="LC137" class="line"> <span class="k">del</span><span class="p">(</span><span class="n">bpy</span><span class="o">.</span><span class="n">types</span><span class="o">.</span><span class="n">TextCurve</span><span class="o">.</span><span class="n">use_text_datablock</span><span class="p">)</span></span>
  1062. <span id="LC138" class="line"></span>
  1063. <span id="LC139" class="line"></span>
  1064. <span id="LC140" class="line"><span class="k">if</span> <span class="n">__name__</span> <span class="o">==</span> <span class="s">"__main__"</span><span class="p">:</span></span>
  1065. <span id="LC141" class="line"> <span class="n">register</span><span class="p">()</span></span>
  1066. <span id="LC142" class="line"></span>
  1067. <span id="LC143" class="line"> </span></code></pre>
  1068. </div>
  1069. </div>
  1070.  
  1071.  
  1072. </article>
  1073. </div>
  1074.  
  1075. </div>
  1076. </div>
  1077.  
  1078. </div>
  1079. </div>
  1080. </div>
  1081. </div>
  1082.  
  1083.  
  1084.  
  1085. </body>
  1086. </html>
RAW Paste Data

Adblocker detected! Please consider disabling it...

We've detected AdBlock Plus or some other adblocking software preventing Pastebin.com from fully loading.

We don't have any obnoxious sound, or popup ads, we actively block these annoying types of ads!

Please add Pastebin.com to your ad blocker whitelist or disable your adblocking software.

×