-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathplugin-tag.sublime-snippet
51 lines (35 loc) · 1.18 KB
/
plugin-tag.sublime-snippet
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
<snippet>
<content><![CDATA[
"""
Plugin name : $0
Copyright:
Written for CINEMA 4D Rxx.xxx
Modified Date:
"""
import os
import c4d
from c4d import bitmaps, plugins, utils
# Be sure to use a unique ID obtained from www.plugincafe.com
# 1000001-1000010
PLUGIN_ID = 1000001
class $0(plugins.TagData):
"""docstring for $0"""
def Init(self, node):
return True
def Execute(self, tag, doc, op, bt, priority, flags):
return c4d.EXECUTIONRESULT_OK
if __name__ == "__main__":
bmp = bitmaps.BaseBitmap()
dir, file = os.path.split(__file__)
fn = os.path.join(dir, "res", "tpy$0.tif")
bmp.InitWith(fn)
plugins.RegisterTagPlugin(id=PLUGIN_ID, str="Py - $0",
info=c4d.TAG_MULTIPLE|c4d.TAG_EXPRESSION|c4d.TAG_VISIBLE, g=$0,
description="Tpy$0", icon=bmp)
]]></content>
<!-- Optional: Set a tabTrigger to define how to trigger the snippet -->
<tabTrigger>cinemaPlugin Tag</tabTrigger>
<!-- Optional: Set a scope to limit where the snippet will trigger -->
<scope>source.pythonAPI.cinema4D</scope>
<description> Tag structure</description>
</snippet>