Forgot your password?   Click here   •   No account yet?   Please Register    •   Or login using  
JA ログイン
SideFX Homepage
  • 製品
    • H20.5 新機能
      • 概要
      • VFX
      • Copernicus
      • Animation
      • Rigging
      • Lookdev
    • Houdini
      • 概要
      • FX 機能
      • CORE 機能
      • Solaris
      • PDG
    • Houdini Engine
      • 概要
      • Engine プラグイン
      • バッチ処理
    • Karma Renderer
    • 製品比較
    • SideFX Labs
    • Partners
  • 業界
    • Film & TV
    • ゲーム開発
    • モーショングラフィクス
    • Virtual Reality
    • AI/ML 向けデータ合成
  • コミュニティ
    • フォーラム
    • ニュース
      • 概要
      • カスタマ ストーリー
      • Houdini HIVE Events
      • Contests & Jams
    • Gallery
    • イベントカレンダー
    • User Groups
    • Artist Directory
  • 学習
    • Start Here
      • 概要
      • My Learning
      • ラーニングパス
      • チュートリアル
    • コンテンツライブラリ
    • Tech Demos
    • Houdini 講演
    • 教育プログラム
      • 概要
      • 学生
      • 講師
      • 管理者
      • List of Schools
      • 学習リソース
  • サポート
    • カスタマーサポート
    • Licensing
      • 概要
      • Commercial
      • Indie
      • Education
    • ヘルプデスク FAQ
    • Houdini システム環境
    • ドキュメント
    • Changelog / Journal
    • Report a Bug/RFE
  • Get
    • Try
    • 購入
    • ダウンロード
    • お問い合わせ
 
Advanced Search
Forums 検索
Found 250 posts.

Search results Show results as topic list.

Technical Discussion » Python exercises in Houdini ?

User Avatar
Lewul
250 posts
Offline
 2014年7月2日 08:12:08
Oh okay, good to know. Thanks !
See full post 

Technical Discussion » Python exercises in Houdini ?

User Avatar
Lewul
250 posts
Offline
 2014年7月2日 07:47:38
Yes, I see !


“One more thing to the previous post. This behavior that you accept in viewport is common for all shelf tools in Houdini. Shelf tools shouldn't accept while you are in network view.”

Indeed, I wasn't realizing when scripting…


One more question :

why the return alone in this case ? :

def DisableOrEnableNodes_Tool():
“”“ Disables or enables node(s) of specified type in selected OBJ geo nodes ”“”

#select geometry
geoNodes = SelectGeoNodes()
if geoNodes == (None, None):
return

#specify node type to find
state, nodeType = SpecifyNodeTypeAndState()
if nodeType == None:
return

#find specified nodes
nodes = FindSpecifiedNodes(geoNodes, nodeType)
if nodes == None:
return

#set nodes state
if state != 2:
DisableOrEnableNodes(nodes, state)
See full post 

Technical Discussion » Python exercises in Houdini ?

User Avatar
Lewul
250 posts
Offline
 2014年7月2日 07:23:01
Oh, right…

The code is working now, but, you did all the work here. But it helped me a lot, I start to understand how the return works. I will try to add another function, as you suggested.
See full post 

Technical Discussion » Python exercises in Houdini ?

User Avatar
Lewul
250 posts
Offline
 2014年7月2日 04:13:49
I'm only starting, but it seems that the hou.SceneViewer() function allow me to only select in the scene view, but what if all my objects are already bypass ? Then I can't “non” bypass them, because there nothing to select. I there the same in the newtork view ? But only at object level of course.

EDIT : And I think that I'm doing wrong in the main function, DisableOrEnableNodes_Tool(), I don't really know how to use the variables that I returned for starting or not the other functions… I always have "global name ‘blabla’ is not defined', even if it seems to defined.

For example “state”, it's return by the SpecifyNodeTypeAndState() function, but if I'm calling it in the main function, DisableOrEnableNodes_Tool(), for continuing or not the tool, it's telling me that it's not defined.

EDIT 2 : COME ON I'm such a dick, I read your message at least three times and I'm not even capable of reading it correcly. Forget the last edit I think I got my answer.
See full post 

Technical Discussion » Keep only looping edges

User Avatar
Lewul
250 posts
Offline
 2014年6月30日 10:47:34
My file is actually a entire tree, and each branch is in a ForEach SOP, maybe it's coming from here (I gave you only one branch).
See full post 

Technical Discussion » Keep only looping edges

User Avatar
Lewul
250 posts
Offline
 2014年6月30日 10:10:48
