also removed unnecessary NULL checks (where the pointer was used later without checking).
float (*obmat)[4], (*oldobmat)[4];
int a, b, counter, hair = 0;
int totpart, totchild, totgroup=0, pa_num;
- unsigned int lay;
if(psys==0) return;
totchild = psys->totchild;
BLI_srandom(31415926 + psys->seed);
-
- lay= scene->lay;
+
if((psys->renderdata || part->draw_as==PART_DRAW_REND) && ELEM(part->ren_as, PART_DRAW_OB, PART_DRAW_GR)) {
ParticleSimulationData sim= {0};
sim.scene= scene;
static int cloth_bvh_objcollisions_resolve ( ClothModifierData * clmd, CollisionModifierData *collmd, CollPair *collisions, CollPair *collisions_index)
{
Cloth *cloth = clmd->clothObject;
- int i=0, j = 0, numfaces = 0, numverts = 0;
+ int i=0, j = 0, /*numfaces = 0,*/ numverts = 0;
ClothVertex *verts = NULL;
int ret = 0;
int result = 0;
float tnull[3] = {0,0,0};
- numfaces = clmd->clothObject->numfaces;
+ /*numfaces = clmd->clothObject->numfaces;*/ /*UNUSED*/
numverts = clmd->clothObject->numverts;
verts = cloth->verts;
void CustomData_merge(const struct CustomData *source, struct CustomData *dest,
CustomDataMask mask, int alloctype, int totelem)
{
- const LayerTypeInfo *typeInfo;
+ /*const LayerTypeInfo *typeInfo;*/
CustomDataLayer *layer, *newlayer;
int i, type, number = 0, lasttype = -1, lastactive = 0, lastrender = 0, lastclone = 0, lastmask = 0, lastflag = 0;
for(i = 0; i < source->totlayer; ++i) {
layer = &source->layers[i];
- typeInfo = layerType_getInfo(layer->type);
+ /*typeInfo = layerType_getInfo(layer->type);*/ /*UNUSED*/
type = layer->type;
MFace *mface = me->mface;
MDisps *mdisps = CustomData_get_layer(&me->fdata, CD_MDISPS);
int *gridOffset;
- int i, numGrids, gridSize, dGridSize, dSkip;
+ int i, /*numGrids,*/ gridSize, dGridSize, dSkip;
if(!mdisps) {
if(invert)
return;
}
- numGrids = dm->getNumGrids(dm);
+ /*numGrids = dm->getNumGrids(dm);*/ /*UNUSED*/
gridSize = dm->getGridSize(dm);
gridData = dm->getGridData(dm);
gridOffset = dm->getGridOffset(dm);
Object *obedit= CTX_data_edit_object(C);
Object *oldob, *newob;
Base *oldbase, *newbase;
- bArmature *arm;
/* sanity checks */
if (obedit == NULL)
return OPERATOR_CANCELLED;
- arm= obedit->data;
/* set wait cursor in case this takes a while */
WM_cursor_wait(1);
BIF_flagMultiArcs(reebg, ARC_FREE);
/* return to first level */
- reebg = rigg->link_mesh;
-
inode = rigg->head;
matchMultiResolutionStartingNode(rigg, reebg, inode);
Object *ob;
RigGraph *rigg;
RigArc *iarc;
- bArmature *arm;
char *side_string = scene->toolsettings->skgen_side_string;
char *num_string = scene->toolsettings->skgen_num_string;
int free_template = 0;
if (template_rigg)
{
ob = template_rigg->ob;
- arm = ob->data;
}
else
{
free_template = 1;
- ob = obedit;
- arm = ob->data;
- template_rigg = armatureSelectedToGraph(C, ob, arm);
+ ob = obedit;
+ template_rigg = armatureSelectedToGraph(C, ob, ob->data);
}
if (template_rigg->arcs.first == NULL)
{
Object *obedit= scene->obedit; // XXX context
Object *ob= OBACT;
- bArmature *arm= ob->data;
+ bArmature *arm;
bPoseChannel *pchan, *pchanact;
short nr=0;
int i=0;
if (pchan==NULL) return;
pchanact= pchan;
-
+ arm= ob->data;
+
/* if proxy-protected bones selected, some things (such as locks + displays) shouldn't be changable,
* but for constraints (just add local constraints)
*/
{
ScrArea *sa= CTX_wm_area(C);
Object *ob;
- bArmature *arm;
bPose *pose;
short done= 0;
/* only continue if there's an object, and a pose there too */
if (ELEM(NULL, ob, ob->pose))
return OPERATOR_CANCELLED;
- arm= ob->data;
+
pose= ob->pose;
/* set the active group number to the one from operator props
{
ScrArea *sa= CTX_wm_area(C);
Object *ob;
- bArmature *arm;
- bPose *pose;
short done= 0;
/* since this call may also be used from the buttons window, we need to check for where to get the object */
/* only continue if there's an object, and a pose there too */
if (ELEM(NULL, ob, ob->pose))
return OPERATOR_CANCELLED;
- pose= ob->pose;
- arm= ob->data;
/* find selected bones to remove from all bone groups */
CTX_DATA_BEGIN(C, bPoseChannel*, pchan, selected_pose_bones)
void pose_activate_flipped_bone(Scene *scene)
{
Object *ob= OBACT;
- bArmature *arm= ob->data;
-
+
if(ob==NULL) return;
if(ob->mode & OB_MODE_WEIGHT_PAINT) {
ob= modifiers_isDeformedByArmature(ob);
}
+
if(ob && (ob->mode & OB_MODE_POSE)) {
bPoseChannel *pchanf;
-
+ bArmature *arm= ob->data;
+
if(arm->act_bone) {
char name[32];
flip_side_name(name, arm->act_bone->name, TRUE);
EditVert *eve;
EditFace *efa;
int index;
- int totvert;
- int totfaces;
+ /*int totvert;*/
#ifdef DEBUG_REEB
+ int totfaces;
int countfaces = 0;
#endif
rg->resolution = subdivisions;
- totvert = BLI_countlist(&em->verts);
+ /*totvert = BLI_countlist(&em->verts);*/ /*UNUSED*/
+#ifdef DEBUG_REEB
totfaces = BLI_countlist(&em->faces);
+#endif
renormalizeWeight(em, 1.0f);
eve = em->verts.first;
minimum = weightData(eve);
maximum = minimum;
- for(eve = em->verts.first; eve; eve = eve->next)
+ for(; eve; eve = eve->next)
{
maximum = MAX2(maximum, weightData(eve));
minimum = MIN2(minimum, weightData(eve));
void ui_set_but_soft_range(uiBut *but, double value)
{
PropertyType type;
- double softmin, softmax, step, precision;
+ double softmin, softmax /*, step, precision*/;
if(but->rnaprop) {
type= RNA_property_type(but->rnaprop);
RNA_property_int_ui_range(&but->rnapoin, but->rnaprop, &imin, &imax, &istep);
softmin= (imin == INT_MIN)? -1e4: imin;
softmax= (imin == INT_MAX)? 1e4: imax;
- step= istep;
- precision= 1;
+ /*step= istep;*/ /*UNUSED*/
+ /*precision= 1;*/ /*UNUSED*/
}
else if(type == PROP_FLOAT) {
float fmin, fmax, fstep, fprecision;
RNA_property_float_ui_range(&but->rnapoin, but->rnaprop, &fmin, &fmax, &fstep, &fprecision);
softmin= (fmin == -FLT_MAX)? -1e4: fmin;
softmax= (fmax == FLT_MAX)? 1e4: fmax;
- step= fstep;
- precision= fprecision;
+ /*step= fstep;*/ /*UNUSED*/
+ /*precision= fprecision;*/ /*UNUSED*/
}
else
return;
int groups, cols, layers;
int group, col, layer, row;
int cols_per_group = 5;
- const char *desc;
-
+
prop= RNA_struct_find_property(ptr, propname);
if (!prop) {
printf("uiTemplateLayer: layers property not found: %s.%s\n", RNA_struct_identifier(ptr->type), propname);
return;
}
-
- desc= RNA_property_description(prop);
/* the number of layers determines the way we group them
* - we want 2 rows only (for now)
void MESH_OT_noise(wmOperatorType *ot)
{
- PropertyRNA *prop;
-
/* identifiers */
ot->name= "Noise";
ot->description= "Use vertex coordinate as texture coordinate";
/* flags */
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
- prop= RNA_def_float(ot->srna, "factor", 0.1f, -FLT_MAX, FLT_MAX, "Factor", "", 0.0f, 1.0f);
-
+ RNA_def_float(ot->srna, "factor", 0.1f, -FLT_MAX, FLT_MAX, "Factor", "", 0.0f, 1.0f);
}
void flipface(EditMesh *em, EditFace *efa)
CollectedEdge *curredge;
Collection *edgecollection;
- int totedges, groupcount, mergecount,vcount;
+ int totedges, mergecount,vcount /*, groupcount*/;
float avgcount[3];
allcollections.first = 0;
mergecount = 0;
build_edgecollection(em, &allcollections);
- groupcount = BLI_countlist(&allcollections);
+ /*groupcount = BLI_countlist(&allcollections);*/ /*UNUSED*/
for(edgecollection = allcollections.first; edgecollection; edgecollection = edgecollection->next){
kmi= WM_keymap_add_item(keymap, "MESH_OT_loop_select", SELECTMOUSE, KM_PRESS, KM_SHIFT|KM_ALT, 0);
RNA_boolean_set(kmi->ptr, "extend", 1);
- kmi= WM_keymap_add_item(keymap, "MESH_OT_edgering_select", SELECTMOUSE, KM_PRESS, KM_ALT|KM_CTRL, 0);
+ WM_keymap_add_item(keymap, "MESH_OT_edgering_select", SELECTMOUSE, KM_PRESS, KM_ALT|KM_CTRL, 0);
kmi= WM_keymap_add_item(keymap, "MESH_OT_edgering_select", SELECTMOUSE, KM_PRESS, KM_SHIFT|KM_ALT|KM_CTRL, 0);
RNA_boolean_set(kmi->ptr, "extend", 1);
Object *ob= CTX_data_active_object(C);
Material **matar, *ma;
Mesh *me;
- MVert *mvert, *mv, *mvertmain;
- MEdge *medge = NULL, *medgemain;
- MFace *mface = NULL, *mfacemain;
+ MVert *mvert, *mv;
+ MEdge *medge = NULL;
+ MFace *mface = NULL;
Key *key, *nkey=NULL;
KeyBlock *kb, *okb, *kbn;
float imat[4][4], cmat[4][4], *fp1, *fp2, curpos;
mvert= CustomData_add_layer(&vdata, CD_MVERT, CD_CALLOC, NULL, totvert);
medge= CustomData_add_layer(&edata, CD_MEDGE, CD_CALLOC, NULL, totedge);
mface= CustomData_add_layer(&fdata, CD_MFACE, CD_CALLOC, NULL, totface);
-
- mvertmain= mvert;
- medgemain= medge;
- mfacemain= mface;
-
+
vertofs= 0;
edgeofs= 0;
faceofs= 0;
return OPERATOR_CANCELLED;
ob= ED_object_add_type(C, OB_LAMP, loc, rot, FALSE, layer);
- if(ob && ob->data)
- ((Lamp*)ob->data)->type= type;
-
+ ((Lamp*)ob->data)->type= type;
rename_id((ID *)ob, get_lamp_defname(type));
rename_id((ID *)ob->data, get_lamp_defname(type));
{
DerivedMesh *dm=psys_get_modifier(ob,psys)->dm;
PTCacheEdit *edit= psys->edit;
- MFace *mface;
- MVert *mvert;
float *vec, *nor;
- int i, totface, totvert;
+ int i, totface /*, totvert*/;
if(!dm)
return;
BLI_kdtree_free(edit->emitter_field);
totface=dm->getNumFaces(dm);
- totvert=dm->getNumVerts(dm);
+ /*totvert=dm->getNumVerts(dm);*/ /*UNSUED*/
edit->emitter_cosnos=MEM_callocN(totface*6*sizeof(float),"emitter cosnos");
vec=edit->emitter_cosnos;
nor=vec+3;
- mvert=dm->getVertDataArray(dm,CD_MVERT);
for(i=0; i<totface; i++, vec+=6, nor+=6) {
- mface=dm->getFaceData(dm,i,CD_MFACE);
+ MFace *mface=dm->getFaceData(dm,i,CD_MFACE);
+ MVert *mvert;
mvert=dm->getVertData(dm,mface->v1,CD_MVERT);
VECCOPY(vec,mvert->co);
POINT_P;
PTCacheEditPoint *npoint=0, *new_points=0;
ParticleSystemModifierData *psmd;
- int i, totpart, new_totpart= psys->totpart, removed= 0;
+ int i, new_totpart= psys->totpart, removed= 0;
if(mirror) {
/* mirror tags */
psmd= psys_get_modifier(ob, psys);
- totpart= psys->totpart;
LOOP_TAGGED_POINTS {
PE_mirror_particle(ob, psmd->dm, psys, psys->particles + p, NULL);
*/
if(view_context) {
- int is_ortho;
GPU_offscreen_bind(oglrender->ofs); /* bind */
/* render 3d view */
if(rv3d->persp==RV3D_CAMOB && v3d->camera) {
+ /*int is_ortho= scene->r.mode & R_ORTHO;*/
RE_GetCameraWindow(oglrender->re, v3d->camera, scene->r.cfra, winmat);
- is_ortho= scene->r.mode & R_ORTHO;
}
else {
rctf viewplane;
float clipsta, clipend;
-
- is_ortho= get_view3d_viewplane(v3d, rv3d, sizex, sizey, &viewplane, &clipsta, &clipend, NULL);
+
+ int is_ortho= get_view3d_viewplane(v3d, rv3d, sizex, sizey, &viewplane, &clipsta, &clipend, NULL);
if(is_ortho) orthographic_m4(winmat, viewplane.xmin, viewplane.xmax, viewplane.ymin, viewplane.ymax, -clipend, clipend);
else perspective_m4(winmat, viewplane.xmin, viewplane.xmax, viewplane.ymin, viewplane.ymax, clipsta, clipend);
}
ibuf = IMB_allocImBuf(dx, dx, 24, IB_rectfloat);
IMB_rectcpy(ibuf, env->cube[1], 0, 0, 0, 0, dx, dx);
}
+ else {
+ BKE_report(op->reports, RPT_ERROR, "Invalid environment map type");
+ return OPERATOR_CANCELLED;
+ }
if (scene->r.color_mgt_flag & R_COLOR_MANAGEMENT)
ibuf->profile = IB_PROFILE_LINEAR_RGB;
float file_font_pointsize()
{
+#if 0
float s;
char tmp[2] = "X";
uiStyle *style= U.uistyles.first;
uiStyleFontSet(&style->widget);
s = BLF_height(style->widget.uifont_id, tmp);
return style->widget.points;
+#else
+ uiStyle *style= U.uistyles.first;
+ uiStyleFontSet(&style->widget);
+ return style->widget.points;
+#endif
}
static void column_widths(struct FileList* files, struct FileLayout* layout)
RNA_boolean_set(WM_keymap_add_item(keymap, "GRAPH_OT_select_all_toggle", IKEY, KM_PRESS, KM_CTRL, 0)->ptr, "invert", 1);
/* borderselect */
- kmi = WM_keymap_add_item(keymap, "GRAPH_OT_select_border", BKEY, KM_PRESS, 0, 0);
+ WM_keymap_add_item(keymap, "GRAPH_OT_select_border", BKEY, KM_PRESS, 0, 0);
kmi = WM_keymap_add_item(keymap, "GRAPH_OT_select_border", BKEY, KM_PRESS, KM_ALT, 0);
RNA_boolean_set(kmi->ptr, "axis_range", 1);
{
SpaceImage *sima;
ARegion *ar;
- Object *obedit;
float aspx, aspy, zoomx, zoomy, w, h;
int width, height;
/* retrieve state */
sima= CTX_wm_space_image(C);
ar= CTX_wm_region(C);
- obedit= CTX_data_edit_object(C);
ED_space_image_size(sima, &width, &height);
ED_space_image_aspect(sima, &aspx, &aspy);
uiDefButBitS(block, TOG, BUTS_CONT_LINK, B_REDR, "Link", xco+110+2*(width-100)/3, yco+35, (width-100)/3, UI_UNIT_Y, &slogic->scaflag, 0, 0, 0, 0, "Show linked Objects to Sensor/Actuator");
uiBlockEndAlign(block);
- ob= CTX_data_active_object(C);
-
for(a=0; a<count; a++) {
unsigned int controller_state_mask = 0; /* store a bitmask for states that are used */
static int nlachannels_mouseclick_invoke(bContext *C, wmOperator *op, wmEvent *event)
{
bAnimContext ac;
- Scene *scene;
ARegion *ar;
View2D *v2d;
int mval[2], channel_index;
return OPERATOR_CANCELLED;
/* get useful pointers from animation context data */
- scene= ac.scene;
ar= ac.ar;
v2d= &ar->v2d;
/* smat, imat = mat & imat to draw screenaligned */
static void draw_sphere_bone_wire(float smat[][4], float imat[][4], int armflag, int boneflag, int constflag, unsigned int id, bPoseChannel *pchan, EditBone *ebone)
{
- float head, tail, length;
+ float head, tail /*, length*/;
float *headvec, *tailvec, dirvec[3];
/* figure out the sizes of spheres */
/* this routine doesn't call get_matrix_editbone() that calculates it */
ebone->length = len_v3v3(ebone->head, ebone->tail);
- length= ebone->length;
+ /*length= ebone->length;*/ /*UNUSED*/
tail= ebone->rad_tail;
if (ebone->parent && (boneflag & BONE_CONNECTED))
head= ebone->parent->rad_tail;
tailvec= ebone->tail;
}
else {
- length= pchan->bone->length;
+ /*length= pchan->bone->length;*/ /*UNUSED*/
tail= pchan->bone->rad_tail;
if ((pchan->parent) && (boneflag & BONE_CONNECTED))
head= pchan->parent->bone->rad_tail;
if (flags & P_CONSTRAINT)
{
- prop= RNA_def_boolean_vector(ot->srna, "constraint_axis", 3, NULL, "Constraint Axis", "");
+ RNA_def_boolean_vector(ot->srna, "constraint_axis", 3, NULL, "Constraint Axis", "");
prop= RNA_def_property(ot->srna, "constraint_orientation", PROP_ENUM, PROP_NONE);
RNA_def_property_ui_text(prop, "Orientation", "Transformation orientation");
RNA_def_enum_funcs(prop, rna_TransformOrientation_itemf);
}
// Add confirm method all the time. At the end because it's not really that important and should be hidden only in log, not in keymap edit
- prop = RNA_def_boolean(ot->srna, "release_confirm", 0, "Confirm on Release", "Always confirm operation when releasing button");
+ /*prop =*/ RNA_def_boolean(ot->srna, "release_confirm", 0, "Confirm on Release", "Always confirm operation when releasing button");
//RNA_def_property_flag(prop, PROP_HIDDEN);
}
Object *ob = base->object;
retval |= snapObject(scene, ar, ob, 0, ob->obmat, ray_start, ray_normal, mval, loc, no, dist, &depth);
}
-
- base= FIRSTBASE;
+
for ( base = FIRSTBASE; base != NULL; base = base->next ) {
if ( BASE_VISIBLE(v3d, base) && (base->flag & (BA_HAS_RECALC_OB|BA_HAS_RECALC_DATA)) == 0 && ((mode == SNAP_NOT_SELECTED && (base->flag & (SELECT|BA_WAS_SEL)) == 0) || (ELEM(mode, SNAP_ALL, SNAP_NOT_OBEDIT) && base != BASACT)) ) {
Object *ob = base->object;
static int stitch_exec(bContext *C, wmOperator *op)
{
- SpaceImage *sima;
Scene *scene;
Object *obedit;
EditMesh *em;
EditVert *eve;
Image *ima;
MTFace *tf;
-
- sima= CTX_wm_space_image(C);
+
scene= CTX_data_scene(C);
obedit= CTX_data_edit_object(C);
em= BKE_mesh_get_editmesh((Mesh*)obedit->data);
void GPU_create_smoke(SmokeModifierData *smd, int highres)
{
- if(smd->type & MOD_SMOKE_TYPE_DOMAIN && smd->domain && !smd->domain->tex && !highres)
+ if(smd->type & MOD_SMOKE_TYPE_DOMAIN && !smd->domain->tex && !highres)
smd->domain->tex = GPU_texture_create_3D(smd->domain->res[0], smd->domain->res[1], smd->domain->res[2], smoke_get_density(smd->domain->fluid));
- else if(smd->type & MOD_SMOKE_TYPE_DOMAIN && smd->domain && !smd->domain->tex && highres)
+ else if(smd->type & MOD_SMOKE_TYPE_DOMAIN && !smd->domain->tex && highres)
smd->domain->tex = GPU_texture_create_3D(smd->domain->res_wt[0], smd->domain->res_wt[1], smd->domain->res_wt[2], smoke_turbulence_get_density(smd->domain->wt));
smd->domain->tex_shadow = GPU_texture_create_3D(smd->domain->res[0], smd->domain->res[1], smd->domain->res[2], smd->domain->shadow);
if (samplesperpixel == 4) {
to16[to_i+3] = FTOUSHORT(fromf[from_i+3]);
- to_i++; from_i++;
+ /*to_i++; from_i++;*/ /*unused, set on each loop */
}
}
else {
func = RNA_def_function(srna, "new", "rna_NlaTrack_new");
RNA_def_function_flag(func, FUNC_USE_CONTEXT);
RNA_def_function_ui_description(func, "Add a new NLA Tracks");
- parm = RNA_def_pointer(func, "prev", "NlaTrack", "", "NLA Track to add the new one after.");
+ RNA_def_pointer(func, "prev", "NlaTrack", "", "NLA Track to add the new one after.");
/* return type */
parm = RNA_def_pointer(func, "track", "NlaTrack", "", "New NLA Track.");
RNA_def_function_return(func, parm);
func= RNA_def_function(srna, "add", "rna_Curve_spline_bezpoints_add");
RNA_def_function_ui_description(func, "Add a number of points to this spline.");
RNA_def_function_flag(func, FUNC_USE_SELF_ID|FUNC_USE_REPORTS);
- parm= RNA_def_int(func, "number", 1, INT_MIN, INT_MAX, "Number", "Number of points to add to the spline", 0, INT_MAX);
+ RNA_def_int(func, "number", 1, INT_MIN, INT_MAX, "Number", "Number of points to add to the spline", 0, INT_MAX);
/*
func= RNA_def_function(srna, "remove", "rna_Curve_spline_remove");
parm= RNA_def_pointer(func, "keyframe", "Keyframe", "", "Keyframe to remove.");
RNA_def_property_flag(parm, PROP_REQUIRED|PROP_NEVER_NULL);
/* optional */
- parm= RNA_def_boolean(func, "fast", 0, "Fast", "Fast keyframe removal to avoid recalculating the curve each time");
+ RNA_def_boolean(func, "fast", 0, "Fast", "Fast keyframe removal to avoid recalculating the curve each time");
}
static void rna_def_fcurve(BlenderRNA *brna)
// PropertyRNA *prop;
FunctionRNA *func;
- PropertyRNA *parm;
+// PropertyRNA *parm;
RNA_def_property_srna(cprop, "MeshVertices");
srna= RNA_def_struct(brna, "MeshVertices", NULL);
func= RNA_def_function(srna, "add", "ED_mesh_vertices_add");
RNA_def_function_flag(func, FUNC_USE_REPORTS);
- parm= RNA_def_int(func, "count", 0, 0, INT_MAX, "Count", "Number of vertices to add.", 0, INT_MAX);
+ RNA_def_int(func, "count", 0, 0, INT_MAX, "Count", "Number of vertices to add.", 0, INT_MAX);
}
/* mesh.edges */
PropertyRNA *prop;
FunctionRNA *func;
- PropertyRNA *parm;
+ /*PropertyRNA *parm;*/
RNA_def_property_srna(cprop, "MeshFaces");
srna= RNA_def_struct(brna, "MeshFaces", NULL);
func= RNA_def_function(srna, "add", "ED_mesh_faces_add");
RNA_def_function_flag(func, FUNC_USE_REPORTS);
- parm= RNA_def_int(func, "count", 0, 0, INT_MAX, "Count", "Number of vertices to add.", 0, INT_MAX);
+ RNA_def_int(func, "count", 0, 0, INT_MAX, "Count", "Number of vertices to add.", 0, INT_MAX);
}
/* mesh.vertex_colors */
func= RNA_def_function(srna, "new", "rna_MetaBall_elements_new");
RNA_def_function_ui_description(func, "Add a new spline to the curve.");
- parm= RNA_def_enum(func, "type", metaelem_type_items, MB_BALL, "", "type for the new meta element.");
+ RNA_def_enum(func, "type", metaelem_type_items, MB_BALL, "", "type for the new meta element.");
parm= RNA_def_pointer(func, "element", "MetaElement", "", "The newly created metaelement.");
RNA_def_function_return(func, parm);
RNA_def_function_flag(func, FUNC_USE_CONTEXT|FUNC_USE_REPORTS);
parm= RNA_def_enum(func, "type", compositor_node_type_items, 0, "Type", "Type of node to add");
RNA_def_property_flag(parm, PROP_REQUIRED);
- parm= RNA_def_pointer(func, "group", "NodeTree", "", "The group tree");
+ RNA_def_pointer(func, "group", "NodeTree", "", "The group tree");
/* return value */
parm= RNA_def_pointer(func, "node", "Node", "", "New node.");
RNA_def_function_return(func, parm);
RNA_def_function_flag(func, FUNC_USE_CONTEXT|FUNC_USE_REPORTS);
parm= RNA_def_enum(func, "type", shader_node_type_items, 0, "Type", "Type of node to add");
RNA_def_property_flag(parm, PROP_REQUIRED);
- parm= RNA_def_pointer(func, "group", "NodeTree", "", "The group tree");
+ RNA_def_pointer(func, "group", "NodeTree", "", "The group tree");
/* return value */
parm= RNA_def_pointer(func, "node", "Node", "", "New node.");
RNA_def_function_return(func, parm);
RNA_def_function_flag(func, FUNC_USE_CONTEXT|FUNC_USE_REPORTS);
parm= RNA_def_enum(func, "type", texture_node_type_items, 0, "Type", "Type of node to add");
RNA_def_property_flag(parm, PROP_REQUIRED);
- parm= RNA_def_pointer(func, "group", "NodeTree", "", "The group tree");
+ RNA_def_pointer(func, "group", "NodeTree", "", "The group tree");
/* return value */
parm= RNA_def_pointer(func, "node", "Node", "", "New node.");
RNA_def_function_return(func, parm);
/* vertex groups */ // add_vertex_group
func= RNA_def_function(srna, "new", "rna_Object_vgroup_new");
RNA_def_function_ui_description(func, "Add vertex group to object.");
- parm= RNA_def_string(func, "name", "Group", 0, "", "Vertex group name."); /* optional */
+ RNA_def_string(func, "name", "Group", 0, "", "Vertex group name."); /* optional */
parm= RNA_def_pointer(func, "group", "VertexGroup", "", "New vertex group.");
RNA_def_function_return(func, parm);
StructRNA *srna;
PropertyRNA *prop;
FunctionRNA *func;
- PropertyRNA *parm;
srna= RNA_def_struct(brna, "Area", NULL);
RNA_def_struct_ui_text(srna, "Area", "Area in a subdivided screen, containing an editor");
func= RNA_def_function(srna, "header_text_set", "ED_area_headerprint");
RNA_def_function_ui_description(func, "Set the header text");
- parm= RNA_def_string(func, "text", NULL, 0, "Text", "New string for the header, no argument clears the text.");
+ RNA_def_string(func, "text", NULL, 0, "Text", "New string for the header, no argument clears the text.");
}
static void rna_def_region(BlenderRNA *brna)
RNA_def_boolean(func, "align", 0, "", "Align buttons to each other.");
func= RNA_def_function(srna, "column_flow", "uiLayoutColumnFlow");
- parm= RNA_def_int(func, "columns", 0, 0, INT_MAX, "", "Number of columns, 0 is automatic.", 0, INT_MAX);
+ RNA_def_int(func, "columns", 0, 0, INT_MAX, "", "Number of columns, 0 is automatic.", 0, INT_MAX);
parm= RNA_def_pointer(func, "layout", "UILayout", "", "Sub-layout to put items in.");
RNA_def_function_return(func, parm);
RNA_def_boolean(func, "align", 0, "", "Align buttons to each other.");
RNA_def_function_ui_description(func, "Item. A preview window for materials, textures, lamps, etc.");
parm= RNA_def_pointer(func, "id", "ID", "", "ID datablock.");
RNA_def_property_flag(parm, PROP_REQUIRED);
- parm= RNA_def_boolean(func, "show_buttons", 1, "", "Show preview buttons?");
+ RNA_def_boolean(func, "show_buttons", 1, "", "Show preview buttons?");
RNA_def_pointer(func, "parent", "ID", "", "ID datablock.");
RNA_def_pointer(func, "slot", "TextureSlot", "", "Texture slot.");
static int py_to_array(PyObject *py, PointerRNA *ptr, PropertyRNA *prop, char *param_data, ItemTypeCheckFunc check_item_type, const char *item_type_str, int item_size, ItemConvertFunc convert_item, RNA_SetArrayFunc rna_set_array, const char *error_prefix)
{
- int totdim, dim_size[MAX_ARRAY_DIMENSION];
+ /*int totdim, dim_size[MAX_ARRAY_DIMENSION];*/
int totitem;
char *data= NULL;
- totdim= RNA_property_array_dimension(ptr, prop, dim_size);
+ /*totdim= RNA_property_array_dimension(ptr, prop, dim_size);*/ /*UNUSED*/
if (!validate_array(py, ptr, prop, 0, check_item_type, item_type_str, &totitem, error_prefix)) {
return 0;
ARegion *ar= CTX_wm_region(C);
ScrArea *sa= CTX_wm_area(C);
- if(ar && ar->regiontype == RGN_TYPE_WINDOW && BLI_in_rcti(&ar->winrct, event->x, event->y)) {
+ if(ar && ar->regiontype == RGN_TYPE_WINDOW && event && BLI_in_rcti(&ar->winrct, event->x, event->y)) {
winrect= &ar->winrct;
}
else if(sa) {