[SOLVED] SimpleSpline plugin update on time change


#1

Hey everyone. I have been working on a reeving plugin for a while now, things are starting to look good.

However I have run into a bit of a snag. In the second part of the GIF I am moving the timeslider and the shape is not updating. This also means it isn’t updating on rendertime.

currently I am using the buildshape event to update the spline, but it doesn’t seem to take timechanges into account. Is there any way I can get this to work? Am I missing something essential?

I have also tried to mimic the script in MCG, but I am very script oriented and the MCG workflow is giving me a headache at the moment. The reeving behaviour is too tricky to mimic in MCG for me right now, however a simple ‘helperPosition to splineknots’ shape worked and that one does work with timechanges… :open_mouth:

EDIT: removed the script file, because it is also work related. Sollution can be found in the last post


#2

could you please save the max file in 2016 version? It will make debugging easier for me.


#3

No… we just need to find the right dependency model. Any time or redraw changes are not a solution.


#4

Zed’s dead baby, Zed’s dead.


#5

Unfortunately I don’t have older 3ds max versions installed so I cannot easily move it back to 2016 right now. If you don’t mind you can easily set up you own scene, just create a couple of helper nodes and add them in the plugin helper list. Currently looking to see what I can do in the long run (as you mentioned 2016 before a couple of times)

I have also updated the script version in the first post, it now does a postload update and starts buidling the shape after more than 1 helper added .

The test with MCG was because I am quite surprized at the speed of shape updetes in MCG, but like I said, I just have a hard time wrapping my head around a visual way of scripting. Basic things like for looping, and simple array manipulations take quite a different aproach…


#6

My goodness…

ok, after inspecting the MCG generated script I noticed two parameter arguments: useNodeTMValidity and UseNodeOSValidity. Never knew about these two but they help to set the right behaviour on the shape.

#node and #nodeTab can take these flags, which affect whether the plugin is re-evaluated if the node is animated:

    useNodeTmValidity - set to true to cause the scripted plugin to take into account the node's transform validity.
    useNodeOsValidity - set to true to cause the scripted plugin to take into account the node's object space / geometry pipeline validity.

I have spent multiple days trying many ways, and it doesn’t help if you use older mxs help files :frowning: I guess these were introduced in 2018 version as that is where they first show up in the help files.


#7

good job! :+1:


#8

It works for 2016 but is not included in the help. Can anyone test this works for 2014?


#9

There’s no useNodeTmValidity nor useNodeOsValidity strings in Maxscrpt.dll of 2014


#10

not looked at it but has anyone tried using…

on attachedToNode <nodeVar> do ...

and

notifyDependents <MAXObject> partID:<name> msg:<int> propogate:<bool>

using

PART_TM


#11

I don’t quite understand your question … yes, I use and have used both of them often. Didn’t notice that something wasn’t working or was working weird.


#12

I have used notifydependents in the past yes, but it doesn’t work as a trigger in itself as far as I know. It should always be part of a trigger system like a callback or change handler right?