Adding ReferenceWidgets to PPGs?

It used to be possible to add a ReferenceWidget by calling oLayout.AddItem( “Param”, “ref”, “ReferenceWidget” ) in your DefineLayout. But that was four or five years ago, and it no longer works.

def MyProperty3333_DefineLayout( in_ctxt ):
	oLayout = in_ctxt.Source

	# Test some other control types
	oLayout.AddItem( "Param", "txt", "Texture Space" )
	oLayout.AddItem( "Param", "scnref", "SceneReferenceWidget" )

	# Doesn't work
	oLayout.AddItem( "Param", "ref", "ReferenceWidget" )

	# Doesn't work
	oPPGItem = oLayout.AddItem( "Param", "", "dscontrol" ) ;
	oPPGItem.SetAttribute( "UIType", "ReferenceWidget" );

For reference 😉 this is a ReferenceWidget:

And this is how a ReferenceWidget is added in SPDL:

	Parameter "inst_source" input
		title = "Instance source";
		guid = "{5620730D-AEFC-4C4A-B1DF-9377E808E27B}";
		type = reference;
		Name = "Source Object";
		UIType = "ReferenceWidget.ReferenceWidget.1"
			filter = "{6B579D20-3DC5-11D0-9449-00AA006D3165}";
			mode = "single";

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s