Notifications
Clear all
[Closed] SDK: Sub-Object
Jan 02, 2015 1:10 am
Hi,
I couldn’t find many informations about adding sub-objects to the plugins. I need to add one to my plugin, so I put at the top:
static GenSubObjType SOT_MySubObj(10); //whats does the integer in the constructor mean?
and then in my plugin class:
int NumSubObjTypes() { return 1; }
ISubObjType* GetSubObjType(int i)
{
static bool initialized = false;
if(!initialized)
{
initialized = true;
SOT_ContPoints.SetName(_T("Subobject"));
}
return &SOT_MySubObj;
}
But no sub-object appears… How to make it correct? My plugin is a Geometry object.
1 Reply
Jan 02, 2015 1:10 am
//whats does the integer in the constructor mean?
This constructor assumes that the icons are in either [b]UI/icons/SubObjectIcons_16i.bmp[/b] or [b]SubObjectIcons_24i.bmp[/b] depending on which size icons are in use by the system. In this case only the index into the image list is required.
you also have to implement
virtual DWORD GetSubselState ()
virtual void SetSubSelState (DWORD s)
from object and
int GetSubObjectLevel()
void ActivateSubobjSel(int level, XFormModes& modes)
from baseObject
, BTW from experience sub object selection on a base object can be quite tricky to implement.