Skip to content

Commit

Permalink
Update to Houdini 19 and python3
Browse files Browse the repository at this point in the history
  • Loading branch information
instance-id committed Dec 5, 2021
1 parent 9122599 commit f8a0614
Show file tree
Hide file tree
Showing 86 changed files with 10,974 additions and 96 deletions.
16 changes: 9 additions & 7 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#General ------------------------------------------------------------
**.idea*
**.idea/*
**.experiments*

#Golang -------------------------------------------------------------
Expand Down Expand Up @@ -49,13 +49,13 @@ share/python-wheels/
*.egg
MANIFEST
*.db
python2.7libs/*
!python2.7libs/searcher/
python2.7libs/searcher/.history
python*.7libs/*
!python*.7libs/searcher/
python*.7libs/searcher/.history
**.history*
python2.7libs/searcher/go/houdini
python2.7libs/searcher/db
python2.7libs/searcher/_conversion
python*.7libs/searcher/go/houdini
python*.7libs/searcher/db
python*.7libs/searcher/_conversion
# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
Expand Down Expand Up @@ -158,3 +158,5 @@ dmypy.json
.pyre/
venv1/*
.DS_Store

.idea/
26 changes: 0 additions & 26 deletions .idea/Searcher.iml

This file was deleted.

13 changes: 0 additions & 13 deletions .idea/misc.xml

This file was deleted.

8 changes: 0 additions & 8 deletions .idea/modules.xml

This file was deleted.

6 changes: 0 additions & 6 deletions .idea/vcs.xml

This file was deleted.

8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,17 @@ Thanks for checking out Searcher. Below are the instructions to get you up and r
## Help Docs
https://help.instance.id/searcher/

## Note for Houdini 18.5
SideFX has only included SQLite v 3.31.0 with H18.5 and their support has told me they have no plans to upgrade it to 3.33.0 (which has FTS5 enabled (Full-Text Search), which is needed by Searcher). Because of this, an extra step is required to install/use Searcher with Houdini 18.5 until/unless they decide to include SQLite 3.33.0 instead of 3.31.0.
## Note for Houdini 18.5+
SideFX has only included SQLite v 3.31.0 with H18.5 and their support has told me they have no plans to upgrade it to 3.33.0 (which has FTS5 enabled (Full-Text Search), which is needed by Searcher). Because of this, an extra step is required to install/use Searcher with Houdini 18.5+ until/unless they decide to include SQLite 3.33.0 instead of 3.31.0.

Download:
Windows x64: [SQLite v3.33.0](https://www.sqlite.org/2020/sqlite-dll-win64-x64-3330000.zip)
- Extract the downloaded sqlite-dll-win64-x64-3330000.zip file, then in another window browse to your Houdini installation directory: aka `$HFS/bin`.
By default this is located at: `C:\Program Files\SideFX\Houdini18.5.351\bin`
By default this is located at: `C:\Program Files\SideFX\Houdini19.0.xxx\bin`
- In the Houdini $HFS/bin folder, locate the `sqlite3.dll` file and either make a backup copy to save elsewhere (just in case), or simply rename it to `sqlite3.dll.bak`
- From the extracted sqlite-dll-win64-x64-3330000.zip, locate the new `sqlite3.dll` then copy and paste it into the `$HFS/bin` folder.

From my testing, that was all that needed to be done, as Searcher worked for me at that point, but Houdini support mentioned that the sqlite3.dll located in the `$HFS/python27/dlls` folder should be replaced as well. Just make sure to back it up/rename it as well. Always better to be safe than sorry!
From my testing, that was all that needed to be done, as Searcher worked for me at that point, but Houdini support mentioned that the sqlite3.dll located in the `$HFS/python27/dlls` or `$HFS/python37/dlls` folder should be replaced as well. Just make sure to back it up/rename it as well. Always better to be safe than sorry!

The process is the same for Unix OS's, you just have to go to the `$HFS/bin` folder that cooresponds to your particular OS and instead of looking for sqlite3.dll, the file will just be `sqlite3`. I would love to test it, but Houdini 18.5 on Linux crashes when I try to open it on both my laptop and VM on my desktop.

Expand Down
78 changes: 52 additions & 26 deletions build.ps1
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#!/usr/bin/env pwsh

# .\build.ps1 -Zip -Version v0.1.0
Param (
[Parameter()]
Expand All @@ -8,60 +10,84 @@ Param (
if ($Version) {
Write-Host "Building $Version..."
} else {
Write-Host "Just updating files..."
Write-Host 'Just updating files...'
}

$date = Get-Date -Format "yyyy-MM-dd_HH-mm-ss"
$exclude = "--exclude-from=E:\GitHub\Searcher\build\exclude.excl"
$include = "--include-from=E:\GitHub\Searcher\build\include.incl"
$config = "--config=C:/Users/mosthated/.backup/rclone.conf"

$cmd = "C:\files\rclone\rclone.exe"
$date = Get-Date -Format 'yyyy-MM-dd_HH-mm-ss'
$exclude = '--exclude-from=build/exclude.excl'
$include = '--include-from=build/include.incl'
$config = '--config=C:/Users/mosthated/.backup/rclone.conf'
$cmd = ''
$source1 = ''
$destination1 = ''

$source1 = "E:\GitHub\Searcher\"
$destination1 = "E:\Searcher"
$log1 = "--log-file=C:\files\rclone\logs\searcher_$date.log"
if ($IsWindows) {
$cmd = 'C:\files\rclone\rclone.exe'
$source1 = 'E:\GitHub\Searcher\'
$destination1 = 'E:\Searcher'
$log1 = "--log-file=C:\files\rclone\logs\Searcher_Build_$date.log"
} elseif ($IsLinux) {
$cmd = 'rclone'
$source1 = '/mnt/x/GitHub/instance-id/1_Projects/Searcher'
$destination1 = '/mnt/x/_dev/Searcher'
$log1 = "--log-file=$HOME/.backup/logs/Searcher_Build_$date.log"
}

&$cmd sync $source1 $destination1 $log1 $exclude $config --log-level NOTICE --progress --no-update-modtime --transfers=4 --checkers=8 --contimeout=60s --timeout=300s --retries=3 --low-level-retries=10 -L --stats=1s --stats-file-name-length=0 -P --ignore-case --fast-list --drive-chunk-size=64M
&$cmd sync $source1 $destination1 $log1 $exclude $config --log-level NOTICE `
--progress `
--no-update-modtime `
--transfers=4 `
--checkers=8 `
--contimeout=60s `
--timeout=300s `
--retries=3 `
--low-level-retries=10 `
-L `
--stats=1s `
--stats-file-name-length=0 `
-P `
--ignore-case `
--fast-list `
--drive-chunk-size=64M

if ($Version) {
Write-Host "Building $Version..."

$searcher = "Searcher"
$destination2 = $searcher, $Version -join "_"
$searcher = 'Searcher'
$destination2 = $searcher, $Version -join '_'
$folderVer = "$destination1\$destination2"

Write-Host "Destination2: $destination2"
if([System.IO.File]::Exists($folderVer)){

if ([System.IO.File]::Exists($folderVer)) {
Get-ChildItem $folderVer -Recurse -ErrorAction SilentlyContinue | Remove-Item -Recurse
}
New-Item "$folderVer\$searcher" -Type Directory
New-Item "$folderVer\$searcher" -Type Directory
Move-Item -Path $destination1\packages -Destination $folderVer\packages
Move-Item -Path $destination1\README.md -Destination $folderVer\README.md
Move-Item -Path $destination1\Searcher_install_instructions.url -Destination $folderVer\Searcher_install_instructions.url

Move-Item -Path $destination1\dso -Destination $folderVer\$searcher\dso
Move-Item -Path $destination1\help -Destination $folderVer\$searcher\help
Move-Item -Path $destination1\python2.7libs -Destination $folderVer\$searcher\python2.7libs
Move-Item -Path $destination1\python3.7libs -Destination $folderVer\$searcher\python3.7libs
Move-Item -Path $destination1\toolbar -Destination $folderVer\$searcher\toolbar

$listfiles = Get-ChildItem $folderVer -Recurse -File -Include '*.md', '*.txt'
$old = '{#version}'
foreach($file in $listfiles) {
(Get-Content $file) -Replace ($old,$Version) | Set-Content $file
foreach ($file in $listfiles) {
(Get-Content $file) -Replace ($old, $Version) | Set-Content $file
}

$FileName = "$destination1\$destination2.zip"
if (Test-Path $FileName) {
Write-Host "Removing $FileName and recreating"
Remove-Item $FileName
}
if($Zip)
{
if ($Zip) {
Compress-Archive -Path $folderVer -DestinationPath $FileName
}
Write-Host "Update Complete"
Write-Host 'Update Complete'
} else {
Write-Host "Update Complete"
Write-Host 'Update Complete'
}
2 changes: 2 additions & 0 deletions python2.7libs/searcher/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,5 @@
__author__ = "instance.id"
__copyright__ = "2020 All rights reserved. See LICENSE for more details."
__status__ = "Prototype"

from . searcher import *
1 change: 0 additions & 1 deletion python2.7libs/searcher/bugreport.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
import os

import hou

hver = 0
if os.environ["HFS"] != "":
ver = os.environ["HFS"]
Expand Down
4 changes: 0 additions & 4 deletions python2.7libs/searcher/nodegraphhooks.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,9 @@
sys.dont_write_bytecode = True

import hou

from PySide2 import QtWidgets

from houdini_markingmenu import markingmenu as mm

from canvaseventtypes import *

import nodegraphbase as base

sys.path.insert(0, os.path.join(hou.getenv('HOUDINI_USER_PREF_DIR'),
Expand Down
14 changes: 14 additions & 0 deletions python3.7libs/searcher/.extra/Untitled.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"env": [
{
"MODELER": "C:/Users/PATH/TO/modeler/"
},
{
"HOUDINI_PATH" :
{
"value": "$MODELER/",
"method": "append"
}
}
]
}
Empty file.
25 changes: 25 additions & 0 deletions python3.7libs/searcher/.extra/bug.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<!DOCTYPE html>
<html lang="en">

<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Demo</title>
</head>

<body>


<script src="https://cdn.jsdelivr.net/gh/pixeline/portable-github-issues-form/bundle.js?v=1.0" ></script>
<script>
// This is to bypass the github protection against committed auth tokens.
var token1 = '';
var token2 = '';
var token = token1+token2;
var Issue = new GithubIssueForm({ 'token': token, 'useragent': 'portable-github-issues-form', 'repository': 'pixeline/portable-github-issues-form', 'milestone': null });
Issue.inject();
</script>
</body>

</html>
20 changes: 20 additions & 0 deletions python3.7libs/searcher/.extra/bugsubmit.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="Content-Style-Type" content="text/css" />
<title>ISSUE_TITLE</title>
</head>

<body bgcolor="#3A3A3A">

<style type="text/css">.utterances { margin-top: -50px; padding-top: -10px; margin-bottom: 0px }</style>
<script src="https://utteranc.es/client.js"
repo="instance-id/searcher_addon"
issue-term="title"
theme="github-dark"
crossorigin="anonymous"
async>
</script>
</body>
</html>
Loading

0 comments on commit f8a0614

Please sign in to comment.