This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <snippet> | |
| <content><![CDATA[ | |
| // Register Custom Post Type | |
| function ${1:custom_post_type}() { | |
| \$labels = array( | |
| 'name' => _x( '${2:post_type}s', 'Post Type General Name', '${3:text_domain}' ), | |
| 'singular_name' => _x( '${2:post_type}', 'Post Type Singular Name', '${3:text_domain}' ), | |
| 'menu_name' => __( '${2:post_type}', '${3:text_domain}' ), | |
| 'parent_item_colon' => __( 'Parent ${2:post_type}:', '${3:text_domain}' ), |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Show hidden characters
| { | |
| "cmd": ["node", "$file"], | |
| "selector" : "source.js", | |
| "path" : "/usr/local/bin" | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import c4d | |
| def main(): | |
| bc = c4d.GetWorldContainer() | |
| for index, value in bc: | |
| # If value is "basecontainer" | |
| print "Index: %i, Value: %s" % (index, str(value)) | |
| if bc.GetType(index) == 132: | |
| print " Container: %i, Value: %s" % (index, str(value)) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import c4d | |
| if c4d.IsCommandChecked(12101): | |
| c4d.CallCommand(12298) # Model | |
| elif c4d.IsCommandChecked(12298): | |
| c4d.CallCommand(12101) # Object |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| /*-----------------------------------------------------------------------------------*/ | |
| /* wpdb get title from post type | |
| /*-----------------------------------------------------------------------------------*/ | |
| $post_type = "project"; | |
| $results = $wpdb->get_results( | |
| $wpdb->prepare( " | |
| SELECT post_title | |
| FROM $wpdb->posts |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Use Gists to store code you would like to remember later on | |
| console.log(window); // log the "window" object to the console |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import re, c4d | |
| from c4d import documents as docs | |
| # Python tag that Mimics UDIM for texture tags in Cimena4D. | |
| # Name your texture tags 1001, 1002, 1021 etc | |
| # Doesn't check the number of tag on each row | |
| # Iterates through all tags on the object that this script is attached to | |
| # Find all texture tags with with name that starts with 10 (UDIM style) | |
| # Check if they are of type texture (5616) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import c4d | |
| from c4d import gui | |
| def main(): | |
| doc = c4d.documents.GetActiveDocument() | |
| op = doc.GetActiveObject() | |
| if op is None or op.GetType() != c4d.Opolygon: return | |
| bs = op.GetPointS() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import c4d | |
| from c4d import gui, documents | |
| def main(): | |
| # BaseDraw | |
| bd = doc.GetActiveBaseDraw() | |
| # The camera view | |
| view = bd.GetSafeFrame() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import c4d | |
| # Slightly modified version of Lennart's (tca studios) script from this thread: | |
| # http://www.plugincafe.com/forum/forum_posts.asp?TID=6600&KW=&PID=27379#27379 | |
| def main(): | |
| if op is None: return False | |
| oldm = op.GetMg() | |
| points = op.GetAllPoints() |
OlderNewer