Hi kisaf,
if you switch in the SendModelingCommand from MODELINGCOMMANDMODE_ALL to MODELINGCOMMANDMODE_POLYGONSELECTION it should work until the mirror in object mode is fixed.
Regards
Fritz
Hi kisaf,
if you switch in the SendModelingCommand from MODELINGCOMMANDMODE_ALL to MODELINGCOMMANDMODE_POLYGONSELECTION it should work until the mirror in object mode is fixed.
Regards
Fritz
GeData objListData = GeData(CUSTOMDATA_ITEMTREE, DEFAULTVALUE);
ItemTreeData* volList = (ItemTreeData*)(objListData.GetCustomDataType(CUSTOMDATA_ITEMTREE));
if (volList)
volList->SetOwner((BaseList2D*)node);
bc.SetData(ID_VOLUMEBUILDER_OBJECT_LIST, objListData);
this sets up the cgui_itemtree list. Important is to set the Owner, or many callbacks will not arrive the parent object.
It's recommended to refresh this owner on "MSG_DESCRIPTION_POSTSETPARAMETER" and "MSG_DOCUMENTINFO_TYPE_SETACTIVE"message, because it happens that the information is lost
#define BOOL_MODE_COLUMN ITEMTREE_USER_COL
#define MIX_MODE_COLUMN ITEMTREE_USER_COL + 1
#define MIXVECTOR_MODE_COLUMN ITEMTREE_USER_COL + 2
#define CHILDTYPE_COLUMN ITEMTREE_USER_COL + 3
#define SMOOTH_RADIUS_COLUMN ITEMTREE_USER_COL + 4
BaseContainer* itreeui = description->GetParameterI(DescLevel(ID_VOLUMEBUILDER_OBJECT_LIST), arr);
if (itreeui)
{
_volMode = GetVolumeMode(bc);
BaseContainer userColTypes;
userColTypes.SetInt32(BOOL_MODE_COLUMN, LV_DROPDOWN);
userColTypes.SetInt32(MIX_MODE_COLUMN, LV_DROPDOWN);
userColTypes.SetInt32(MIXVECTOR_MODE_COLUMN, LV_DROPDOWN);
userColTypes.SetInt32(SMOOTH_RADIUS_COLUMN, LV_SLIDER);
itreeui->SetContainer(ITEMTREE_USER_COL_TYPES, userColTypes);
BaseContainer userColActive;
userColActive.SetBool(BOOL_MODE_COLUMN, _volMode == VOLUMEMODE::SDF);
userColActive.SetBool(MIX_MODE_COLUMN, _volMode == VOLUMEMODE::FOG);
userColActive.SetBool(MIXVECTOR_MODE_COLUMN, _volMode == VOLUMEMODE::VECTOR);
userColActive.SetBool(CHILDTYPE_COLUMN, true);
userColActive.SetBool(SMOOTH_RADIUS_COLUMN, _volMode == VOLUMEMODE::SDF);
itreeui->SetContainer(ITEMTREE_USER_COL_ACTIVE, userColActive);
itreeui->SetBool(ITEMTREE_CHECKBOX_FRONT, true);
BaseContainer thdata;
thdata.SetString(ITEMTREE_ENABLE_COL, ""_s);
thdata.SetString(ITEMTREE_OBJECT_COL, GeLoadString(IDS_VOLUMEBUILDERLIST_NAME));
thdata.SetString(BOOL_MODE_COLUMN, GeLoadString(IDS_VOLUMEBUILDERLIST_MODE));
thdata.SetString(MIX_MODE_COLUMN, GeLoadString(IDS_VOLUMEBUILDERLIST_MODE));
thdata.SetString(MIXVECTOR_MODE_COLUMN, GeLoadString(IDS_VOLUMEBUILDERLIST_MODE));
thdata.SetString(CHILDTYPE_COLUMN, GeLoadString(IDS_VOLUMEBUILDERLIST_INPUT_TYPE));
thdata.SetString(SMOOTH_RADIUS_COLUMN, GeLoadString(IDS_VOLUMEBUILDERLIST_SMOOTH_RADIUS));
itreeui->SetContainer(ITEMTREE_ID_HEADERS_DATA, thdata);
BaseContainer thids;
GeData columnId;
columnId.SetInt32(CHILDTYPE_COLUMN);
thids.SetData(CHILDTYPE_COLUMN, columnId);
itreeui->SetContainer(ITEMTREE_ID_HEADERS_IDS, thids);
}
thats the code in GetDDescription that sets up the UI with colums and header names and hides the columns that are not needed for the chosen mode.
Every entry needs the dropdown data in the list added (recommended to do that in the itemtree callback ITEMTREE_CALLBACK_INSERTNODE). Here an example how the volume builder does it:
inline BaseContainer BuildBoolCycleEntries()
{
BaseContainer cyclebc;
cyclebc.InsData(ID_VOLUMEBUILDER_BOOL_UNION, GeLoadString(IDS_BOOL_UNION));
cyclebc.InsData(ID_VOLUMEBUILDER_BOOL_DIFF, GeLoadString(IDS_BOOL_DIFF));
cyclebc.InsData(ID_VOLUMEBUILDER_BOOL_INTERSECT, GeLoadString(IDS_BOOL_INTERSECT));
return cyclebc;
}
inline BaseContainer BuildBoolCycle()
{
BaseContainer bc;
bc.SetContainer(DESC_CYCLE, BuildBoolCycleEntries());
return bc;
}
inline void AddDropdownDataToNode(ItemTreeNodeData& node)
{
BaseContainer cycleBoolBC = BuildBoolCycle();
cycleBoolBC.SetInt32(BOOL_MODE_COLUMN, ID_VOLUMEBUILDER_BOOL_UNION);
BaseContainer cycleMixBC = BuildMixCycle();
cycleMixBC.SetInt32(MIX_MODE_COLUMN, ID_VOLUMEBUILDER_MIX_NORMAL);
BaseContainer cycleMixVectorBC = BuildMixVectorCycle();
cycleMixVectorBC.SetInt32(MIXVECTOR_MODE_COLUMN, ID_VOLUMEBUILDER_MIXVECTOR_NORMAL);
BaseContainer nodeContainer;
nodeContainer.SetContainer(BOOL_MODE_COLUMN, cycleBoolBC);
nodeContainer.SetContainer(MIX_MODE_COLUMN, cycleMixBC);
nodeContainer.SetContainer(MIXVECTOR_MODE_COLUMN, cycleMixVectorBC);
nodeContainer.SetString(CHILDTYPE_COLUMN, ""_s);
node.m_Data.SetContainer(nodeContainer);
}
in the resource file the UI element needs to be set up correctly:
ITEMTREE ID_VOLUMEBUILDER_OBJECT_LIST
{
ANIM ON; // animation is allowed
NEWLINE; // the name of the UI element is above the ui element
HEADERS; // shows the header bar
MULTIPLE; // allows multiselect of entries
COLUMNS 7; // amount of columns
CHECKBOX; // checkbox added in the list
FOLDERS; // parent folders can be created
DRAGDROP; // drag & drop callbacks are send and d&d is allowed
ICON; // entries are shown with icons
NO_MENU; // no right click menu
ACCEPT // what types are accepted in the list
{
Obase;
1001381; //TP GROUP
}
}
Hope this helps
Regards
Fritz
Hi kisaf,
if you switch in the SendModelingCommand from MODELINGCOMMANDMODE_ALL to MODELINGCOMMANDMODE_POLYGONSELECTION it should work until the mirror in object mode is fixed.
Regards
Fritz
Hi John,
important for field "memory" effects that depend of previous frames is the correct "caller" in the FieldInfo. This is important for the list to know whom to store the previous frame data for, as many sources can sample the same field list. The SampleListSimple you are using does not require passing a FieldInfo and I would assume that should still work as you are passing the caller (*op) to the Sample call, but maybe maybe something is broken :D. It might be worth trying the longer route by creating a FieldInfo and calling the general Sample function.:
maxon::Result< void > SampleList (const FieldInfo &info, const FieldInput &inputs, FieldOutput &outputs)
https://developers.maxon.net/docs/cpp/2023_2/struct_field_info.html
Regards
Fritz
Thx for the answers,
@Manuel I was just trying to set some library specific defines. I tried with a random define text and it breaks plugins.
@Kent I will try that, thank you.
Shouldn't it however also work how I did it?
Regards
Fritz
Important to note: adding the setting manually to the project works. Only when using AdditionalCompileOptions this happens.
Hi SDK Team,
After hours of searching inexplicable crashes when Init() is called on plugin object creation I narrowed it down to using "AdditionalCompileOptions" in the projectdefinition. No matter what the set setting is, just adding:
AdditionalCompileOptions.Win64.Debug= /D "ANYSETTING"
to the projectdefinition.txt breaks any plugin under windows. Tested with adding it to the SDK example plugin and it crashes on cinema startup. Same with "Release" setting instead of "Debug"
I am using VS2017 community with v141 toolset win 8.1 sdk version. (all default what update projects
tool created). SDK & Cinema Version is R21.022.
Regards
Fritz