added ob.passIndex to bpy, changed passIndex tooltip to a better one ton suggested.
This commit is contained in:
@@ -172,7 +172,8 @@ enum obj_consts {
|
|||||||
EXPP_OBJ_ATTR_TIMEOFFSET,
|
EXPP_OBJ_ATTR_TIMEOFFSET,
|
||||||
EXPP_OBJ_ATTR_DRAWSIZE,
|
EXPP_OBJ_ATTR_DRAWSIZE,
|
||||||
EXPP_OBJ_ATTR_PARENT_TYPE,
|
EXPP_OBJ_ATTR_PARENT_TYPE,
|
||||||
|
EXPP_OBJ_ATTR_PASSINDEX,
|
||||||
|
|
||||||
EXPP_OBJ_ATTR_PI_SURFACEDAMP, /* these need to stay together */
|
EXPP_OBJ_ATTR_PI_SURFACEDAMP, /* these need to stay together */
|
||||||
EXPP_OBJ_ATTR_PI_RANDOMDAMP, /* and in order */
|
EXPP_OBJ_ATTR_PI_RANDOMDAMP, /* and in order */
|
||||||
EXPP_OBJ_ATTR_PI_PERM,
|
EXPP_OBJ_ATTR_PI_PERM,
|
||||||
@@ -3544,6 +3545,9 @@ static PyObject *getIntAttr( BPy_Object *self, void *type )
|
|||||||
case EXPP_OBJ_ATTR_DUPEND:
|
case EXPP_OBJ_ATTR_DUPEND:
|
||||||
param = object->dupend;
|
param = object->dupend;
|
||||||
break;
|
break;
|
||||||
|
case EXPP_OBJ_ATTR_PASSINDEX:
|
||||||
|
param = object->index;
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
return EXPP_ReturnPyObjError( PyExc_RuntimeError,
|
return EXPP_ReturnPyObjError( PyExc_RuntimeError,
|
||||||
"undefined type in getIntAttr" );
|
"undefined type in getIntAttr" );
|
||||||
@@ -3593,6 +3597,12 @@ static int setIntAttrClamp( BPy_Object *self, PyObject *value, void *type )
|
|||||||
size = 'H'; /* in case max is later made > 32767 */
|
size = 'H'; /* in case max is later made > 32767 */
|
||||||
param = (void *)&object->dupend;
|
param = (void *)&object->dupend;
|
||||||
break;
|
break;
|
||||||
|
case EXPP_OBJ_ATTR_PASSINDEX:
|
||||||
|
min = 0;
|
||||||
|
max = 1000;
|
||||||
|
size = 'H'; /* in case max is later made > 32767 */
|
||||||
|
param = (void *)&object->index;
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
return EXPP_ReturnIntError( PyExc_RuntimeError,
|
return EXPP_ReturnIntError( PyExc_RuntimeError,
|
||||||
"undefined type in setIntAttrClamp");
|
"undefined type in setIntAttrClamp");
|
||||||
@@ -4102,7 +4112,7 @@ static int setFloat3Attr( BPy_Object *self, PyObject *value, void *type )
|
|||||||
|
|
||||||
static PyObject *Object_getRestricted( BPy_Object *self, void *type )
|
static PyObject *Object_getRestricted( BPy_Object *self, void *type )
|
||||||
{
|
{
|
||||||
if (self->object->restrictflag & (short)type)
|
if (self->object->restrictflag & (int)type)
|
||||||
Py_RETURN_TRUE;
|
Py_RETURN_TRUE;
|
||||||
else
|
else
|
||||||
Py_RETURN_FALSE;
|
Py_RETURN_FALSE;
|
||||||
@@ -4112,9 +4122,9 @@ static int Object_setRestricted( BPy_Object *self, PyObject *value,
|
|||||||
void *type )
|
void *type )
|
||||||
{
|
{
|
||||||
if (PyObject_IsTrue(value) )
|
if (PyObject_IsTrue(value) )
|
||||||
self->object->restrictflag |= (short)type;
|
self->object->restrictflag |= (int)type;
|
||||||
else
|
else
|
||||||
self->object->restrictflag &= ~(short)type;
|
self->object->restrictflag &= ~(int)type;
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@@ -4777,6 +4787,10 @@ static PyGetSetDef BPy_Object_getseters[] = {
|
|||||||
(getter)getIntAttr, (setter)setIntAttrClamp,
|
(getter)getIntAttr, (setter)setIntAttrClamp,
|
||||||
"Ending frame (for DupliFrames)",
|
"Ending frame (for DupliFrames)",
|
||||||
(void *)EXPP_OBJ_ATTR_DUPEND},
|
(void *)EXPP_OBJ_ATTR_DUPEND},
|
||||||
|
{"passIndex",
|
||||||
|
(getter)getIntAttr, (setter)setIntAttrClamp,
|
||||||
|
"Index for object masks in the compositor",
|
||||||
|
(void *)EXPP_OBJ_ATTR_PASSINDEX},
|
||||||
{"mat",
|
{"mat",
|
||||||
(getter)Object_getMatrixWorld, (setter)NULL,
|
(getter)Object_getMatrixWorld, (setter)NULL,
|
||||||
"worldspace matrix: absolute, takes vertex parents, tracking and Ipos into account",
|
"worldspace matrix: absolute, takes vertex parents, tracking and Ipos into account",
|
||||||
|
|||||||
@@ -436,6 +436,9 @@ class Object:
|
|||||||
@ivar DupOff: The DupliFrame removal of every Nth frame for this object.
|
@ivar DupOff: The DupliFrame removal of every Nth frame for this object.
|
||||||
Use with L{enableDupFrames}. Value is clamped to [0,1500].
|
Use with L{enableDupFrames}. Value is clamped to [0,1500].
|
||||||
@type DupOff: int
|
@type DupOff: int
|
||||||
|
@ivar passIndex: Index # for the IndexOB render pass.
|
||||||
|
Value is clamped to [0,1000].
|
||||||
|
@type DupOff: int
|
||||||
@ivar drawSize: The size to display the Empty.
|
@ivar drawSize: The size to display the Empty.
|
||||||
Value clamped to [0.01,10.0].
|
Value clamped to [0.01,10.0].
|
||||||
@type drawSize: float
|
@type drawSize: float
|
||||||
|
|||||||
@@ -1887,7 +1887,7 @@ static void object_panel_object(Object *ob)
|
|||||||
/* parent */
|
/* parent */
|
||||||
uiDefIDPoinBut(block, test_obpoin_but, ID_OB, B_OBJECTPANELPARENT, "Par:", xco+5, 180, 305-xco, 20, &ob->parent, "Parent Object");
|
uiDefIDPoinBut(block, test_obpoin_but, ID_OB, B_OBJECTPANELPARENT, "Par:", xco+5, 180, 305-xco, 20, &ob->parent, "Parent Object");
|
||||||
|
|
||||||
but = uiDefButS(block, NUM, B_NOP, "PassIndex:", xco+5, 150, 305-xco, 20, &ob->index, 0.0, 1000.0, 0, 0, "Object Pass Index");
|
but = uiDefButS(block, NUM, B_NOP, "PassIndex:", xco+5, 150, 305-xco, 20, &ob->index, 0.0, 1000.0, 0, 0, "Index # for the IndexOB render pass.");
|
||||||
|
|
||||||
uiDefBlockBut(block, add_groupmenu, NULL, "Add to Group", 10,150,150,20, "Add Object to a new Group");
|
uiDefBlockBut(block, add_groupmenu, NULL, "Add to Group", 10,150,150,20, "Add Object to a new Group");
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user