Git Product home page Git Product logo

pushnotificate_for_c4d's Introduction

PushNotificate for C4D

モチベーション

Cinema4Dでのレンダリング完了を任意のデバイス端末にPush通知したい。

方法

  • Cinema4Dではレンダリング設定のRemoteにレンダリング完了をフックして起動する実行パスを設定できる。
  • push機能はPushbulletのAPIを使ってpythonで実装。Pushbulletアカウントを作成し、端末にAppをインストールする。

アーキテクチャー

レンダリング設定のRemoteパスにはスクリプトファイルを設定できなかった。(設定しても動作しない。) .exeは実行できるようなのでpythonスクリプトをexe化するpy2exeでexe化を試す。 が、パッケージングの際に組み込むモジュールに、今回の動作に必要なモジュールが足りないらしく動かない。 このあたり解決策がありそうだがよく分からない。 ので、最終的にバッチファイル(.bat)からスクリプトを実行すると動いた。

レンダリング完了 -> .batを実行 -> pythonを実行 -> Push!

Setup

Cinema4D 設定

レンダリング設定のRemoteにレンダリング完了をフックする起動アプリケーションを設定する。

  • Render Setting -> Effect -> Remote -> External App [ Push.bat ]

Python 設定

  • 前提

    • Python2.7.xがインストールされていること
    • PIPコマンドが使えること
  • 使用するライブラリ

  • コマンドラインでインストール

    • pip install pushbullet.py

Pushbullet 設定

config.jsonを編集する。

{
  "access_token" : "YOUR_ACCESS_TOKEN",
  "device_name"  : "YOUR_DEVICE_NAME",
  "send_title"   : "MESSAGE_TITLE",
  "send_body"    : "MESSAGE_BODY",
  "send_file"    : "FILE.png"
}
項目 設定
access_token pushbulletのアカウント設定ページからAccess Tokenをコピー
device_name 送信したいデバイス名
send_title 送信するメッセージタイトル。画像が空の場合に使用される。
send_body 送信するメッセージ内容。画像が空の場合に使用される。
send_file プレビュー送信したい画像。空の場合はtitleとbodyのみ送信される。

Enjoy!

pushnotificate_for_c4d's People

Contributors

sharkattack51 avatar

Stargazers

Kitasenju Design avatar

Watchers

 avatar James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.