Skip to content

Restore fFiller=0 when setting value to a PA_Variable #36

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions 4D Plugin API/4DPluginAPI.c
Original file line number Diff line number Diff line change
Expand Up @@ -4261,13 +4261,15 @@ void PA_SetVariable( PA_Unichar* variableName, PA_Variable variable, char clearO
void PA_SetStringVariable( PA_Variable* variable, PA_Unistring* ustr )
{
variable->fType = eVK_Unistring;
variable->fFiller = 0;
variable->uValue.fString = *ustr;
}


void PA_SetBlobVariable( PA_Variable* variable, void* blob, PA_long32 len )
{
variable->fType = eVK_Blob;
variable->fFiller = 0;
variable->uValue.fBlob.fHandle = FromUserData( blob, len );
variable->uValue.fBlob.fSize = len;
}
Expand All @@ -4276,6 +4278,7 @@ void PA_SetBlobVariable( PA_Variable* variable, void* blob, PA_long32 len )
void PA_SetBlobHandleVariable( PA_Variable* variable, PA_Handle hblob )
{
variable->fType = eVK_Blob;
variable->fFiller = 0;
variable->uValue.fBlob.fHandle = hblob;
variable->uValue.fBlob.fSize = (PA_long32)PA_GetHandleSize( hblob );
}
Expand All @@ -4284,13 +4287,15 @@ void PA_SetBlobHandleVariable( PA_Variable* variable, PA_Handle hblob )
void PA_SetPictureVariable( PA_Variable* variable, PA_Picture picture )
{
variable->fType = eVK_Picture;
variable->fFiller = 0;
variable->uValue.fPicture = picture;
}


void PA_SetRealVariable( PA_Variable* variable, double value )
{
variable->fType = eVK_Real;
variable->fFiller = 0;
variable->uValue.fReal = value;
}

Expand All @@ -4305,13 +4310,15 @@ void PA_SetLongintVariable( PA_Variable* variable, PA_long32 value )
void PA_SetTimeVariable( PA_Variable* variable, PA_long32 value )
{
variable->fType = eVK_Time;
variable->fFiller = 0;
variable->uValue.fTime = value;
}


void PA_SetDateVariable( PA_Variable* variable, short day, short month, short year )
{
variable->fType = eVK_Date;
variable->fFiller = 0;
variable->uValue.fDate.fDay = day;
variable->uValue.fDate.fMonth = month;
variable->uValue.fDate.fYear = year;
Expand All @@ -4320,19 +4327,22 @@ void PA_SetDateVariable( PA_Variable* variable, short day, short month, short ye
void PA_SetBooleanVariable( PA_Variable* variable, char value )
{
variable->fType = eVK_Boolean;
variable->fFiller = 0;
variable->uValue.fBoolean = value;
}


void PA_SetObjectVariable( PA_Variable* variable, PA_ObjectRef object )
{
variable->fType = eVK_Object;
variable->fFiller = 0;
variable->uValue.fObject = object;
}

void PA_SetCollectionVariable(PA_Variable* variable, PA_CollectionRef collection)
{
variable->fType = eVK_Collection;
variable->fFiller = 0;
variable->uValue.fCollection = collection;
}

Expand Down