Notifications
Clear all

[Closed] <fpvalue> does this mean Floating point?

Hi there!

in the maxscript manual it say’s something like <fpvalue>name_or_index

what does fpvalue means ???

Hope somebody can help ?

6 Replies
2 Replies
(@bobo)
Joined: 11 months ago

Posts: 0

FP in MAXScript usually stands for “Function Publishing (Interface)”.
Function Publishing was introduced in Max 4 and allows developers to expose most properties and methods of a new plugin to MAXScript without having to explicitly write MAXScript code to do so – it happens almost automatically while defining the C++ code.
(for regular plug-ins, the ParameterBlock2 introduced in R3 is responsible for making the properties exposed to MAXScript). You will notice that since R4, most new features that require deeper access than just reading and writing animatable parameters are exposed via Function Publishing Interfaces.

These <fpvalue> arguments usually appear in Interface methods documentation.
You are typically expected to supply a name or an index (1-based integer) value, and the Interface method is figuring out what its meaning is – for example, in the case of Interface: TrackViews, supplying a string with the name of the trackview or the index returns another Interface representing the TrackView itself.
The documentation could read <string or index>trackview, but it was taken directly from the ShowInterface output automatically generated by MAXScript. Since there is no way to internally define a value class as <string or index>, the internal definition just mentions a general <fpvalue>, then explains what this value could be. Where the value type is concrete, like <string>name or <index>index, the Interface documentation tells you so…

(@martin_andersen)
Joined: 11 months ago

Posts: 0

Hi Bobo! Good to hear from you, there wasn’t really mutch info on this !!
THX

What I’m trying to do is to set/read the values in the parameter collector in max 7
I understand aallmost all of the Methods in the help about the parameter collector , but I just cant find a way to read/set the parameters values… is this possible? if then, how ?

Hope you can help

And once again, Thanks Alot !

Yes, it is possible, but the help does not make it easier to figure out, as it is full of errors
(which will be fixed ASAP).

The method getParameterSubAnimNum does NOT return the number of subanims, but the INDEX inside the Parent Anim Object.

So if you create a Box, collect all 3 animatable parameters (Length, Widht and Height) and then write

(ParamCollectorOps.getParameterParentAnim 1)[ParamCollectorOps.getParameterSubAnimNum 1].value

you will get the value of the Length sub-animation track.

(ParamCollectorOps.getParameterParentAnim 1)[ParamCollectorOps.getParameterSubAnimNum 1].value = 10

will set the value of the Box’s length to 10 units and so on…

“1” is the index of the parameter. You can get the index of a parameter by using

ParamCollectorOps.getParameterIndex 1 1 1

where the first argument is the collection index, the second is the rollout index in the collection, the third is the parameter index inside the rollout. In the above case, the result would be 1 (first parameter in first rollout of the first collection)…

Hope this helps.

Cheers,
Bobo

in the parameter collector there is a “property” telling if you are using
easy in/out but that isn’t availible through the ParamCollectorOps method…

what i want is get the: ParamCollectorOps.[ <index> ].proberty.inTangentType

returns the tangent type, for the keyd property:
#smooth or…#flat, #step etc.

Do I have to take out the node-name of the parameter and test it myself or is there an easy’er way ?

1 Reply
(@bobo)
Joined: 11 months ago

Posts: 0

If the property has a controller (is animated?), you can use the method

ParamCollectorOps.getParameterAnim 1

to get the Animation Controller of the parameter. (It returns undefined if there is no controller). From there, you can use the default MaxKey methods you would use on an object. Basically, the ParamCollector is just an alternative interface to the ParamBlocks of scene objects – once you get to the controller or parameter track, you don’t care about the Parameter Collector anymore and use good old MAXScript methods to affect the objects…

[Edit: Post deleted]