x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

Can't add a material picker (SPropertyEditorAsset?) to my Editor plugin, what am I missing?

I'm building an editor plugin that needs to display a listview of FStrings and (assignable) UMaterialInterfaces.

I've got the listview and strings, but even after trawling through a ton of engine source code, I haven't been able to find a single widget class that I can actually use or a simple bit of code that gives me one of the material assignment widgets the editor uses.

alt text

The widget reflector points to SPropertyEditorAsset, but even after including PropertyEditor in my build file's private include paths, it's still not showing up as a known class... and I can't include the .h file for it.

Anyone have any pointers?

Am I barking up the wrong tree?

Product Version: Not Selected
Tags:
more ▼

asked Oct 27 '15 at 01:30 AM in C++ Programming

avatar image

turfster
87 8 19 23

avatar image dkloving Nov 18 '15 at 08:28 PM

I would love to see an answer to this as well! Can anyone help?

avatar image szyszek Nov 19 '15 at 02:23 PM

if you can #include "PropertyEditorModule.h" in your .cpp file you should be able to use SObjectPropertyEntryBox widget.

t works the same as SPropertyEditorAsset (in fact, it contains one) but wont display the thumbnail unless you specify a property handle and thumbnail pool.

More or less this code should get you on the right track:

 SNew(SObjectPropertyEntryBox)
             .OnObjectChanged(this, &SMyWidget::OnMaterialChanged)
             .AllowedClass(UMaterial::StaticClass())
avatar image dkloving Nov 23 '15 at 12:12 AM

I've included the header you mention, but it still shows up as undeclared identifier.

According to the docs, SObjectPropertyEntryBox is in Editor/PropertyEditor/Public/PropertyCustomizationHelpers.h, but including that gives me errors in editor\propertyeditor\public\SResetToDefaultMenu.h

(For the record, I'm trying to make a static mesh selector, but it looks like that's just a minor change).

avatar image dkloving Nov 23 '15 at 12:28 AM

Nevermind, sorted that out with my .cs file.

avatar image turfster Dec 02 '15 at 09:32 PM

Thanks, that did it. I'd set it as the right answer, but for some reason, I only get an upvote and no "answer" button.

avatar image morgenmiddag1 Apr 25 '17 at 11:21 AM

Hi, I'm struggling with implementing a propertyHandle and ThumbnailPool. Can someone point me to an example that shows me how to use them?

thanks in advance!

avatar image ttvd Nov 19 '15 at 06:08 PM
avatar image dkloving Nov 23 '15 at 12:20 AM

I see that your PCH includes PropertyCustomizationHelpers.h. I get errors in SResetToDefaultMenu.h(15). Do you know if you had any problems with that as well?

avatar image dkloving Nov 23 '15 at 12:28 AM

Nevermind, sorted it. Thought to check your plugin.build.cs and discovered I needed to add PropertyEditor as a dependency. That thing confuses me, but thanks for the help!

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

0 answers: sort voted first
Be the first one to answer this question
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question