Jonathan de Blok - JDBgraphics

Jonathan de Blok

About Me

Expertise
Not Specified
Location
Not Specified
Website

Connect

Recent Forum Posts

Enter into viewer state/context of a node inside an HDA April 4, 2022, 3:58 a.m.

#hacktheplanet.. The default viewstate python expects a few nodes to be present relative to the node from kwargs, which is my HDA, so I've put them there using merge object nodes that get their content from the default mappoints node. That, and copy/pasting/changing a bit of python from the mappoints' PyhtonModule to my own HDA made it work. I can now map points directly from my HDA using the normal viewstate. All nice, but needless to say this workflow could use some attention

Enter into viewer state/context of a node inside an HDA April 4, 2022, 3:25 a.m.

Running into some issues as well.. Trying to get an HDA to use the viewstate of a kinefx::mappoints node that's inside the HDA.

Promoted everything up as in the vimeo link, set the default view state in the hda to 'kinefx__mappoints' but this will only work for very simple viewstates.. any viewstate that uses any type of kwargs will endup with the wrong input.


This for example, this is the onEnter handler from \packages\kinefx\viewer_states\kinefx__mappoints.py:

def onEnter(self, kwargs):
        self.node = kwargs["node"]
        self.target_node = self.node.node("TARGET")
        self.source_node = self.node.node("SOURCE")
        self.target_geo_ref = self.target_node.geometry()
        self.source_geo_ref = self.source_node.geometry()

Normally the kwargs["node"]will yield the mappoints node, but when triggered through the HDA it will give the HDA itself as node and things will fall apart downstream in the code.

I could make a copy if the viewstate py etc and modify it but I'd rather not since it's a hassle and rather leverage the one that ships with, and will works with, what ever the current version of kinefx::mappoints is.

So what's the best approach here?

Tween Machine Nov. 13, 2021, 1:19 a.m.

Not exactly the same but does help tremendously with setting up animation easing.

With a few sliders you can mass tweak linearity, ease in/out and continuity of selected keyframes. The video shows an older version, since then a slider to shift the apex of a curve between before/after a keyframe has been added as well. I do 90% of my animations with this tool.

https://vimeo.com/318453314 [vimeo.com]