Jump to content

Houdini node custom nodeshapes multiple outline paths


laishi

Recommended Posts

hello everyone:

Problem: Houdini nodeshapes outline connects multiple paths into a single path by default.

Hope: render multiple paths. I hope hero will help me

Like this:

node

node.thumb.png.d9ed9b1adfc22437f37e89f199f54baa.png

my node json file:

{
"name": "bu",
"flags": {
    "0": { "outline": [[-5.29534,-4.54064],[-4.29534,-3.54064],[-3.29534,-4.54064],[-4.29534,-5.54064]] },
    "1": { "outline": [[3.35357,-4.54064],[4.35357,-3.54064],[5.35357,-4.54064],[4.35357,-5.54064]] },
    "2": { "outline": [[-5.29534,2.51168],[-4.29534,3.51168],[-3.29534,2.51168],[-4.29534,1.51168]] },
    "3": { "outline": [[3.35357,2.51168],[4.35357,3.51168],[5.35357,2.51168],[4.35357,1.51168]] }
},
"outline": [[-1.25276,0.213431],[-1.25923,0.309851],[-1.30349,0.394224],[-1.29497,0.47906],[-1.36316,0.550381],[-1.45099,0.590245],[-1.53925,0.634121],[-1.61488,0.696022],[-1.69347,0.750341],[-1.74882,0.824306],[-1.81171,0.8714],[-1.83659,0.956907],[-1.9125,1.00581],[-1.97364,1.0764],[-2.01776,1.16133],[-2.05029,1.25191],[-2.0291,1.33113],[-2.00998,1.40823],[-1.94328,1.45771],[-1.84454,1.45776],[-1.75471,1.48497],[-1.66473,1.45814],[-1.57213,1.483],[-1.48071,1.51168],[-1.39479,1.47999],[-1.30474,1.45768],[-1.20599,1.45744],[-1.11375,1.45738],[-1.03079,1.45305],[-0.933161,1.45511],[-0.840912,1.4311],[-0.746666,1.41519],[-0.666513,1.36062],[-0.57858,1.32661],[-0.509929,1.25572],[-0.440216,1.18585],[-0.361736,1.13248],[-0.309893,1.05345],[-0.267179,0.966646],[-0.247831,0.873476],[-0.271751,0.784101],[-0.302257,0.69543],[-0.330984,0.606109],[-0.362486,0.516366],[-0.430011,0.444505],[-0.431249,0.361089],[-0.46221,0.271445],[-0.537867,0.240972],[-0.627704,0.217588],[-0.723824,0.204975],[-0.818026,0.191915],[-0.916513,0.189011],[-0.989947,0.238176],[-1.08684,0.233389],[-1.16306,0.190902],[-0.0896633,-0.85592],[-0.0162713,-0.907296],[-0.0440153,-0.993095],[-0.092796,-1.07688],[-0.119774,-1.16938],[-0.117304,-1.26852],[-0.101692,-1.35111],[-0.0611493,-1.43945],[0.00966948,-1.50801],[0.0701438,-1.58586],[0.0779375,-1.68253],[0.0966957,-1.77584],[0.0522163,-1.8582],[0.0590184,-1.94568],[-0.00745084,-2.01896],[-0.0259245,-2.11297],[-0.0957056,-2.18375],[-0.15938,-2.23693],[-0.251681,-2.23553],[-0.342575,-2.2712],[-0.435283,-2.29682],[-0.528216,-2.27211],[-0.608642,-2.22125],[-0.687235,-2.27358],[-0.771978,-2.27317],[-0.863951,-2.27147],[-0.955879,-2.28504],[-1.0389,-2.30603],[-1.11612,-2.3652],[-1.15033,-2.45391],[-1.20767,-2.48434],[-1.30157,-2.50686],[-1.39189,-2.53805],[-1.4679,-2.57303],[-1.48233,-2.66838],[-1.51407,-2.75968],[-1.55427,-2.84851],[-1.61736,-2.92476],[-1.69211,-2.98678],[-1.7636,-3.05586],[-1.84349,-3.11057],[-1.91457,-3.18012],[-1.98385,-3.25126],[-2.05411,-3.3213],[-2.13465,-3.37621],[-2.20524,-3.44622],[-2.28953,-3.48795],[-2.38258,-3.5108],[-2.47293,-3.54064],[-2.56396,-3.51485],[-2.65324,-3.52943],[-2.73479,-3.48859],[-2.81346,-3.44894],[-2.90757,-3.4302],[-2.97934,-3.36323],[-3.05737,-3.30465],[-3.11618,-3.22843],[-3.18529,-3.15697],[-3.24367,-3.0798],[-3.29031,-2.99401],[-3.29534,-2.89666],[-3.27031,-2.81609],[-3.2105,-2.74023],[-3.15248,-2.6618],[-3.0774,-2.60366],[-2.98082,-2.59102],[-2.89667,-2.63906],[-2.80408,-2.61172],[-2.72251,-2.62929],[-2.67057,-2.56426],[-2.5783,-2.53981],[-2.52505,-2.48168],[-2.44062,-2.45777],[-2.35856,-2.41193],[-2.28873,-2.34116],[-2.20845,-2.28437],[-2.15446,-2.20594],[-2.10152,-2.12772],[-2.02155,-2.07476],[-1.94601,-2.01565],[-1.96558,-1.92315],[-1.99231,-1.83046],[-2.03461,-1.74276],[-2.08694,-1.66163],[-2.16588,-1.60691],[-2.23732,-1.53935],[-2.31481,-1.48118],[-2.388,-1.41438],[-2.43796,-1.33527],[-2.47839,-1.24645],[-2.55762,-1.19282],[-2.61699,-1.11474],[-2.65685,-1.02691],[-2.6544,-0.927574],[-2.61478,-0.836792],[-2.54023,-0.815655],[-2.46606,-0.749887],[-2.38713,-0.794302],[-2.29729,-0.83562],[-2.20435,-0.859514],[-2.10768,-0.862174],[-2.02224,-0.879863],[-1.92726,-0.894372],[-1.83173,-0.87103],[-1.74068,-0.892858],[-1.64447,-0.911428],[-1.54728,-0.921334],[-1.46092,-0.928672],[-1.37227,-0.947298],[-1.27287,-0.947195],[-1.17896,-0.974368],[-1.0795,-0.975247],[-1.00093,-1.02744],[-0.918379,-0.982807],[-0.864963,-1.05931],[-0.773071,-1.08369],[-0.673665,-1.08393],[-0.593718,-1.13653],[-0.502432,-1.10318],[-0.41836,-1.05577],[-0.340008,-1.00256],[-0.252495,-1.01966],[-0.236533,-0.924357],[-0.172376,-0.882274],[1.50071,-0.867543],[1.57177,-0.876523],[1.66508,-0.885486],[1.75381,-0.876432],[1.83481,-0.929243],[1.90484,-1.00008],[1.97656,-1.06899],[2.01435,-1.13573],[2.05308,-1.21758],[2.10168,-1.30318],[2.17285,-1.37279],[2.22605,-1.45303],[2.30573,-1.50694],[2.38506,-1.56057],[2.42315,-1.64649],[2.50226,-1.70223],[2.59726,-1.72006],[2.66738,-1.78162],[2.67653,-1.8715],[2.76501,-1.91579],[2.84736,-1.96818],[2.87304,-2.05955],[2.95207,-2.09998],[3.02263,-2.17028],[3.10105,-2.22678],[3.1357,-2.31791],[3.13746,-2.41686],[3.20928,-2.47529],[3.2084,-2.51873],[3.27619,-2.58],[3.3231,-2.66714],[3.35357,-2.7591],[3.33868,-2.85462],[3.31854,-2.94723],[3.2982,-3.03998],[3.23332,-3.11403],[3.24218,-3.20171],[3.19459,-3.25954],[3.14832,-3.22755],[3.09692,-3.30484],[3.11611,-3.38043],[3.02199,-3.4078],[2.92894,-3.43398],[2.84137,-3.44371],[2.75087,-3.41153],[2.65298,-3.40707],[2.57186,-3.35862],[2.4927,-3.3019],[2.43609,-3.22343],[2.38229,-3.1422],[2.33758,-3.05469],[2.2876,-2.96974],[2.23219,-2.88896],[2.1794,-2.80843],[2.13042,-2.72779],[2.10283,-2.63645],[2.05715,-2.55384],[2.01459,-2.47819],[1.97456,-2.40235],[1.97546,-2.30274],[1.92944,-2.22559],[1.86866,-2.16812],[1.80746,-2.0927],[1.80092,-2.00489],[1.78669,-1.91773],[1.78727,-1.81829],[1.74117,-1.73738],[1.69018,-1.65415],[1.65581,-1.56268],[1.59659,-1.48456],[1.57555,-1.40598],[1.58085,-1.30767],[1.54026,-1.21759],[1.48465,-1.13684],[1.47086,-1.04052],[1.52002,-0.958736]],
"inputs": [[-4.29534,2.51168,90],[-2.56555,2.51168,90],[-0.835773,2.51168,90],[0.894008,2.51168,90],[2.62379,2.51168,90],[4.35357,2.51168,90]],
"outputs": [[-4.29534,-4.54064,270],[-2.56555,-4.54064,270],[-0.835773,-4.54064,270],[0.894008,-4.54064,270],[2.62379,-4.54064,270],[4.35357,-4.54064,270]],
"icon": [[0.38,0.03],[0.62,0.27]]
}

