Hooks: Where to start

update: 2021/12/29

Things have changed and it’s now much easier to add hooks to your Flame install.
Simply copy them in /opt/Autodesk/shared/python and restart flame.

Starting with Flame 2022, Flame hooks need to be python3.
I haven’t updated any of the scripts that could be found here prior to the update so they won’t work as is in Flame 2022 and up.

Stefan

————-

update: 2019/02/17

Hello,

If you’re new to this thing, you’ll need to know a few things about how to install the hooks and where to find them in Flame.

INSTALLATION:
First thing is to add the path of the folder where you’ll put the hooks, to you’re environment. Huh? Well, it sounds more complicated than what it is.

Two ways that i know of:
– Simply source the path
– Add the path to your env (.bash_profile on Mac, not sure about Linux yet, i’ll follow up)

Source the path:
The easiest and sort of temporary way is just to source a path or a file containing that path from the same terminal that you’ll start Flame from.

1) Put your hooks in a folder of your choice. I recommend to create a folder in /opt/Autodesk/shared/ (create a ‘python_hooks’ folder after that). This path will be later added to your env.

Then …
1) Open a shell (or terminal)
2) Type the following:
mac: export DL_PYTHON_HOOK_PATH=/path/to/your/chosen/folder
Linux: setenv DL_PYTHON_HOOK_PATH /path/to/your/chosen/folder
and hit enter
5) Start flame from that same shell.
/opt/Autodesk/flame_2019.2/bin/startApplication
Just replace ‘flame_2019.2’ by the version of Flame you’re running.
Done.

Add the path to your environment – Mac:
You could add the path editing the file from a shell but we’ll go through an easier way, more beginner friendly:
1) Navigate to you’re home directory and locate the file named ‘.bash_profile’.
Note the dot before the name, this is a hidden file so you’ll need to ‘show hidden folders’ one way or another.
2) open the file in a text editor and add the following line:
export DL_PYTHON_HOOK_PATH=/opt/Autodesk/shared/python_hooks
then save and close the file.
3) Open a shell and type: source ~/.bash_profile
hit enter
4) start flame from that same shell.
On Mac: /opt/Autodesk/flame_2019.2/bin/startApplication
Just replace ‘flame_2019.2’ by the version of Flame you’re running.
done.

FINDING HOOKS IN FLAME:

Depending of the type of hook and/or how the author decided to set them up, they can show up different menus:
– The contextual menu from the media panel (right click)
– The main menu (bottom right of the Flame UI). If a hook is in this menu, you can assign a short cut to it.
– More to come

Note: You can assign keyboard shortcuts to your hooks!
> go to the keyboard shortcuts menu and search for ‘hook’
—————-

Hope this help, to start with.
Stefan

Thanks Catalin for your notes and suggestions.

2 Replies to “Hooks: Where to start”

  1. Hi Stefan,

    I really like the idea of this site. Most likely, when I’ll find some time I register and jump in it.
    Till then, just a small comment on the page “Hooks: Where to start”:
    – In source the path paragraph is not clear from beginning that the text file (where you put the env path) is the “file.extension” (I took it from “source /path/to/my/file.extension”).
    – I assume you are using MAC since you’ve mentioned only the bash (export) environment. Maybe is not a bad idea to mention also about Flame’s on Linux default tcsh (setenv).
    Catalin

    1. Hi Catalin,

      Thank you for the note and suggestion -and for registering.
      I’ve updated the post with what i could for now, i’ll ask around for the Linux procedure. On the other hand, if you happen to have some time, please feel free to add it in a comment and i’ll update the post.
      Is the file.extension part a bit better now ?
      Thanks again.
      Stefan

Leave a Reply