Scripted Plugin Controller Rollout Keeps Popping off the Motion Panel

Scripted Plugin Controller Rollout Keeps Popping off the Motion Panel

andy.van.dalsem
Contributor Contributor
1,198 Views
6 Replies
Message 1 of 7

Scripted Plugin Controller Rollout Keeps Popping off the Motion Panel

andy.van.dalsem
Contributor
Contributor

Hi guys,

 

I'm having a strange problem.

I'm messing around with the sample float controller scripted plugin here in the help files and whenever I assign the controller the UI that used to attach to the Motion Panel keeps popping off in to it's own dialog box. 

 

andyvandalsem_1-1686719698665.png

 

Once you close the dialog window the UI is no longer accessible anywhere. 

 

The same thing is happening on an MCG controller plugin I was messing with. The UI was populating in the Motion Panel just fine, then suddenly it stopped. 

I restored factory defaults, even restarted the PC, the UI just won't go back to how it used to work.

 

Has anyone else ever seen this? I can't track down what's happening. The script is right out of the help files so I think something else is going on.  I'm in Max 2024.

 

0 Likes
1,199 Views
6 Replies
Replies (6)
Message 2 of 7

denisT.MaxDoctor
Advisor
Advisor

My post may sound like an offtopic, but I want to say that since adding Scripted Controllers to MAX, I have not been able to find any useful application for them. And it's not that I don't want to or don't know how... It's just that I've always found better solutions than using Scripted Controllers.

0 Likes
Message 3 of 7

andy.van.dalsem
Contributor
Contributor

Yeah, I was actually revisiting an old idea I had where I was just using custAttributes attached to a controller that worked pretty well, but thought it might be interesting to package it up as it's own controller type. More than anything it just seemed like a convenient way to prototype an idea. 

 

The only real benefits I saw to doing it as a scripted controller were 1) I could assign it directly from the Assign Controller dialog and 2) it gave me a nice UI right inside the Motion Panel. 

 

The UI was working fine a few days ago then suddenly, out of nowhere, any scripted controller with a rollout creates the UI items in a floating dialog that can't be accessed again once the dialog's been closed (without a script command, at least). Obviously, this pretty much negates any of the convenience I thought the scripted controller was giving me in the first place.

 

So even though scripted controllers may not have much use, or their effects could be better achieved in other ways, I just want to figure out what broke. Why isn't the UI going where it used to? 

0 Likes
Message 4 of 7

denisT.MaxDoctor
Advisor
Advisor

post here the full code you are using, so people can reproduce the issue while working with the exactly same code

0 Likes
Message 5 of 7

andy.van.dalsem
Contributor
Contributor

Ok. I linked to it in the first post but here's the code I'm using from the help page:

plugin FloatController FloatController_simplified_examplename:"Simplified FloatController Example"
usePBValidity:false -- false because time dependent
classID:#(0xc1dbcd6, 0x70ecb08a)
(    
    parameters pblock rollout:params
    (        
offset_value
type:#float animatable:true ui:offset_value valueController type:#maxobject subAnim:true ) rollout params "FloatController Test Parameters" ( Spinner offset_value "Offset Value:" range:[0, 1e9, 40] ) on getValue do (
valueController.value
+offset_value + currentTime as integer / framerate ) on setValue val relVal commit do (
val
-= ( offset_value+ currentTime as integer / framerate)
SetControllerValue valueController val commit
#absolute ) on create do (
valueController
= NewDefaultFloatController()
isLeaf
=true ) ) /* Test case: t = teapot isselected:true t.radius.controller = c = FloatController_simplified_example() c.isKeyable = true c.isleaf = false */

This is the second example on the page, but the first more complicated example has the same issue. 

This code initially produced a controller with UI that populated the Motion Panel. Then something happened and now the UI on any scripted controller only appears on a floating dialog window. 

 

I don't think the code's the issue since it's happening on any and every scripted controller I've tried, but, this is code I've seen the issue with. 

0 Likes
Message 6 of 7

denisT.MaxDoctor
Advisor
Advisor

All I can do is confirm the problem... Why this is happening, I can't figure out. It doesn't look like a feature, it looks more like a bug.
We can only hope that someone from the 3DS MAX developers will give an explanation for this behavior.

Message 7 of 7

andy.van.dalsem
Contributor
Contributor

Ok, so it's not just me then. Thanks for the confirmation. I'll see if I can figure out how to submit it as a bug and see what happens from there. Thanks again! 

0 Likes