I try & failed

In houdini NodeShapes load path

"config" / "NodeShapes"

ouline like this:

PySide2.QtGui.QPolygonF(QPointF(0.405,-15.185)QPointF(1.935,-15.785)QPointF(5.13,-16.555)QPointF(8.4,-16.915)QPointF(11.69,-16.995)QPointF(16.615,-16.72)QPointF(21.505,-16.08)QPointF(29.595,-14.595)QPointF(34.49,-13.975)QPointF(39.42,-13.73)QPointF(42.705,-13.85)QPointF(45.965,-14.285)QPointF(49.135,-15.155)QPointF(49.98,-15.495)QPointF(49.855,0.24)QPointF(46.9,1.16)QPointF(43.655,1.695)QPointF(40.375,1.895)QPointF(35.445,1.765)QPointF(30.535,1.255)QPointF(20.8,-0.375)QPointF(15.905,-0.98)QPointF(10.98,-1.26)QPointF(7.69,-1.195)QPointF(4.42,-0.845)QPointF(1.23,-0.06)QPointF(0.32,0.29))

in this file $HH\python3.9libs\nodemacros\schematic.py  def:

def _loadShapes():
class NodeShape:
class SchematicItem:
class DotSchematic(SchematicItem):
class NoteSchematic(SchematicItem):
class BoxSchematic(SchematicItem):
class NodeSchematic(SchematicItem):
class SubnetInputSchematic(NodeSchematic):
class SchematicView(QtWidgets.QGraphicsView):
class SchematicScene(QtWidgets.QGraphicsScene):
class SchematicWidget(QtWidgets.QWidget):
Edited by laishi
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...