Announcements

Between mid-October and November, the content on AREA will be relocated to the Autodesk Community M&E Hub and the Autodesk Community Gallery. Learn more HERE.

c++ custom modifier - table view?

c++ custom modifier - table view?

har1sf0x
Advocate Advocate
1,250 Views
12 Replies
Message 1 of 13

c++ custom modifier - table view?

har1sf0x
Advocate
Advocate

Hello, I am trying to create a modifier that loops through pairs of values and does a repeated task (Extend borders according to a. distance and b. angle). I am thinking of a table view with 2 columns. I can create such a control with maxscript and dotnet but as far as I know I can not use a maxscript rollout in a modifier created with the sdk. Qt might be the way but I think that I need to create a wrapper and I am still learning, so I am unable to do so.

- Is there a way to create such a control and others?

- Are there resources where I can learn about such things, creating custom controls in c++?

 

Any help is welcomed. Thank you in advance.

 

p.s. One other issue that I am having is that even though my plug in works fine, when I stack two or more of my modifiers in an object it crashes. I have tried theHold in order to also avoid some crashes when I was editing subobject below my modifier (it seams fixed and removed theHold). If an edit_poly modifier is in between it seams that it solves the problem. Any clues/suggestions.

0 Likes
Accepted solutions (4)
1,251 Views
12 Replies
Replies (12)
Message 2 of 13

istan
Advisor
Advisor

Did you go through the maxsdk samples?

0 Likes
Message 3 of 13

har1sf0x
Advocate
Advocate

Yes, studying through the .cpp and .h files, but not the .rc to be honest, i also have not compile them in order to see their ui. I'll give them a go again. Do you suggest any particular project?

0 Likes
Message 4 of 13

istan
Advisor
Advisor

since you want to create a modifier: "maxsdk\samples\modifiers"

0 Likes
Message 5 of 13

har1sf0x
Advocate
Advocate

The modifier is created, the ui is the issue. I am trying to create a list of Point2 or a table with 2 columns (preferably for ease of use in the viewport). I managed to create a point2 with qt (QmaxPoint2Spinner) but not a list of them, not even a list of floats or strings 😞 

0 Likes
Message 6 of 13

istan
Advisor
Advisor
Accepted solution
Message 7 of 13

har1sf0x
Advocate
Advocate

Thanks a lot, i'll check it, although, at first, the main issue is that i cannot connect a qt ui element with a tab parameter in the paramblock2, even though i used the _tab_size convention. 😞 I am afraid i cannot use a raw view or widget element (list or table) and i should create a wrapper of it, but i am not sure what a wrapper needs.

0 Likes
Message 8 of 13

istan
Advisor
Advisor
Accepted solution
Message 9 of 13

har1sf0x
Advocate
Advocate

Ohh, I was testing with strings and list/table which seam to be unsupported without tweaks. I'll check with floats.

Huge thnx!

One last thing before running for the test. With the tab variables are we restricted to the number specified, is it not adjustable?

0 Likes
Message 10 of 13

istan
Advisor
Advisor
Accepted solution

please read the doc it's all there.

https://help.autodesk.com/view/MAXDEV/2021/ENU/?guid=__cpp_ref_class_i_param_block2_html 

append() insert() delete()..

0 Likes
Message 11 of 13

har1sf0x
Advocate
Advocate

Thank you once more for your time but I might was putting it wrong. In order to append, insert and delete I first have to go through here:

listWidget_tab_10, _T("listWidget_tab_10"), TYPE_FLOAT_TAB, 0, IDS_LIST,
		p_accessor, &_accessor,
		p_end,

 which compiles but gives loading max error:

Screenshot 2023-03-18 181228.png

0 Likes
Message 12 of 13

istan
Advisor
Advisor
Accepted solution

It's always the best, to take working code from the samples.

Search for "TYPE_FLOAT_TAB" in the max sdk samples - I'm sure you'll immediately see the missing parameter..

Message 13 of 13

har1sf0x
Advocate
Advocate

I had also tried this as well when I posted earlier.

listWidget_tab_10, _T("listWidget_tab_10"), TYPE_FLOAT_TAB, 10, P_VARIABLE_SIZE, IDS_LIST,
		p_accessor, &_accessor,
		p_end,

But the problem was elsewhere. I hade also another faulty build, trying without qt, that was blocking max, what a n00b error 😞

Thnx, @istan , now I can move to the rest of your suggestions! cheers.

0 Likes