# MrScienceOfficer

Members

201

• #### Days Won

3

MrScienceOfficer had the most liked content!

46 Excellent

• Rank
Initiate

• Name
Tom

## Recent Profile Visitors

3,448 profile views

1. ## Dot Vector in Python ?

Why would it match (and why would you need it to?), your rounding to the .001th decimal place and testing for a tolerance to .00001th place.
2. ## Dot Vector in Python ?

def theLooper(curNode): for thePrim in curNode.geometry().prims(): primColor = thePrim.floatListAttribValue("Cd") rounded = tuple((round(total,3)) for total in primColor) print(thePrim.number()) print(primColor) print("Theese are the rounded numbers\n"+str(rounded)) #print(round(primColor,3)) dot = hou.Vector3(primColor).dot(hou.Vector3((rounded))) # closing parentheses was missing tolerance = 0.000001 if dot >= 1.0-tolerance and dot <=1.0+tolerance: print("match") else: print("no match") if curNode.geometry().findPrimAttrib("Cd"): print("yes") else: print("no") Python tends to throw a syntax error on the following line when a line doesn't complete it's statement i.e. parentheses block not closed.
3. ## vex VEX : opfullpath. Bugged or basic typing syntax error (from me) ?

int primCount = detailintrinsic(concat("op:", opfullpath("../myInputedGeo")), "primitivecount"); // or just int primCount = detailintrinsic("op:../myInputedGeo", "primitivecount"); opfullpath is a VEX function (as well as an hscript function), your attempting to call the hscript version(by putting it in backticks), int primCount = detailintrinsic("op:`opfullpath("../myInputedGeo")`", "primitivecount"); either version should work though I recommend the VEX version as it's much easier to debug. Looking at your post again point #2 is correct and should work, unless I'm not seeing how it's different from my version (which works for me).
4. ## defining normal direction with wrangles

PolyFrame works well in this situation, just change the tangent to 'N'. A vex solution would look like if (@ptnum != npoints(0)-1) @N = @P - point(0, "P", @ptnum+1); else @N = point(0, "P", @ptnum-1) - @P; @N = normalize(@N); . This handles the case of the last point by inverting the vector towards the previous point.
5. ## How to reset HOUDINI_DSO_PATH

I looked at what your saying about exporting paths, I've never heard of that before. I don't believe what you did actually changed the paths in Houdini. Your path needs to be '/Users/gfx03/HDK/custom;&' you need add ';&' to tell houdini to keep searching for more paths. It's probably best to just edit the houdini.env file though.
6. ## über slow

Pinging forums.odforce.net [208.79.239.212] with 32 bytes of data: Reply from 208.79.239.212: bytes=32 time=49ms TTL=58 Reply from 208.79.239.212: bytes=32 time=43ms TTL=58 Reply from 208.79.239.212: bytes=32 time=41ms TTL=58 Reply from 208.79.239.212: bytes=32 time=45ms TTL=58 Ping statistics for 208.79.239.212: Packets: Sent = 4, Received = 4, Lost = 0 (0% loss), Approximate round trip times in milli-seconds: Minimum = 41ms, Maximum = 49ms, Average = 44ms It taking about ten seconds to load a page.
7. ## Dot Vector in Python ?

I recommend posting an example file showing the issue like Bonsak suggested.
8. ## Dot Vector in Python ?

https://www.programiz.com/python-programming The section entitled "Few Important Things to Remember" at the end, briefly goes that. I recommend going through other tutorials I found here, https://wiki.python.org/moin/BeginnersGuide/Programmers
9. ## Dot Vector in Python ?

Outside of the formatting issue, it looks fine. Your error isn't related to that code(unless its related to the formatting issue)
10. ## VEX Based Replace File Extension

s@file = "thing/another/geom.001.rs"; s@file = concat(join(split(s@file, '.')[:-1],'.'), ".bgeo.sc"); note the added dot joining the split.
11. ## Switching Views using python/hscript

I think you can do it with the hou.ui module using the pane classes, last time I tried though(month or so ago) most of the pane functions crashed Houdini so I never really did much with it.
12. ## über slow

Pinging forums.odforce.net [208.79.239.212] with 32 bytes of data: Reply from 208.79.239.212: bytes=32 time=41ms TTL=58 Reply from 208.79.239.212: bytes=32 time=41ms TTL=58 Reply from 208.79.239.212: bytes=32 time=40ms TTL=58 Reply from 208.79.239.212: bytes=32 time=43ms TTL=58 Ping statistics for 208.79.239.212: Packets: Sent = 4, Received = 4, Lost = 0 (0% loss), Approximate round trip times in milli-seconds: Minimum = 40ms, Maximum = 43ms, Average = 41ms The last few days it's been intermittently slow, sometimes taking 3-5 whole seconds to load a page, normally it's instantaneous, quite a jarring experience . Seems to be better today, still a tad slow though.
13. ## VEX Based Replace File Extension

Why not s@file = "thing/another/geom.rs"; s@file = concat(join(split(s@file, '.')[:-1],''), ".bgeo.sc"); ?
14. ## Wire capture, controlling width per point?

I think you would need to go through all the curves in a for loop and drive the widths by pushing the attributes through CHOPs, it sounds a bit convoluted, and I imagine there must be a simpler way. Using point deforms is another choice, but you can't, as far as I know, control the capture radius per point. A third option would be to generate bones from the curves and use the biharmonic capture SOP to bind it. This would likely result in the highest quality(and most expensive) results since it will use proper transforms to drive the tree, while the other methods work a bit differently and can have less stable results (under more extreme deformation). I think your best bet though, would be to post this on the SideFX forum as well there's a good chance some one out there has already solved this problem.
15. ## Dot Vector in Python ?

That code works for me, you need to post the error message.
×
• Donations