本文整理汇总了C++中rna_pointer_inherit_refine函数的典型用法代码示例。如果您正苦于以下问题:C++ rna_pointer_inherit_refine函数的具体用法?C++ rna_pointer_inherit_refine怎么用?C++ rna_pointer_inherit_refine使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了rna_pointer_inherit_refine函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: rna_BoidSettings_active_boid_state_get
static PointerRNA rna_BoidSettings_active_boid_state_get(PointerRNA *ptr)
{
BoidSettings *boids = (BoidSettings *)ptr->data;
BoidState *state = (BoidState *)boids->states.first;
for (; state; state = state->next) {
if (state->flag & BOIDSTATE_CURRENT)
return rna_pointer_inherit_refine(ptr, &RNA_BoidState, state);
}
return rna_pointer_inherit_refine(ptr, &RNA_BoidState, NULL);
}
示例2: rna_BoidState_active_boid_rule_get
static PointerRNA rna_BoidState_active_boid_rule_get(PointerRNA *ptr)
{
BoidState *state = (BoidState *)ptr->data;
BoidRule *rule = (BoidRule *)state->rules.first;
for (; rule; rule = rule->next) {
if (rule->flag & BOIDRULE_CURRENT)
return rna_pointer_inherit_refine(ptr, &RNA_BoidRule, rule);
}
return rna_pointer_inherit_refine(ptr, &RNA_BoidRule, NULL);
}
示例3: rna_RenderEngine_camera_override_get
static PointerRNA rna_RenderEngine_camera_override_get(PointerRNA *ptr)
{
RenderEngine *engine = (RenderEngine *)ptr->data;
if (engine->re) {
Object *cam = RE_GetCamera(engine->re);
return rna_pointer_inherit_refine(ptr, &RNA_Object, cam);
}
else {
return rna_pointer_inherit_refine(ptr, &RNA_Object, engine->camera_override);
}
}
示例4: rna_Curve_active_nurb_get
static PointerRNA rna_Curve_active_nurb_get(PointerRNA *ptr)
{
Curve *cu= (Curve*)ptr->data;
Nurb *nu= NULL;
if(cu->editnurb)
nu = BLI_findlink(cu->editnurb, cu->actnu);
if(nu)
return rna_pointer_inherit_refine(ptr, &RNA_Nurb, nu);
return rna_pointer_inherit_refine(ptr, NULL, NULL);
}
示例5: rna_RenderEngine_render_get
static PointerRNA rna_RenderEngine_render_get(PointerRNA *ptr)
{
RenderEngine *engine = (RenderEngine *)ptr->data;
if (engine->re) {
RenderData *r = RE_engine_get_render_data(engine->re);
return rna_pointer_inherit_refine(ptr, &RNA_RenderSettings, r);
}
else {
return rna_pointer_inherit_refine(ptr, &RNA_RenderSettings, NULL);
}
}
示例6: rna_PaintSurface_active_get
static PointerRNA rna_PaintSurface_active_get(PointerRNA *ptr)
{
DynamicPaintCanvasSettings *canvas = (DynamicPaintCanvasSettings *)ptr->data;
DynamicPaintSurface *surface = canvas->surfaces.first;
int id = 0;
for (; surface; surface = surface->next) {
if (id == canvas->active_sur)
return rna_pointer_inherit_refine(ptr, &RNA_DynamicPaintSurface, surface);
id++;
}
return rna_pointer_inherit_refine(ptr, &RNA_DynamicPaintSurface, NULL);
}
示例7: rna_IDPreview_get
static PointerRNA rna_IDPreview_get(PointerRNA *ptr)
{
ID *id = (ID *)ptr->data;
PreviewImage *prv_img = BKE_previewimg_id_ensure(id);
return rna_pointer_inherit_refine(ptr, &RNA_ImagePreview, prv_img);
}
示例8: rna_render_slots_active_get
static PointerRNA rna_render_slots_active_get(PointerRNA *ptr)
{
Image *image = (Image *)ptr->id.data;
RenderSlot *render_slot = BKE_image_get_renderslot(image, image->render_slot);
return rna_pointer_inherit_refine(ptr, &RNA_RenderSlot, render_slot);
}
示例9: rna_Mask_layer_active_get
static PointerRNA rna_Mask_layer_active_get(PointerRNA *ptr)
{
Mask *mask = (Mask *)ptr->id.data;
MaskLayer *masklay = BKE_mask_layer_active(mask);
return rna_pointer_inherit_refine(ptr, &RNA_MaskLayer, masklay);
}
示例10: rna_Group_objects_get
static PointerRNA rna_Group_objects_get(CollectionPropertyIterator *iter)
{
ListBaseIterator *internal = iter->internal;
/* we are actually iterating a GroupObject list, so override get */
return rna_pointer_inherit_refine(&iter->parent, &RNA_Object, ((GroupObject *)internal->link)->ob);
}
示例11: rna_Lamp_active_texture_get
static PointerRNA rna_Lamp_active_texture_get(PointerRNA *ptr)
{
Lamp *la = (Lamp *)ptr->data;
Tex *tex;
tex = give_current_lamp_texture(la);
return rna_pointer_inherit_refine(ptr, &RNA_Texture, tex);
}
示例12: rna_World_active_texture_get
static PointerRNA rna_World_active_texture_get(PointerRNA *ptr)
{
World *wo= (World*)ptr->data;
Tex *tex;
tex= give_current_world_texture(wo);
return rna_pointer_inherit_refine(ptr, &RNA_Texture, tex);
}
示例13: rna_ViewLayer_objects_get
static PointerRNA rna_ViewLayer_objects_get(CollectionPropertyIterator *iter)
{
ListBaseIterator *internal = &iter->internal.listbase;
/* we are actually iterating a ObjectBase list */
Base *base = (Base *)internal->link;
return rna_pointer_inherit_refine(&iter->parent, &RNA_Object, base->object);
}
示例14: rna_ParticleEdit_brush_get
static PointerRNA rna_ParticleEdit_brush_get(PointerRNA *ptr)
{
ParticleEditSettings *pset = (ParticleEditSettings *)ptr->data;
ParticleBrushData *brush = NULL;
if (pset->brushtype != PE_BRUSH_NONE)
brush = &pset->brush[pset->brushtype];
return rna_pointer_inherit_refine(ptr, &RNA_ParticleBrush, brush);
}
示例15: rna_GPencilSculptSettings_brush_get
static PointerRNA rna_GPencilSculptSettings_brush_get(PointerRNA *ptr)
{
GP_BrushEdit_Settings *gset = (GP_BrushEdit_Settings *)ptr->data;
GP_EditBrush_Data *brush = NULL;
if ((gset->brushtype >= 0) && (gset->brushtype < TOT_GP_EDITBRUSH_TYPES))
brush = &gset->brush[gset->brushtype];
return rna_pointer_inherit_refine(ptr, &RNA_GPencilSculptBrush, brush);
}