Korny Klown2
…With the detail expressionit works, although you can easily imagine that (again) I'm quite dissapointed that there is no Python equivalent.
Agreed that this is one of confusing example where SESI wanted to fix old mistakes and has called Python
detail() expression
hou.Geometry.globalAttrib().
I don't mind if a programm has several scripting/expression language. I've never used XSI, so I can't really judge, but probably there are 5 different laguages but most likely not all for the same task.
Actually not. They were originally as a complete alternatives, want VBScript/JavaScript/Perl/Python? Welcome.
It's not that HScript and Python cover two totaly different fields in Houdini. They're pretty much used in the places together so I assume a decent amount of equivalence. Let's take a look at Maya:
MEL: polyBevel, Python: polyBevel()
MEL: deleteAttr, Python: deleteAttr()
MEL: skinCluster, Python: skinCluster()
This is how it's done right.
I couldn't disagree more. Yes, this was kind of political choice, where Python usability has been sold for Mel familiarity, but how controversial this decision was one can see by how quickly native implementation was replaced by power users with PyMEL. The situation was actually a way different, because unlike Houdini, Maya has tones of mel legacy code and mel users, the burden which cannot be ignored. Also, it was much easier to not to design new scripting interface, that is something that took SESI couple of releases. Honesty speaking one obvious reason for that was, that Houdini didn't have decent scripting interface, because hscript (not hscript expressions!), is much too old school. Hscript is mostly obsolete these days, fully replaced by Python.
Hscript expressions serve different purpose, serve it well in my opinion, and if they were to be replaced it's more probably with something like CVEX, which adds with every release original expressions functionality.
Now, back to Maya, the familiarity effect last two weeks, and then you end up with usability issues for the rest of the time. Adsk decision for mirroring MEL commands with Python was good only for people using ~15 commands casually. Anyone using scripting intensively curse Adsk. It's ironic you compare the worst Python implementation in business with one of the best saying how good is to actually break Python, lost its object oriented nature and mirror it with ancient and horrible dialect that no one really wants to use these days. Thank god ,the Foundry wasn't doing the same with TCL to Python transition in Nuke…
I do understand that very well but this downstream theory isn't quite correct either.
In a copy SOP you create a variable in the Stamp tab and you then use this variable on a node that is above the node it was created. So you actually evaluate a variable that isn't created at that point in time. I just thought something similar is possible with a detail attribute.
Well, the truth is, it's all about upstream, not downstream. Node with display/render flag asks for a geometry its input node and so one recursively. Does't matter. The theory is quite correct. CopySOP isn't any exception from that. That's why you have to use
stamp(), which the only reason to exists is to ask downstream node for the attribute existing there. It's a mean for reverse flow, but does't change the fact, that attributes are created in a particular place and accessible pretty according to common sense.
MartybNz
All nodes dealing with attributes should have an attribute input, like COP nodes have a mask input on the side.
Any node with more then one input have this kind of attribute input you mention. Because this exactly the reason for multi input nodes, to access others geometry's attributes. Interesting idea though. The problem with compositors approach is that you have well defined geometric domain, that is pixels rows an columns to match elements between inputs. In case of differences you interpolate them. Rather hard to achieve with something like, say, poly grid and nurbs torus…
EDIT:
Unfortunatelly this AttributeCopy doesn't work either since you can only wire it after the line SOP, so it's still not present there.
Sorry, haven't seen your file before. You can actually use AttributeCopy there. Just use the attribute after you have copied it… Leave Line Sop alone, copy your attribute, add PointSOP for example, ad type in TY field the same expression with $PT multiplication:
detail(“../attributecreate1”, “height”, 0) * $PT
This isn't best example for attributes usage at all (easier would be using channel raferenceing), but as I understand this is just an example.