Skip to content

Commit

Permalink
Merge pull request #64 from anvdev/dev
Browse files Browse the repository at this point in the history
New features
  • Loading branch information
Ivan Titov authored Mar 3, 2021
2 parents 07ea3ff + a9df1ae commit fb55b63
Show file tree
Hide file tree
Showing 24 changed files with 1,844 additions and 195 deletions.
32 changes: 14 additions & 18 deletions OPmenu.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<!--
Tool Development Kit for SideFX Houdini
Copyright (C) 2020 Ivan Titov
Copyright (C) 2021 Ivan Titov
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
Expand Down Expand Up @@ -30,10 +30,9 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
<scriptItem id="opmenu.tdk_generate_code">
<label>Generate Code...</label>
<scriptCode>
import houdini_tdk
reload(houdini_tdk)
import houdini_tdk as tdk

houdini_tdk.generateCode(**kwargs)
tdk.showGenerateCode(**kwargs)
</scriptCode>
</scriptItem>

Expand All @@ -49,19 +48,18 @@ houdini_tdk.showNodeUserData(cached=kwargs['shiftclick'], **kwargs)

<separatorItem/>

<scriptItem id="opmenu.tdk_make_hda_from_template">
<label>Make HDA from Template...</label>
<scriptItem id="opmenu.tdk_make_hda_by_template">
<label>Make HDA by Template...</label>
<context>
<expression>
node = kwargs['node']
return node.type().name() == 'tdk::template'
return node.type().name().startswith('tdk::template')
</expression>
</context>
<scriptCode>
import houdini_tdk
reload(houdini_tdk)
import houdini_tdk as tdk

houdini_tdk.showMakeHDAFromTemplateDialog(**kwargs)
tdk.showMakeHDAByTemplateDialog(**kwargs)
</scriptCode>
</scriptItem>

Expand All @@ -74,28 +72,26 @@ houdini_tdk.showMakeHDAFromTemplateDialog(**kwargs)
</expression>
</context>
<scriptCode>
import os
import webbrowser
from houdini_tdk.utils import openFileLocation

node = kwargs['node']
path = node.type().definition().libraryFilePath()
webbrowser.open('file:///' + os.path.dirname(path))
openFileLocation(path)
</scriptCode>
</scriptItem>

<scriptItem id="opmenu.tdk_increment_hda_version">
<label>Increment HDA Version...</label>
<scriptItem id="opmenu.tdk_new_hda_version">
<label>New HDA Version...</label>
<context>
<expression>
node = kwargs['node']
return node.type().definition() is not None
</expression>
</context>
<scriptCode>
import houdini_tdk
reload(houdini_tdk)
import houdini_tdk as tdk

houdini_tdk.showNewVersionDialog(**kwargs)
tdk.showNewVersionDialog(**kwargs)
</scriptCode>
</scriptItem>

Expand Down
25 changes: 16 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,17 @@

## Tools

#### HDA Doctor *Beta*

Tool that allows you to test your HDA with a set of inspections that check for compliance with high standards of HDA development.

![HDA Doctor](/images/hda_doctor.png)

#### Templates

Template HDAs that allows you to quickly create your own HDAs based on them.
Template HDAs that allows you to quickly create new HDAs based on them.

![Make HDA from Template](/images/make_hda_from_template.png)
![Make HDA by Template](/images/make_hda_by_template.gif)

#### Find Icon

Expand All @@ -19,30 +25,31 @@ Allows you to quickly find an icon for your tool.
Applies `.asCode()` to selected nodes. Then copies the resulting code to the clipboard or shows in code editor.

![Generate Code](/images/generate_code.png)
![Generate Code Settings](/images/generate_code_settings.png)

#### Increment HDA Version
#### New HDA Version

Increments the HDA version of the selected node. You can select the version type (major, minor, build, etc.).
Increments an HDA version of the selected node. You can select the version type (major, minor, build, etc.).

![Increment HDA Version](/images/increment_hda_version.png)
![New HDA Version](/images/new_hda_version.png)

#### Show Node User Data

Shows user data and cached user data of the selected node.

![Show Node User Data](/images/show_node_user_data.png)

## Installation (todo)
## Installation

- [16.0+] Package Manager (Recommended)
- [17.5+] Packages (template json file included)
- [16.0+] [Package Manager](https://github.com/Houdini-Packages/Houdini-Package-Manager) *Recommended*
- [17.5+] [Packages](https://www.sidefx.com/docs/houdini/ref/plugins.html) (template json file included)
- Environment file

## License

```
Tool Development Kit for SideFX Houdini
Copyright (C) 2020 Ivan Titov
Copyright (C) 2021 Ivan Titov
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
Expand Down
Binary file modified images/find_icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified images/generate_code.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/generate_code_settings.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/hda_doctor.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed images/increment_hda_version.png
Binary file not shown.
Binary file added images/make_hda_by_template.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed images/make_hda_from_template.png
Binary file not shown.
Binary file added images/new_hda_version.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified images/show_node_user_data.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified otls/tdk__template.hda
Binary file not shown.
7 changes: 4 additions & 3 deletions python2.7libs/houdini_tdk/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
"""
Tool Development Kit for SideFX Houdini
Copyright (C) 2020 Ivan Titov
Copyright (C) 2021 Ivan Titov
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
Expand All @@ -19,5 +19,6 @@
from .find_icon import FindIconDialog, findIcon
from .new_hda_version import NewVersionDialog, showNewVersionDialog
from .show_node_user_data import UserDataWindow, showNodeUserData
from .make_hda_from_template import MakeHDAFromTemplateDialog, showMakeHDAFromTemplateDialog
from .generate_code import generateCode
from .make_hda_by_template import MakeHDAByTemplateDialog, showMakeHDAByTemplateDialog
from .generate_code import showGenerateCode
from .hda_doctor import HDADoctorWindow
Loading

0 comments on commit fb55b63

Please sign in to comment.