sexta-feira, 12 de fevereiro de 2021
segunda-feira, 25 de janeiro de 2021
sábado, 23 de janeiro de 2021
quarta-feira, 10 de junho de 2020
TurnOff wacom touchpad in linux
just write down this command in the terminal :
xsetwacom --set `xsetwacom --list | grep TOUCH | sed -r "s/.*id: *([0-9]*).*/\1/"` touch off
domingo, 26 de abril de 2020
ffmpeg convert utility to h264 mp4
ffmpeg convert utility to h264 mp4 !!WIP--> dependence "ffmpeg"
Code :
Code :
#include <stdlib.h>
#include <math.h>
#include <iostream>
#include <string>
int main(int argc , char* argv[])
{
std::cout << "chrysl666 Instagram video converter STARTING" << std::endl;
if(argc < 3 )
{
std::cout << "need in and out names" << std::endl;
return 0 ;
}
std::cout << "number of arguments: "<< argc << std::endl;
std::string in = argv[1];
std::cout << "input file: "<< in << std::endl;
std::string out = argv[2];
std::cout << "output file: "<< out << std::endl;
std::string startMsg = "ffmpeg -i ";
std::string midMsg = " -vcodec libx264 -acodec aac ";
std::string finalCommand = startMsg + in + midMsg + out +".mp4" ;
std::cout << "convert command using ffmpeg: " << finalCommand << std::endl;
const char *systemchar = finalCommand.c_str() ;
std::cout << systemchar << std::endl;
system(systemchar);
return 0;
}
sexta-feira, 13 de dezembro de 2019
system manager tools
SYSTEM-MANAGER-tools!!WIP--> dependence "HTOP" "NVIDIA-SMI
compile with : g++ watchNV.cpp -o watchNV
Code :
compile with : g++ watchNV.cpp -o watchNV
Code :
#include <stdlib.h>
#include <math.h>
#include <iostream>
int main(int argc , char* argv[])
{
std::cout << "watch system START" << std::endl;
system("gnome-terminal --geometry='85x25+0+8000' -e 'watch -n 1 nvidia-smi' ");
system("gnome-terminal --geometry='85x25+0+0' -e 'htop' ");
std::cout << "watch system OVER" << std::endl;
return 0;
}
sexta-feira, 6 de setembro de 2019
Archive tool
ARCHIVE WIP !!WIP
Code :
Code :
import os
import hou
#Get HIP
hipdir = hou.expandString("$HIP")
#Get frame range
totalFrameRange = 50000
# check if it is in Project Path
def isInProjectPath(projPath , filePath ):
absProject = os.path.abspath(projPath)
absFilePath = os.path.abspath(filePath)
return os.path.commonprefix([absProject,absFilePath])==absProject
# run my custom prefligth
def chrysl666_PF():
#empty list
compressList = []
messages = ""
# list all parm and paths
for parm , path in hou.fileReferences():
#expand path to absolute paths in all frames
for i in range(totalFrameRange):
try:
filePath = parm.evalAsStringAtFrame(i)
#check if file is inside Main Project
if not isInProjectPath(hipdir, filePath):
messages += ( "---->filePath = "+filePath + " is not in $HIP\n" )
break
#check if exists in disk
if(os.path.exists(filePath) == True ):
# if True add into the list
compressList.append(filePath)
except:
pass
# remove duplicate paths from list
compressList = list(dict.fromkeys(compressList))
# sort
compressList.sort()
#not used
#for each in compressList:
# print each + "\n"
if(messages>1):
hou.ui.displayMessage( messages , title ="NOT IN THE PROJECT PATH")
return compressList
# ARCHIVE FUNC
def archive(list):
from zipfile import ZipFile
import os
# gets scene file
scene = hou.expandString("$HIPFILE")
sceneName = hou.expandString("$HIPNAME")
# gets HIP Projct folder
hipdir = hou.expandString("$HIP")
zipNameAndPath = os.path.join(hipdir,sceneName)+".zip"
# opens zip to write
finalZip = ZipFile(zipNameAndPath,"w")
# write dependence files
finalZip.write(scene)
for each in list:
finalZip.write(each)
# closes zip
finalZip.close()
hou.ui.displayMessage(zipNameAndPath , title = "DONE")
archive(chrysl666_PF())
domingo, 1 de setembro de 2019
Animated Network Background Image
I created a little script to update Network Background images
using houdini`s timeline callback , just create a new shelf tool and copy and paste my code
this tool works as toggle mode . click to activate , click again to deactivate
Code :
using houdini`s timeline callback , just create a new shelf tool and copy and paste my code
this tool works as toggle mode . click to activate , click again to deactivate
Code :
import hou
chrysl666BG_padding = 0
#CREATE BG
def updateBG(event_type,frame):
#create initial vars
imagePath=""
strFrame = str(frame)
#get editor and BGimage infos
editorHolder = hou.ui.paneTabOfType(hou.paneTabType.NetworkEditor)
BGLIST = editorHolder.backgroundImages()
#if BG image is not created -- do create
if(len(BGLIST) < 1 ):
#start holders
imageHolder = hou.NetworkImage()
imagePath = hou.ui.selectFile(start_directory="HIP" , title = "SELECT FRAMES ")
# check padzeros
pathParse = imagePath.rsplit(".",2)
if( len(pathParse[1]) > 2 ):
global chrysl666BG_padding
chrysl666BG_padding = int(pathParse[1][2])
strFrame = str(frame).zfill(chrysl666BG_padding) # apply padding
# build path string
newPath = pathParse[0]+"."+strFrame+"."+pathParse[2]
# apply Background Image
imageHolder.setPath(newPath)
imageHolder.setRect(hou.BoundingRect(0, 0, 5, 5))
editorHolder.setBackgroundImages([imageHolder])
else: # BG image is already created
#starts holders
imageHolder = BGLIST[0]
imagePath = imageHolder.path()
#chack padzeros
pathParse = imagePath.rsplit(".",2)
#padding = len(pathParse[1])
global chrysl666BG_padding
strFrame = str(frame).zfill(chrysl666BG_padding) # apply padding
# build path string
newPath = pathParse[0]+"."+strFrame+"."+pathParse[2]
# apply Background Image
imageHolder.setPath(newPath)
editorHolder.setBackgroundImages([imageHolder])
#check for playbar events when tool is clicked
events = hou.playbar.eventCallbacks()
if(len(events) <1):
#if not events, create it
updateBG(0,hou.intFrame())
hou.ui.displayMessage("BG IMAGE CREATED")
hou.playbar.addEventCallback(updateBG)
else:
# events exist delete it
hou.playbar.clearEventCallbacks()
hou.ui.displayMessage("BG IMAGE EVENT DELETED")
sábado, 27 de abril de 2019
quinta-feira, 24 de janeiro de 2019
using GCC 6.3 in Centos 7 -- HOUDINI HDK
Centos7 comes with gcc 4.8
but Houdini 17 needs gcc 6.3 at least
so you need install a update version
and left old version only for the system general uses
you will need SCL package manager and GCC 6.3 dev toolset
Write down in terminal :
sudo yum -y install centos-release-scl
sudo yum -y install devtoolset-6
then to compiling using hcustom and this new dev toolset
just send commands by scl
lets go compile geoisosphere from HDK samples :
scl enable devtoolset-6 "hcustom -s geoisosurface.C"
output :
Making geoisosurface.o from geoisosurface.C
Making ./geoisosurface from geoisosurface.o
g++ geoisosurface.o -lpthread -o ./geoisosurface -L /opt/hfs17.0.352/dsolib -lHoudiniUI -lHoudiniOPZ -lHoudiniOP4 -lHoudiniUSD -lHoudiniOP3 -lHoudiniOP2 -lHoudiniOP1 -lHoudiniSIM -lHoudiniGEO -lHoudiniPRM -lHoudiniUT -lhboost_system -L/usr/X11R6/lib64 -L/usr/X11R6/lib -lGL -lX11 -lXext -lXi -ldl -Wl,-rpath,/opt/hfs17.0.352/dsolib
done!
but Houdini 17 needs gcc 6.3 at least
so you need install a update version
and left old version only for the system general uses
you will need SCL package manager and GCC 6.3 dev toolset
Write down in terminal :
sudo yum -y install centos-release-scl
sudo yum -y install devtoolset-6
then to compiling using hcustom and this new dev toolset
just send commands by scl
lets go compile geoisosphere from HDK samples :
scl enable devtoolset-6 "hcustom -s geoisosurface.C"
output :
Making geoisosurface.o from geoisosurface.C
Making ./geoisosurface from geoisosurface.o
g++ geoisosurface.o -lpthread -o ./geoisosurface -L /opt/hfs17.0.352/dsolib -lHoudiniUI -lHoudiniOPZ -lHoudiniOP4 -lHoudiniUSD -lHoudiniOP3 -lHoudiniOP2 -lHoudiniOP1 -lHoudiniSIM -lHoudiniGEO -lHoudiniPRM -lHoudiniUT -lhboost_system -L/usr/X11R6/lib64 -L/usr/X11R6/lib -lGL -lX11 -lXext -lXi -ldl -Wl,-rpath,/opt/hfs17.0.352/dsolib
done!
quarta-feira, 21 de novembro de 2018
sexta-feira, 1 de junho de 2018
User Attributes from maya to Houdini using Alembic
In Maya create a new attribute inside your object transform node and fill it up with your data
Go inside Alembic options . add your attribute using channel box or just write down inside attribute box and prefix box . then inside Houdini will be possible access this attribute from disk using python expression
import _alembic_hom_extensions as abc
import hou
value = abc.alembicArbGeometry("/Volumes/Raid0/GREEN/HOUDINI/USERS/LUCAS/abc/INFO.abc","CAM_EXTRA_","zoom",hou.frame() /24)[0][0]
return(value)
command Usage:
alembicArbGeometry("filePath","objPath" , "userAttribute" , sample time )
actually this command return a tuple of values , we are just looking for inside values, that's why
we add [0[[0] at the end
terça-feira, 20 de março de 2018
Python CacheManager for houdini
Python scripts to copy files to another folder if its greater then maximus capacity .
Source this functions using Houdini by Python Source Editor then write down this line in your Pre-Frame Script using python as main language
hou.session.cacheCopyManager(hou.node('/out/geometry1'), 890409 , "/home/chrysl666/PROJECTS/TEMP")
this function needs a path to the ROP node , a maximus Size in bytes and the destination folder
script code :
# python scripts to copy files to another folder if its greater then maximus capacity
# source this functions using Houdini by Python Source Editor
# then put this line in your Pre-Frame Script
#
# hou.session.cacheCopyManager(hou.node('/out/geometry1'), 890409 , "/home/chrysl666/PROJECTS/TEMP")
#
# this function needs a path to the ROP node , a maximus Size in kbits
# and the destination folder
#get total size of a folder in Kbytes
def get_size(startDirPath):
import os
total_size = 0
for dirpath, dirnames, filenames in os.walk(startDirPath):
for f in filenames:
fp = os.path.join(dirpath, f)
total_size += os.path.getsize(fp)
return total_size
#copy files from a folder to another one
def copyCurrentCache(dirPath , dest ):
import os
import shutil
src_files = os.listdir(dirPath)
for file_name in src_files:
full_file_name = os.path.join(dirPath, file_name)
if (os.path.isfile(full_file_name)):
shutil.copy(full_file_name, dest)
#remove old files from a folder
def removeOldCache(dirPath):
import os
filelist = [ f for f in os.listdir(dirPath) if f.endswith(".sc") ]
for f in filelist:
os.remove(os.path.join(dirPath, f))
# main function for managing cache folder size
def cacheCopyManager(ropNode , maxsize , dest):
import os
import hou
#get cacheFolderPath
outFileParm = ropNode.evalParm("sopoutput")
dirPath = os.path.split(outFileParm)
#get cacheFolder size in Kb
dirSize = hou.session.get_size(dirPath[0])
#check if it greather then maxi size
if dirSize >= maxsize :
print dirSize
#if its greather then copy to another folder and delete oldCache
hou.session.copyCurrentCache(dirPath[0] , dest)
hou.session.removeOldCache(dirPath[0])
Source this functions using Houdini by Python Source Editor then write down this line in your Pre-Frame Script using python as main language
hou.session.cacheCopyManager(hou.node('/out/geometry1'), 890409 , "/home/chrysl666/PROJECTS/TEMP")
this function needs a path to the ROP node , a maximus Size in bytes and the destination folder
script code :
# python scripts to copy files to another folder if its greater then maximus capacity
# source this functions using Houdini by Python Source Editor
# then put this line in your Pre-Frame Script
#
# hou.session.cacheCopyManager(hou.node('/out/geometry1'), 890409 , "/home/chrysl666/PROJECTS/TEMP")
#
# this function needs a path to the ROP node , a maximus Size in kbits
# and the destination folder
#get total size of a folder in Kbytes
def get_size(startDirPath):
import os
total_size = 0
for dirpath, dirnames, filenames in os.walk(startDirPath):
for f in filenames:
fp = os.path.join(dirpath, f)
total_size += os.path.getsize(fp)
return total_size
#copy files from a folder to another one
def copyCurrentCache(dirPath , dest ):
import os
import shutil
src_files = os.listdir(dirPath)
for file_name in src_files:
full_file_name = os.path.join(dirPath, file_name)
if (os.path.isfile(full_file_name)):
shutil.copy(full_file_name, dest)
#remove old files from a folder
def removeOldCache(dirPath):
import os
filelist = [ f for f in os.listdir(dirPath) if f.endswith(".sc") ]
for f in filelist:
os.remove(os.path.join(dirPath, f))
# main function for managing cache folder size
def cacheCopyManager(ropNode , maxsize , dest):
import os
import hou
#get cacheFolderPath
outFileParm = ropNode.evalParm("sopoutput")
dirPath = os.path.split(outFileParm)
#get cacheFolder size in Kb
dirSize = hou.session.get_size(dirPath[0])
#check if it greather then maxi size
if dirSize >= maxsize :
print dirSize
#if its greather then copy to another folder and delete oldCache
hou.session.copyCurrentCache(dirPath[0] , dest)
hou.session.removeOldCache(dirPath[0])
sexta-feira, 28 de julho de 2017
Append new path in python
just use sys.path.appenf()
in this case i have a folder named chrysl666toolkit
and a empty __init__py and the main code itself inside cacheCommander.py
import sys
sys.path.append("/home/chrysl666/HoudiniProjects/MIX/chrysl666toolkit")
import cacheCommander
in this case i have a folder named chrysl666toolkit
and a empty __init__py and the main code itself inside cacheCommander.py
import sys
sys.path.append("/home/chrysl666/HoudiniProjects/MIX/chrysl666toolkit")
import cacheCommander
domingo, 29 de janeiro de 2017
quarta-feira, 25 de janeiro de 2017
Houdini Export and import Nodes tool
Houdini Export and import Node tool
my first useful tool for houdini . helps to speed up exporting and importing between student to commercial version .. pretty simple code and colorize nodes based on posfix string ....just put into your shelf !! and run it
posfix string :
emitter = EMITT
geometry = GEO
pyro_import = SIMOUT
lights = LGT
camera = cam
pyro_sim = SIM
sink object = SINK
pump object =PUMP
expansion object = EXP
collision obj = COLL
source code :
my first useful tool for houdini . helps to speed up exporting and importing between student to commercial version .. pretty simple code and colorize nodes based on posfix string ....just put into your shelf !! and run it
posfix string :
emitter = EMITT
geometry = GEO
pyro_import = SIMOUT
lights = LGT
camera = cam
pyro_sim = SIM
sink object = SINK
pump object =PUMP
expansion object = EXP
collision obj = COLL
source code :
- #import Qt modules using PySide
- from PySide import QtCore
- from PySide import QtGui
- #create hiptools class window using QWidget/QtGui base class
- class hipTools(QtGui.QWidget):
- def __init__(self, parent=None):
- QtGui.QWidget.__init__(self, parent)
- #layout
- colorsHLayout = QtGui.QHBoxLayout()
- exportImportHLayout = QtGui.QHBoxLayout()
- mainVLayout = QtGui.QVBoxLayout()
- # windows size and title
- self.setGeometry(300, 300, 250, 110)
- self.setWindowTitle('Hip Tools')
- self.setStyleSheet("background-color: grey")
- #labels
- expImpLabel = QtGui.QLabel('Export import Nodes')
- colNodesLabel = QtGui.QLabel('Colorize Nodes')
- #buttons
- exportButton = QtGui.QPushButton('Export Nodes ', self)
- exportButton.setStyleSheet("color:black ; background-color: orange")
- importButton = QtGui.QPushButton('Import Nodes ', self)
- importButton.setStyleSheet("color:black ; background-color: orange")
- colorsButton = QtGui.QPushButton('Colorize Nodes ', self)
- colorsButton.setStyleSheet("color:black ; background-color: orange")
- #insert into layout
- mainVLayout.addWidget(expImpLabel)
- exportImportHLayout.addWidget(exportButton)
- exportImportHLayout.addWidget(importButton)
- mainVLayout.addLayout(exportImportHLayout)
- mainVLayout.addWidget(colNodesLabel)
- colorsHLayout.addWidget(colorsButton)
- mainVLayout.addLayout(colorsHLayout)
- #set main window base layout
- self.setLayout(mainVLayout)
- #connect SIGNALS and SLOTS
- self.connect(exportButton, QtCore.SIGNAL('clicked()'), self.exportNodes)
- self.connect(importButton , QtCore.SIGNAL('clicked()'), self.imprtNodes)
- self.connect(colorsButton , QtCore.SIGNAL('clicked()'), self.colorNodes)
- # define export and import member functions
- def exportNodes(self):
- #call file dialog
- exprtData = self.getExportfolder()
- #export
- hou.hscript('opscript -G -r / > ' +exprtData[0])
- print exprtData[0]
- #close window
- self.close()
- def imprtNodes(self):
- #call file dialog
- imprtData = self.geImprtfolder()
- #import
- hou.hscript('cmdread ' + imprtData[0])
- print imprtData[0]
- #close window
- self.close()
- # export dialog
- def getExportfolder(self):
- #get filename and path to export data
- return QtGui.QFileDialog.getSaveFileName()
- # import dialog
- def geImprtfolder(self):
- #get filename and path to export data
- return QtGui.QFileDialog.getOpenFileName()
- # chrysl666 color Node Color Util
- def colorNodes(self):
- #define Colors dict
- colors = { "lightBlue":hou.Color((0,0.6,1)),
- "lightGreen":hou.Color((0,0.533,0)),
- "green":hou.Color( (0,1,)) ,
- "blue":hou.Color( (0,0,1)) ,
- "yellow":hou.Color((1,0.8,0)),
- "black":hou.Color((0,0,0)),
- "grey":hou.Color((0.36,0.36,0.36)),
- "purple":hou.Color( (0.4,0,0.6) )
- }
- # get all nodes in Obj context
- rootNode = hou.node('/obj')
- rootChildren = rootNode.children()
- for child in rootChildren:
- currentName = child.name()
- #Geo Nodes
- if currentName.endswith("EMITT"):
- child.setColor( colors["lightBlue"] )
- if currentName.endswith("GEO"):
- child.setColor( colors["lightBlue"] )
- #Render Nodes
- if currentName.endswith("SIMOUT"):
- child.setColor(colors["lightGreen"] )
- if currentName.endswith("LGT"):
- child.setColor( colors["yellow"] )
- if currentName.startswith("cam"):
- child.setColor( colors["grey"] )
- #Simulation Nodes
- if currentName.endswith("SIM"):
- child.setColor( colors["purple"] )
- if currentName.endswith("SINK"):
- child.setColor( colors["black"] )
- if currentName.endswith("PUMP"):
- child.setColor( colors["black"] )
- if currentName.endswith("EXP"):
- child.setColor( colors["black"] )
- if currentName.endswith("COLL"):
- child.setColor( colors["black"] )
- if currentName.endswith("EXP"):
- child.setColor( colors["black"] )
- self.close()
- # run app
- hipToolsWin = hipTools()
- hipToolsWin.show()
quinta-feira, 5 de janeiro de 2017
quarta-feira, 4 de janeiro de 2017
converting hipc to hip houdini
opscript
cmdread
This is an example of usage.
opscript -G -r / > F:/un/objgroups.cmd
And when load all generated .cmd back.
cmdread F:/un/groups.cmd
I didn’t test it with locked digital assets. According to documentation it won’t work.
info get from https://kiko3d.wordpress.com/2015/03/19/converting-houdini-not-commercial-files/
segunda-feira, 26 de dezembro de 2016
Converting image sequ. to movies FFMPEG
./ffmpeg
-f image2
-i /home/chrysl666/HoudiniProjects/Smokes/render/fumaçaTest%d.jpg
-b 800k
/home/chrysl666/HoudiniProjects/Smokes/video/video.mpg
-b = bitrate
quinta-feira, 1 de dezembro de 2016
airport UBUNTU 16.4
install wine
install wineTricks
download and install airport for windows version 5.4.2 using wine
I actually found a solution to this on my own one night.
Go to AirPort Utility.
Click Manual Setup on the bottom.
Click on Disks on top.
Then click on File Sharing.
In the Airport Disk Guest Access drop down menu make sure that it is on Read and Write.
Wait for the router to restart and viola you got access.
Just go to Network on Ubuntu and you should find an extra server that says the name of your router.
Also make sure that Enable File Sharing is checked as well.
And that Secure Shard Disks drop down menu is on With AirPort Extreme Password.
install wineTricks
download and install airport for windows version 5.4.2 using wine
I actually found a solution to this on my own one night.
Go to AirPort Utility.
Click Manual Setup on the bottom.
Click on Disks on top.
Then click on File Sharing.
In the Airport Disk Guest Access drop down menu make sure that it is on Read and Write.
Wait for the router to restart and viola you got access.
Just go to Network on Ubuntu and you should find an extra server that says the name of your router.
Also make sure that Enable File Sharing is checked as well.
And that Secure Shard Disks drop down menu is on With AirPort Extreme Password.
Assinar:
Postagens (Atom)