Ah, got it !

Unfortunately, this was nos working for both of your solutions on my geometry (maybe it works on Adam's one). I converted it into a NURBS Curve, and then fused it (the fuse was not working at all until my geo was converted).

Thanks !

EDIT : working only with the fuse now, strange
See full post 

Technical Discussion » Maximize Pane problem

User Avatar
Lewul
250 posts
Offline
 2014年6月30日 08:25:55
I,

I had the same problem once : http://www.sidefx.com/index.php?option=com_forum&Itemid=172&page=viewtopic&t=29251&highlight=Lewul [sidefx.com]
See full post 

Technical Discussion » Keep only looping edges

User Avatar
Lewul
250 posts
Offline
 2014年6月30日 08:13:58
Nice ! Thanks Adam.

One more question, it's seems that the points are not connected anymore… For example with a Connectivity SOP they are all independent from each other. How can I correct it ? I need each circle to be one geometry.
See full post 

Technical Discussion » Python exercises in Houdini ?

User Avatar
Lewul
250 posts
Offline
 2014年6月30日 06:21:23
Hi Mantragora,

Thanks, I'll study all of this tonight !

“Hopefully” don't give up on me please I know that I'm a bit slow haha :'(
See full post 

Technical Discussion » Keep only looping edges

User Avatar
Lewul
250 posts
Offline
 2014年6月30日 06:19:38
Hi everyone,

I'm stuck on something that looks so simple… I have this mesh, which is made with a lot of looping edges, and my goal is to only keep these edges (I don't want the one that goes on the Y axis, but don't refer to that axis because I have some mesh that are not oriented this way).

Do you have a simple solution ?

Thanks,

Tom.
See full post 

Technical Discussion » Python exercises in Houdini ?

User Avatar
Lewul
250 posts
Offline
 2014年6月24日 02:12:59
Nodoby ?
See full post 

Technical Discussion » Python exercises in Houdini ?

User Avatar
Lewul
250 posts
Offline
 2014年6月19日 17:01:49
I'm stuck, I don't know how to replace my “global”, I'm confused…

So I think that everything is working fine now (I hope), but I don't understand how to return my variables through other functions without the global. Do you have an example that can lead me to a solution ? I understand it in your links, but I'm confusing with the arguments in my script, the variables that should be global, etc. I also checked about multiple values in a return, but still I don't know how to apply it in this script.

I really don't want to take bad habits like with the “global”.
See full post 

Technical Discussion » FLIP render problem

User Avatar
Lewul
250 posts
Offline
 2014年6月18日 09:32:09
The .bgeo of you fluid.

Is there a volume in your fluid ?
See full post 

Technical Discussion » Python exercises in Houdini ?

User Avatar
Lewul
250 posts
Offline
 2014年6月18日 07:01:25
Yes sorry, I was somewhere else when I was correcting (= thinking about something else, I don't know if we can say it in english), I wanted to ask one of my teacher about return (he's in the same room actually, but he is busy).

Thanks for the link.
See full post 

Technical Discussion » FLIP render problem

User Avatar
Lewul
250 posts
Offline
 2014年6月18日 05:58:37
Are you using a GI Light with photon ?
See full post 

Technical Discussion » Python exercises in Houdini ?

User Avatar
Lewul
250 posts
Offline
 2014年6月18日 05:55:46
Okay so I corrected it.

It's strange because if I add a list with the result of findAllChildNodesOfType() (which contains more than one object in general), it can't find the attribute path that is contain in the result (with a for loop in the list I mean, so checking for each child one by one). But if the result of findAllChildNodesOfType() is only one value, then it finds the path… So I wasn't able to store all the children node type in one list and use it later for findind each path.

So I had to kill my bypass function and add it in the function where I find do the findAllChildNodesOfType().

And it allow me to correct some mystakes.
See full post 

Technical Discussion » Python exercises in Houdini ?

User Avatar
Lewul
250 posts
Offline
 2014年6月17日 17:59:45
Oh I'm seeing that my code isn't working correctly… :?
See full post 

Technical Discussion » Python exercises in Houdini ?

User Avatar
Lewul
250 posts
Offline
 2014年6月17日 15:30:28
Thanks ! So I will learn this.

EDIT : I don't want to bother you, and maybe that my code is not finished here, but do you think that you will be able to give me another exercice ? I know that my level is very low, but I want to learn, and it's the only way to progress I think.
See full post 

Technical Discussion » Python exercises in Houdini ?

User Avatar
Lewul
250 posts
Offline
 2014年6月17日 13:53:20
import toolutils
import hou

### Functions:

def SelectGeoNodes():

global geoSelected

hou.ui.setStatusMessage('Select one or more Geometry node', severity=hou.severityType.ImportantMessage)
if selection == (): # if selection is empty
hou.ui.setStatusMessage('Select at least one Geometry node', severity=hou.severityType.ImportantMessage)
print('Select at least one Geometry node')
geoSelected = 0

else:
print('Your selection :') # print the selection and go to the next function
for n in hou.selectedNodes():
print n.path()
geoSelected = 1


def SpecifyNodeTypeAndState():

global buttons
global listText
global textFieldUser

# creation of the ui
textFieldUser = hou.ui.readInput('Bypass :', , title='Bypass',
close_choice=2, initial_contents= ‘<Node(s) type>’)
# variable for the user's text
n = textFieldUser
str(n)
listText = n.split(' ')

# messages to print when press buttons
if textFieldUser == 0:
print('ON')
buttons = 1
elif textFieldUser == 1:
print('OFF')
buttons = 1
elif textFieldUser == 2:
print('CANCEL')
buttons = 0


def FindSpecifiedNodes(selection, listText):

global bypass
global childNodes
global lenChild

if listText == :
hou.ui.setStatusMessage('Textfield empty', severity=hou.severityType.ImportantMessage)
print('Textfield empty')
bypass = 0
else:
for n in selection:
for x in listText:
pathSel = n.path() # path of selected nodes
childNodes = toolutils.findAllChildNodesOfType(hou.node('{0}'.format(pathSel)), ‘{0}’.format(x),
dorecurse=True) # finding children of selection
if childNodes != : # if the name exist
lenChild = len(childNodes) # the lenght of the children contain the objects selected,
# an object may contain more than one type of the same node
# for example
else: # if the word(s) doesn't exist
hou.ui.setStatusMessage('Cannot find {0} in {1}'.format(x, pathSel))
print('Cannot find {0} in {1}'.format(x, pathSel))
bypass = 1


def DisableOrEnableNodes(childNodes, textFieldUser):

for j in range(lenChild):
pathChild = childNodes.path() # the path of each child
toBypass = hou.node('{0}'.format(pathChild))
if textFieldUser == 0: # if user press ON
toBypass.bypass(0)
elif textFieldUser == 1: # if user press OFF
toBypass.bypass(1)


def DisableOrEnableNodes_Tool():

SelectGeoNodes()
if geoSelected == 1: # if nothing is selected
SpecifyNodeTypeAndState()
if buttons == 1: # if buttons are ON or OFF
FindSpecifiedNodes(selection, listText)
if bypass == 1: # if the textfield is not empty, then the bypass function is launched
DisableOrEnableNodes(childNodes, textFieldUser)



### Selection and function starting:

selection = hou.selectedNodes() # Objects selected
DisableOrEnableNodes_Tool() # main function

### Questions:
# - In DisableOrEnableNodes_Tool() function, is it the good way to call the others functions?
# By putting some variables in others functions and calling them back in the main… ?
# - In this specific case I don't know why I have to put argument in some of my functions…
# - I may be wrong with all the “global” thing in my functions, I'm a bit confuse about it (I need to check more of it)


So I followed what you told me, about Python 3, functions, etc.
See full post 

Technical Discussion » Python exercises in Houdini ?

User Avatar
Lewul
250 posts
Offline
 2014年6月16日 16:30:43
Thanks Mantragora, I will study it tomorrow. And I'll try to finish it also.

Just one question, is Houdini using Python 3 ? Nuke and Maya are using Python 2.7 I think, is it really important to learn 3 ? (I'm not saying that I don't want to learn it, it's just for information)
See full post 
  • 最初
  • 2
  • 3
  • 4
  • 5
  • 最後
  • Quick Links
Search links
Show recent posts
Show unanswered posts
製品
  • Houdini
  • Houdini Engine
  • Houdini Indie
学習
  • Houdini 講演
  • 教育プログラム
サポート
  • カスタマーサポート
  • ヘルプデスク FAQ
  • ドキュメント
  • Report a Bug/RFE
  • Sales Inquiry
LEGAL
  • Terms of Use (英語)
  • Privacy Policy (英語)
  • License Agreement (英語)
  • Accessibility (英語)
  • Responsible Disclosure Program
COMPANY
  • SideFX社について
  • Careers
  • Press
  • Internships
  • お問い合わせ
Copyright © SideFX 2025. All Rights Reserved.

使用言語