本文整理汇总了C++中RNA_def_property_pointer_funcs函数的典型用法代码示例。如果您正苦于以下问题:C++ RNA_def_property_pointer_funcs函数的具体用法?C++ RNA_def_property_pointer_funcs怎么用?C++ RNA_def_property_pointer_funcs使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了RNA_def_property_pointer_funcs函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: rna_def_render_slots
static void rna_def_render_slots(BlenderRNA *brna)
{
StructRNA *srna;
PropertyRNA *prop;
srna = RNA_def_struct(brna, "RenderSlots", NULL);
RNA_def_struct_sdna(srna, "RenderSlot");
RNA_def_struct_ui_text(srna, "Render Slots", "Collection of the render slots");
prop = RNA_def_property(srna, "active", PROP_POINTER, PROP_NONE);
RNA_def_property_struct_type(prop, "RenderSlot");
RNA_def_property_pointer_funcs(prop, "rna_render_slots_active_get", "rna_render_slots_active_set", NULL, NULL);
RNA_def_property_flag(prop, PROP_EDITABLE | PROP_NEVER_UNLINK);
RNA_def_property_ui_text(prop, "Active", "Active render slot of the image");
RNA_def_property_update(prop, NC_IMAGE | ND_DISPLAY, NULL);
prop = RNA_def_property(srna, "active_index", PROP_INT, PROP_NONE);
RNA_def_property_int_funcs(prop, "rna_render_slots_active_index_get",
"rna_render_slots_active_index_set",
NULL);
RNA_def_property_range(prop, 0, IMA_MAX_RENDER_SLOT);
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
RNA_def_property_ui_text(prop, "Active Index", "Index of an active render slot of the image");
RNA_def_property_update(prop, NC_IMAGE | ND_DISPLAY, NULL);
}
开发者ID:flair2005,项目名称:mechanical-blender,代码行数:25,代码来源:rna_image.c
示例2: rna_def_sun_lamp
static void rna_def_sun_lamp(BlenderRNA *brna)
{
StructRNA *srna;
PropertyRNA *prop;
srna = RNA_def_struct(brna, "SunLamp", "Lamp");
RNA_def_struct_sdna(srna, "Lamp");
RNA_def_struct_ui_text(srna, "Sun Lamp", "Constant direction parallel ray lamp");
RNA_def_struct_ui_icon(srna, ICON_LAMP_SUN);
rna_def_lamp_shadow(srna, 0, 0);
/* sky */
prop = RNA_def_property(srna, "sky", PROP_POINTER, PROP_NONE);
RNA_def_property_flag(prop, PROP_NEVER_NULL);
RNA_def_property_struct_type(prop, "LampSkySettings");
RNA_def_property_pointer_funcs(prop, "rna_Lamp_sky_settings_get", NULL, NULL, NULL);
RNA_def_property_ui_text(prop, "Sky Settings", "Sky related settings for sun lamps");
rna_def_lamp_sky_settings(brna);
/* BGE Only */
prop = RNA_def_property(srna, "shadow_frustum_size", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "shadow_frustum_size");
RNA_def_property_ui_range(prop, 0.001, 100.0, 2, 1);
RNA_def_property_ui_text(prop, "Frustum Size", "Size of the frustum used for creating the shadow map");
RNA_def_property_update(prop, 0, "rna_Lamp_draw_update");
prop = RNA_def_property(srna, "show_shadow_box", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mode", LA_SHOW_SHADOW_BOX);
RNA_def_property_ui_text(prop, "Show Shadow Box",
"Draw a box in 3D view to visualize which objects are contained in it");
RNA_def_property_update(prop, 0, "rna_Lamp_draw_update");
}
开发者ID:mgschwan,项目名称:blensor,代码行数:34,代码来源:rna_lamp.c
示例3: rna_def_gpencil_layers
static void rna_def_gpencil_layers(BlenderRNA *brna, PropertyRNA *cprop)
{
StructRNA *srna;
PropertyRNA *prop;
// FunctionRNA *func;
// PropertyRNA *parm;
RNA_def_property_srna(cprop, "GreasePencilLayers");
srna= RNA_def_struct(brna, "GreasePencilLayers", NULL);
RNA_def_struct_sdna(srna, "bGPdata");
RNA_def_struct_ui_text(srna, "Grease Pencil Layers", "Collection of grease pencil layers");
#if 0
func= RNA_def_function(srna, "new", "rna_GPencil_layer_new");
RNA_def_function_ui_description(func, "Add a new spline to the curve.");
parm= RNA_def_enum(func, "type", curve_type_items, CU_POLY, "", "type for the new spline.");
RNA_def_property_flag(parm, PROP_REQUIRED);
parm= RNA_def_pointer(func, "spline", "Spline", "", "The newly created spline.");
RNA_def_function_return(func, parm);
func= RNA_def_function(srna, "remove", "rna_GPencil_layer_remove");
RNA_def_function_ui_description(func, "Remove a spline from a curve.");
RNA_def_function_flag(func, FUNC_USE_REPORTS);
parm= RNA_def_pointer(func, "spline", "Spline", "", "The spline to remove.");
RNA_def_property_flag(parm, PROP_REQUIRED|PROP_NEVER_NULL);
#endif
prop= RNA_def_property(srna, "active", PROP_POINTER, PROP_NONE);
RNA_def_property_struct_type(prop, "GreasePencil");
RNA_def_property_pointer_funcs(prop, "rna_GPencil_active_layer_get", "rna_GPencil_active_layer_set", NULL, NULL);
RNA_def_property_flag(prop, PROP_EDITABLE);
RNA_def_property_ui_text(prop, "Active Layer", "Active grease pencil layer");
}
开发者ID:OldBrunet,项目名称:BGERTPS,代码行数:34,代码来源:rna_gpencil.c
示例4: rna_def_paint
static void rna_def_paint(BlenderRNA *brna)
{
StructRNA *srna;
PropertyRNA *prop;
srna = RNA_def_struct(brna, "Paint", NULL);
RNA_def_struct_ui_text(srna, "Paint", "");
/* Global Settings */
prop = RNA_def_property(srna, "brush", PROP_POINTER, PROP_NONE);
RNA_def_property_flag(prop, PROP_EDITABLE);
RNA_def_property_pointer_funcs(prop, NULL, NULL, NULL, "rna_Brush_mode_poll");
RNA_def_property_ui_text(prop, "Brush", "Active Brush");
RNA_def_property_update(prop, 0, "rna_Paint_brush_update");
prop = RNA_def_property(srna, "show_brush", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flags", PAINT_SHOW_BRUSH);
RNA_def_property_ui_text(prop, "Show Brush", "");
prop = RNA_def_property(srna, "show_brush_on_surface", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flags", PAINT_SHOW_BRUSH_ON_SURFACE);
RNA_def_property_ui_text(prop, "Show Brush On Surface", "");
prop = RNA_def_property(srna, "show_low_resolution", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flags", PAINT_FAST_NAVIGATE);
RNA_def_property_ui_text(prop, "Fast Navigate", "For multires, show low resolution while navigating the view");
prop = RNA_def_property(srna, "input_samples", PROP_INT, PROP_UNSIGNED);
RNA_def_property_int_sdna(prop, NULL, "num_input_samples");
RNA_def_property_ui_range(prop, 1, PAINT_MAX_INPUT_SAMPLES, 0, -1);
RNA_def_property_ui_text(prop, "Input Samples", "Average multiple input samples together to smooth the brush stroke");
}
开发者ID:244xiao,项目名称:blender,代码行数:32,代码来源:rna_sculpt_paint.c
示例5: rna_def_gpencil_layers_api
static void rna_def_gpencil_layers_api(BlenderRNA *brna, PropertyRNA *cprop)
{
StructRNA *srna;
PropertyRNA *prop;
FunctionRNA *func;
PropertyRNA *parm;
RNA_def_property_srna(cprop, "GreasePencilLayers");
srna = RNA_def_struct(brna, "GreasePencilLayers", NULL);
RNA_def_struct_sdna(srna, "bGPdata");
RNA_def_struct_ui_text(srna, "Grease Pencil Layers", "Collection of grease pencil layers");
func = RNA_def_function(srna, "new", "rna_GPencil_layer_new");
RNA_def_function_ui_description(func, "Add a new grease pencil layer");
parm = RNA_def_string(func, "name", "GPencilLayer", MAX_NAME, "Name", "Name of the layer");
RNA_def_property_flag(parm, PROP_REQUIRED);
RNA_def_boolean(func, "set_active", 0, "Set Active", "Set the newly created layer to the active layer");
parm = RNA_def_pointer(func, "layer", "GPencilLayer", "", "The newly created layer");
RNA_def_function_return(func, parm);
func = RNA_def_function(srna, "remove", "rna_GPencil_layer_remove");
RNA_def_function_ui_description(func, "Remove a grease pencil layer");
RNA_def_function_flag(func, FUNC_USE_REPORTS);
parm = RNA_def_pointer(func, "layer", "GPencilLayer", "", "The layer to remove");
RNA_def_property_flag(parm, PROP_REQUIRED | PROP_NEVER_NULL | PROP_RNAPTR);
RNA_def_property_clear_flag(parm, PROP_THICK_WRAP);
prop = RNA_def_property(srna, "active", PROP_POINTER, PROP_NONE);
RNA_def_property_struct_type(prop, "GreasePencil");
RNA_def_property_pointer_funcs(prop, "rna_GPencil_active_layer_get", "rna_GPencil_active_layer_set", NULL, NULL);
RNA_def_property_flag(prop, PROP_EDITABLE);
RNA_def_property_ui_text(prop, "Active Layer", "Active grease pencil layer");
}
开发者ID:244xiao,项目名称:blender,代码行数:34,代码来源:rna_gpencil.c
示例6: rna_def_render_slots
static void rna_def_render_slots(BlenderRNA *brna, PropertyRNA *cprop)
{
StructRNA *srna;
FunctionRNA *func;
PropertyRNA *prop, *parm;
RNA_def_property_srna(cprop, "RenderSlots");
srna = RNA_def_struct(brna, "RenderSlots", NULL);
RNA_def_struct_sdna(srna, "Image");
RNA_def_struct_ui_text(srna, "Render Layers", "Collection of render layers");
prop = RNA_def_property(srna, "active_index", PROP_INT, PROP_UNSIGNED);
RNA_def_property_int_sdna(prop, NULL, "render_slot");
RNA_def_property_int_funcs(prop,
"rna_render_slots_active_index_get",
"rna_render_slots_active_index_set",
"rna_render_slots_active_index_range");
RNA_def_property_ui_text(prop, "Active", "Active render slot of the image");
RNA_def_property_update(prop, NC_IMAGE | ND_DISPLAY, NULL);
prop = RNA_def_property(srna, "active", PROP_POINTER, PROP_NONE);
RNA_def_property_struct_type(prop, "RenderSlot");
RNA_def_property_pointer_funcs(
prop, "rna_render_slots_active_get", "rna_render_slots_active_set", NULL, NULL);
RNA_def_property_flag(prop, PROP_EDITABLE);
RNA_def_property_ui_text(prop, "Active", "Active render slot of the image");
RNA_def_property_update(prop, NC_IMAGE | ND_DISPLAY, NULL);
func = RNA_def_function(srna, "new", "BKE_image_add_renderslot");
RNA_def_function_ui_description(func, "Add a render slot to the image");
parm = RNA_def_string(func, "name", NULL, 0, "Name", "New name for the render slot");
parm = RNA_def_pointer(func, "result", "RenderSlot", "", "Newly created render layer");
RNA_def_function_return(func, parm);
}
开发者ID:dfelinto,项目名称:blender,代码行数:34,代码来源:rna_image.c
示例7: rna_def_keyingset
static void rna_def_keyingset(BlenderRNA *brna)
{
StructRNA *srna;
PropertyRNA *prop;
srna = RNA_def_struct(brna, "KeyingSet", NULL);
RNA_def_struct_ui_text(srna, "Keying Set", "Settings that should be keyframed together");
/* Id/Label */
prop = RNA_def_property(srna, "bl_idname", PROP_STRING, PROP_NONE);
RNA_def_property_string_sdna(prop, NULL, "idname");
RNA_def_property_flag(prop, PROP_REGISTER | PROP_NEVER_CLAMP);
RNA_def_property_ui_text(prop, "ID Name", KEYINGSET_IDNAME_DOC);
/* RNA_def_property_update(prop, NC_SCENE | ND_KEYINGSET | NA_RENAME, NULL); */ /* NOTE: disabled, as ID name shouldn't be editable */
prop = RNA_def_property(srna, "bl_label", PROP_STRING, PROP_NONE);
RNA_def_property_string_sdna(prop, NULL, "name");
RNA_def_property_string_funcs(prop, NULL, NULL, "rna_KeyingSet_name_set");
RNA_def_property_ui_text(prop, "UI Name", "");
RNA_def_struct_ui_icon(srna, ICON_KEYINGSET);
RNA_def_struct_name_property(srna, prop);
RNA_def_property_update(prop, NC_SCENE | ND_KEYINGSET | NA_RENAME, NULL);
prop = RNA_def_property(srna, "bl_description", PROP_STRING, PROP_NONE);
RNA_def_property_string_sdna(prop, NULL, "description");
RNA_def_property_string_maxlength(prop, RNA_DYN_DESCR_MAX); /* else it uses the pointer size! */
RNA_def_property_flag(prop, PROP_REGISTER_OPTIONAL);
RNA_def_property_ui_text(prop, "Description", "A short description of the keying set");
/* KeyingSetInfo (Type Info) for Builtin Sets only */
prop = RNA_def_property(srna, "type_info", PROP_POINTER, PROP_NONE);
RNA_def_property_struct_type(prop, "KeyingSetInfo");
RNA_def_property_pointer_funcs(prop, "rna_KeyingSet_typeinfo_get", NULL, NULL, NULL);
RNA_def_property_ui_text(prop, "Type Info", "Callback function defines for built-in Keying Sets");
/* Paths */
prop = RNA_def_property(srna, "paths", PROP_COLLECTION, PROP_NONE);
RNA_def_property_collection_sdna(prop, NULL, "paths", NULL);
RNA_def_property_struct_type(prop, "KeyingSetPath");
RNA_def_property_ui_text(prop, "Paths", "Keying Set Paths to define settings that get keyframed together");
rna_def_keyingset_paths(brna, prop);
/* Flags */
prop = RNA_def_property(srna, "is_path_absolute", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", KEYINGSET_ABSOLUTE);
RNA_def_property_ui_text(prop, "Absolute",
"Keying Set defines specific paths/settings to be keyframed "
"(i.e. is not reliant on context info)");
/* Keyframing Flags */
rna_def_common_keying_flags(srna, 0);
/* Keying Set API */
RNA_api_keyingset(srna);
}
开发者ID:244xiao,项目名称:blender,代码行数:57,代码来源:rna_animation.c
示例8: rna_def_paint
static void rna_def_paint(BlenderRNA *brna)
{
StructRNA *srna;
PropertyRNA *prop;
srna = RNA_def_struct(brna, "Paint", NULL);
RNA_def_struct_ui_text(srna, "Paint", "");
/* Global Settings */
prop = RNA_def_property(srna, "brush", PROP_POINTER, PROP_NONE);
RNA_def_property_flag(prop, PROP_EDITABLE);
RNA_def_property_pointer_funcs(prop, NULL, NULL, NULL, "rna_Brush_mode_poll");
RNA_def_property_ui_text(prop, "Brush", "Active Brush");
RNA_def_property_update(prop, 0, "rna_Paint_brush_update");
prop = RNA_def_property(srna, "show_brush", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flags", PAINT_SHOW_BRUSH);
RNA_def_property_ui_text(prop, "Show Brush", "");
RNA_def_property_update(prop, NC_SCENE | ND_TOOLSETTINGS, NULL);
prop = RNA_def_property(srna, "show_brush_on_surface", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flags", PAINT_SHOW_BRUSH_ON_SURFACE);
RNA_def_property_ui_text(prop, "Show Brush On Surface", "");
RNA_def_property_update(prop, NC_SCENE | ND_TOOLSETTINGS, NULL);
prop = RNA_def_property(srna, "show_low_resolution", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flags", PAINT_FAST_NAVIGATE);
RNA_def_property_ui_text(prop, "Fast Navigate", "For multires, show low resolution while navigating the view");
RNA_def_property_update(prop, NC_SCENE | ND_TOOLSETTINGS, NULL);
prop = RNA_def_property(srna, "input_samples", PROP_INT, PROP_UNSIGNED);
RNA_def_property_int_sdna(prop, NULL, "num_input_samples");
RNA_def_property_ui_range(prop, 1, PAINT_MAX_INPUT_SAMPLES, 0, -1);
RNA_def_property_ui_text(prop, "Input Samples", "Average multiple input samples together to smooth the brush stroke");
RNA_def_property_update(prop, NC_SCENE | ND_TOOLSETTINGS, NULL);
prop = RNA_def_property(srna, "use_symmetry_x", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "symmetry_flags", PAINT_SYMM_X);
RNA_def_property_ui_text(prop, "Symmetry X", "Mirror brush across the X axis");
RNA_def_property_update(prop, NC_SCENE | ND_TOOLSETTINGS, NULL);
prop = RNA_def_property(srna, "use_symmetry_y", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "symmetry_flags", PAINT_SYMM_Y);
RNA_def_property_ui_text(prop, "Symmetry Y", "Mirror brush across the Y axis");
RNA_def_property_update(prop, NC_SCENE | ND_TOOLSETTINGS, NULL);
prop = RNA_def_property(srna, "use_symmetry_z", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "symmetry_flags", PAINT_SYMM_Z);
RNA_def_property_ui_text(prop, "Symmetry Z", "Mirror brush across the Z axis");
RNA_def_property_update(prop, NC_SCENE | ND_TOOLSETTINGS, NULL);
prop = RNA_def_property(srna, "use_symmetry_feather", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "symmetry_flags", PAINT_SYMMETRY_FEATHER);
RNA_def_property_ui_text(prop, "Symmetry Feathering",
"Reduce the strength of the brush where it overlaps symmetrical daubs");
RNA_def_property_update(prop, NC_SCENE | ND_TOOLSETTINGS, NULL);
}
开发者ID:YasirArafath,项目名称:blender-git,代码行数:57,代码来源:rna_sculpt_paint.c
示例9: rna_def_maskParent
static void rna_def_maskParent(BlenderRNA *brna)
{
StructRNA *srna;
PropertyRNA *prop;
static EnumPropertyItem mask_id_type_items[] = {
{ID_MC, "MOVIECLIP", ICON_SEQUENCE, "Movie Clip", ""},
{0, NULL, 0, NULL, NULL}};
static EnumPropertyItem parent_type_items[] = {
{MASK_PARENT_POINT_TRACK, "POINT_TRACK", 0, "Point Track", ""},
{MASK_PARENT_PLANE_TRACK, "PLANE_TRACK", 0, "Plane Track", ""},
{0, NULL, 0, NULL, NULL}};
srna = RNA_def_struct(brna, "MaskParent", NULL);
RNA_def_struct_ui_text(srna, "Mask Parent", "Parenting settings for masking element");
/* Target Properties - ID-block to Drive */
prop = RNA_def_property(srna, "id", PROP_POINTER, PROP_NONE);
RNA_def_property_struct_type(prop, "ID");
RNA_def_property_flag(prop, PROP_EDITABLE);
// RNA_def_property_editable_func(prop, "rna_maskSpline_id_editable");
/* note: custom set function is ONLY to avoid rna setting a user for this. */
RNA_def_property_pointer_funcs(prop, NULL, "rna_MaskParent_id_set", "rna_MaskParent_id_typef", NULL);
RNA_def_property_ui_text(prop, "ID", "ID-block to which masking element would be parented to or to it's property");
RNA_def_property_update(prop, 0, "rna_Mask_update_parent");
prop = RNA_def_property(srna, "id_type", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "id_type");
RNA_def_property_enum_items(prop, mask_id_type_items);
RNA_def_property_enum_default(prop, ID_MC);
RNA_def_property_enum_funcs(prop, NULL, "rna_MaskParent_id_type_set", NULL);
//RNA_def_property_editable_func(prop, "rna_MaskParent_id_type_editable");
RNA_def_property_ui_text(prop, "ID Type", "Type of ID-block that can be used");
RNA_def_property_update(prop, 0, "rna_Mask_update_parent");
/* type */
prop = RNA_def_property(srna, "type", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_items(prop, parent_type_items);
RNA_def_property_ui_text(prop, "Parent Type", "Parent Type");
RNA_def_property_update(prop, 0, "rna_Mask_update_parent");
/* parent */
prop = RNA_def_property(srna, "parent", PROP_STRING, PROP_NONE);
RNA_def_property_ui_text(prop, "Parent", "Name of parent object in specified data block to which parenting happens");
RNA_def_property_string_maxlength(prop, MAX_ID_NAME - 2);
RNA_def_property_update(prop, 0, "rna_Mask_update_parent");
/* sub_parent */
prop = RNA_def_property(srna, "sub_parent", PROP_STRING, PROP_NONE);
RNA_def_property_ui_text(prop, "Sub Parent", "Name of parent sub-object in specified data block to which parenting happens");
RNA_def_property_string_maxlength(prop, MAX_ID_NAME - 2);
RNA_def_property_update(prop, 0, "rna_Mask_update_parent");
}
开发者ID:ilent2,项目名称:Blender-Billboard-Modifier,代码行数:54,代码来源:rna_mask.c
示例10: rna_def_mask_splines
static void rna_def_mask_splines(BlenderRNA *brna)
{
StructRNA *srna;
FunctionRNA *func;
PropertyRNA *prop;
PropertyRNA *parm;
srna = RNA_def_struct(brna, "MaskSplines", NULL);
RNA_def_struct_sdna(srna, "MaskLayer");
RNA_def_struct_ui_text(srna, "Mask Splines", "Collection of masking splines");
/* Create new spline */
func = RNA_def_function(srna, "new", "rna_MaskLayer_spline_new");
RNA_def_function_flag(func, FUNC_USE_SELF_ID);
RNA_def_function_ui_description(func, "Add a new spline to the layer");
parm = RNA_def_pointer(func, "spline", "MaskSpline", "", "The newly created spline");
RNA_def_function_return(func, parm);
/* Remove the spline */
func = RNA_def_function(srna, "remove", "rna_MaskLayer_spline_remove");
RNA_def_function_flag(func, FUNC_USE_SELF_ID);
RNA_def_function_ui_description(func, "Remove a spline from a layer");
RNA_def_function_flag(func, FUNC_USE_REPORTS);
parm = RNA_def_pointer(func, "spline", "MaskSpline", "", "The spline to remove");
RNA_def_property_flag(parm, PROP_REQUIRED | PROP_NEVER_NULL | PROP_RNAPTR);
RNA_def_property_clear_flag(parm, PROP_THICK_WRAP);
/* active spline */
prop = RNA_def_property(srna, "active", PROP_POINTER, PROP_NONE);
RNA_def_property_struct_type(prop, "MaskSpline");
RNA_def_property_pointer_funcs(prop, "rna_MaskLayer_active_spline_get", "rna_MaskLayer_active_spline_set", NULL, NULL);
RNA_def_property_flag(prop, PROP_EDITABLE | PROP_NEVER_UNLINK);
RNA_def_property_ui_text(prop, "Active Spline", "Active spline of masking layer");
/* active point */
prop = RNA_def_property(srna, "active_point", PROP_POINTER, PROP_NONE);
RNA_def_property_struct_type(prop, "MaskSplinePoint");
RNA_def_property_pointer_funcs(prop, "rna_MaskLayer_active_spline_point_get", "rna_MaskLayer_active_spline_point_set", NULL, NULL);
RNA_def_property_flag(prop, PROP_EDITABLE | PROP_NEVER_UNLINK);
RNA_def_property_ui_text(prop, "Active Spline", "Active spline of masking layer");
}
开发者ID:ilent2,项目名称:Blender-Billboard-Modifier,代码行数:41,代码来源:rna_mask.c
示例11: rna_def_animviz
static void rna_def_animviz(BlenderRNA *brna)
{
StructRNA *srna;
PropertyRNA *prop;
srna= RNA_def_struct(brna, "AnimViz", NULL);
RNA_def_struct_sdna(srna, "bAnimVizSettings");
RNA_def_struct_ui_text(srna, "Animation Visualisation", "Settings for the visualisation of motion");
/* onion-skinning settings (nested struct) */
prop= RNA_def_property(srna, "onion_skin_frames", PROP_POINTER, PROP_NONE);
RNA_def_property_flag(prop, PROP_NEVER_NULL);
RNA_def_property_struct_type(prop, "AnimVizOnionSkinning");
RNA_def_property_pointer_funcs(prop, "rna_AnimViz_onion_skinning_get", NULL, NULL, NULL);
RNA_def_property_ui_text(prop, "Onion Skinning", "Onion Skinning (ghosting) settings for visualisation");
/* motion path settings (nested struct) */
prop= RNA_def_property(srna, "motion_path", PROP_POINTER, PROP_NONE);
RNA_def_property_flag(prop, PROP_NEVER_NULL);
RNA_def_property_struct_type(prop, "AnimVizMotionPaths");
RNA_def_property_pointer_funcs(prop, "rna_AnimViz_motion_paths_get", NULL, NULL, NULL);
RNA_def_property_ui_text(prop, "Motion Paths", "Motion Path settings for visualisation");
}
开发者ID:mik0001,项目名称:Blender,代码行数:23,代码来源:rna_animviz.c
示例12: rna_def_boidstate
static void rna_def_boidstate(BlenderRNA *brna)
{
StructRNA *srna;
PropertyRNA *prop;
srna = RNA_def_struct(brna, "BoidState", NULL);
RNA_def_struct_ui_text(srna, "Boid State", "Boid state for boid physics");
prop = RNA_def_property(srna, "name", PROP_STRING, PROP_NONE);
RNA_def_property_ui_text(prop, "Name", "Boid state name");
RNA_def_struct_name_property(srna, prop);
prop = RNA_def_property(srna, "ruleset_type", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_items(prop, boidruleset_type_items);
RNA_def_property_ui_text(prop, "Rule Evaluation", "How the rules in the list are evaluated");
prop = RNA_def_property(srna, "rules", PROP_COLLECTION, PROP_NONE);
RNA_def_property_struct_type(prop, "BoidRule");
RNA_def_property_ui_text(prop, "Boid Rules", "");
prop = RNA_def_property(srna, "active_boid_rule", PROP_POINTER, PROP_NONE);
RNA_def_property_struct_type(prop, "BoidRule");
RNA_def_property_pointer_funcs(prop, "rna_BoidState_active_boid_rule_get", NULL, NULL, NULL);
RNA_def_property_ui_text(prop, "Active Boid Rule", "");
prop = RNA_def_property(srna, "active_boid_rule_index", PROP_INT, PROP_UNSIGNED);
RNA_def_property_int_funcs(prop, "rna_BoidState_active_boid_rule_index_get",
"rna_BoidState_active_boid_rule_index_set",
"rna_BoidState_active_boid_rule_index_range");
RNA_def_property_ui_text(prop, "Active Boid Rule Index", "");
prop = RNA_def_property(srna, "rule_fuzzy", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "rule_fuzziness");
RNA_def_property_range(prop, 0.0, 1.0);
RNA_def_property_ui_text(prop, "Rule Fuzziness", "");
RNA_def_property_update(prop, 0, "rna_Boids_reset");
prop = RNA_def_property(srna, "volume", PROP_FLOAT, PROP_NONE);
RNA_def_property_range(prop, 0.0, 100.0);
RNA_def_property_ui_text(prop, "Volume", "");
RNA_def_property_update(prop, 0, "rna_Boids_reset");
prop = RNA_def_property(srna, "falloff", PROP_FLOAT, PROP_NONE);
RNA_def_property_range(prop, 0.0, 10.0);
RNA_def_property_ui_text(prop, "Falloff", "");
RNA_def_property_update(prop, 0, "rna_Boids_reset");
}
开发者ID:caomw,项目名称:blender-ui,代码行数:47,代码来源:rna_boid.c
示例13: rna_def_render_bake_pixel
static void rna_def_render_bake_pixel(BlenderRNA *brna)
{
StructRNA *srna;
PropertyRNA *prop;
srna = RNA_def_struct(brna, "BakePixel", NULL);
RNA_def_struct_ui_text(srna, "Bake Pixel", "");
RNA_define_verify_sdna(0);
prop = RNA_def_property(srna, "primitive_id", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "primitive_id");
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
prop = RNA_def_property(srna, "object_id", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "object_id");
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
prop = RNA_def_property(srna, "uv", PROP_FLOAT, PROP_NONE);
RNA_def_property_array(prop, 2);
RNA_def_property_float_sdna(prop, NULL, "uv");
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
prop = RNA_def_property(srna, "du_dx", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "du_dx");
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
prop = RNA_def_property(srna, "du_dy", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "du_dy");
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
prop = RNA_def_property(srna, "dv_dx", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "dv_dx");
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
prop = RNA_def_property(srna, "dv_dy", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "dv_dy");
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
prop = RNA_def_property(srna, "next", PROP_POINTER, PROP_NONE);
RNA_def_property_struct_type(prop, "BakePixel");
RNA_def_property_pointer_funcs(prop, "rna_BakePixel_next_get", NULL, NULL, NULL);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_define_verify_sdna(1);
}
开发者ID:mgschwan,项目名称:blensor,代码行数:46,代码来源:rna_render.c
示例14: rna_def_touch_sensor
static void rna_def_touch_sensor(BlenderRNA *brna)
{
StructRNA *srna;
PropertyRNA *prop;
srna = RNA_def_struct(brna, "TouchSensor", "Sensor");
RNA_def_struct_ui_text(srna, "Touch Sensor", "Sensor to detect objects colliding with the current object");
RNA_def_struct_sdna_from(srna, "bTouchSensor", "data");
prop = RNA_def_property(srna, "material", PROP_POINTER, PROP_NONE);
RNA_def_property_struct_type(prop, "Material");
RNA_def_property_pointer_sdna(prop, NULL, "ma");
RNA_def_property_flag(prop, PROP_EDITABLE);
RNA_def_property_ui_text(prop, "Material", "Only look for objects with this material (blank = all objects)");
/* note: custom set function is ONLY to avoid rna setting a user for this. */
RNA_def_property_pointer_funcs(prop, NULL, "rna_Sensor_touch_material_set", NULL, NULL);
RNA_def_property_update(prop, NC_LOGIC, NULL);
}
开发者ID:danielmarg,项目名称:blender-main,代码行数:18,代码来源:rna_sensor.c
示例15: rna_def_armature_edit_bones
/* armature.bones.* */
static void rna_def_armature_edit_bones(BlenderRNA *brna, PropertyRNA *cprop)
{
StructRNA *srna;
PropertyRNA *prop;
FunctionRNA *func;
PropertyRNA *parm;
RNA_def_property_srna(cprop, "ArmatureEditBones");
srna = RNA_def_struct(brna, "ArmatureEditBones", NULL);
RNA_def_struct_sdna(srna, "bArmature");
RNA_def_struct_ui_text(srna, "Armature EditBones", "Collection of armature edit bones");
prop = RNA_def_property(srna, "active", PROP_POINTER, PROP_NONE);
RNA_def_property_struct_type(prop, "EditBone");
RNA_def_property_pointer_sdna(prop, NULL, "act_edbone");
RNA_def_property_flag(prop, PROP_EDITABLE);
RNA_def_property_ui_text(prop, "Active EditBone", "Armatures active edit bone");
/*RNA_def_property_update(prop, 0, "rna_Armature_act_editbone_update"); */
RNA_def_property_pointer_funcs(prop, NULL, "rna_Armature_act_edit_bone_set", NULL, NULL);
/* todo, redraw */
/* RNA_def_property_collection_active(prop, prop_act); */
/* add target */
func = RNA_def_function(srna, "new", "rna_Armature_edit_bone_new");
RNA_def_function_flag(func, FUNC_USE_REPORTS);
RNA_def_function_ui_description(func, "Add a new bone");
parm = RNA_def_string(func, "name", "Object", 0, "", "New name for the bone");
RNA_def_property_flag(parm, PROP_REQUIRED);
/* return type */
parm = RNA_def_pointer(func, "bone", "EditBone", "", "Newly created edit bone");
RNA_def_function_return(func, parm);
/* remove target */
func = RNA_def_function(srna, "remove", "rna_Armature_edit_bone_remove");
RNA_def_function_flag(func, FUNC_USE_REPORTS);
RNA_def_function_ui_description(func, "Remove an existing bone from the armature");
/* target to remove*/
parm = RNA_def_pointer(func, "bone", "EditBone", "", "EditBone to remove");
RNA_def_property_flag(parm, PROP_REQUIRED | PROP_NEVER_NULL | PROP_RNAPTR);
RNA_def_property_clear_flag(parm, PROP_THICK_WRAP);
}
开发者ID:SuriyaaKudoIsc,项目名称:blender-git,代码行数:45,代码来源:rna_armature.c
示例16: rna_def_action_pose_markers
static void rna_def_action_pose_markers(BlenderRNA *brna, PropertyRNA *cprop)
{
StructRNA *srna;
PropertyRNA *prop;
FunctionRNA *func;
PropertyRNA *parm;
RNA_def_property_srna(cprop, "ActionPoseMarkers");
srna = RNA_def_struct(brna, "ActionPoseMarkers", NULL);
RNA_def_struct_sdna(srna, "bAction");
RNA_def_struct_ui_text(srna, "Action Pose Markers", "Collection of timeline markers");
func = RNA_def_function(srna, "new", "rna_Action_pose_markers_new");
RNA_def_function_ui_description(func, "Add a pose marker to the action");
parm = RNA_def_string(func, "name", "Marker", 0, NULL, "New name for the marker (not unique)");
RNA_def_property_flag(parm, PROP_REQUIRED);
parm = RNA_def_pointer(func, "marker", "TimelineMarker", "", "Newly created marker");
RNA_def_function_return(func, parm);
func = RNA_def_function(srna, "remove", "rna_Action_pose_markers_remove");
RNA_def_function_ui_description(func, "Remove a timeline marker");
RNA_def_function_flag(func, FUNC_USE_REPORTS);
parm = RNA_def_pointer(func, "marker", "TimelineMarker", "", "Timeline marker to remove");
RNA_def_property_flag(parm, PROP_REQUIRED | PROP_NEVER_NULL | PROP_RNAPTR);
RNA_def_property_clear_flag(parm, PROP_THICK_WRAP);
prop = RNA_def_property(srna, "active", PROP_POINTER, PROP_NONE);
RNA_def_property_struct_type(prop, "TimelineMarker");
RNA_def_property_flag(prop, PROP_EDITABLE | PROP_LIB_EXCEPTION);
RNA_def_property_pointer_funcs(prop, "rna_Action_active_pose_marker_get",
"rna_Action_active_pose_marker_set", NULL, NULL);
RNA_def_property_ui_text(prop, "Active Pose Marker", "Active pose marker for this action");
prop = RNA_def_property(srna, "active_index", PROP_INT, PROP_UNSIGNED);
RNA_def_property_int_sdna(prop, NULL, "active_marker");
RNA_def_property_flag(prop, PROP_LIB_EXCEPTION);
RNA_def_property_int_funcs(prop, "rna_Action_active_pose_marker_index_get",
"rna_Action_active_pose_marker_index_set", "rna_Action_active_pose_marker_index_range");
RNA_def_property_ui_text(prop, "Active Pose Marker Index", "Index of active pose marker");
}
开发者ID:JasonWilkins,项目名称:blender-viewport_fx,代码行数:42,代码来源:rna_action.c
示例17: rna_def_drivertarget
static void rna_def_drivertarget(BlenderRNA *brna)
{
StructRNA *srna;
PropertyRNA *prop;
srna= RNA_def_struct(brna, "DriverTarget", NULL);
RNA_def_struct_ui_text(srna, "Driver Target", "Variable from some source/target for driver relationship.");
/* Variable Name */
prop= RNA_def_property(srna, "name", PROP_STRING, PROP_NONE);
RNA_def_struct_name_property(srna, prop);
RNA_def_property_ui_text(prop, "Name", "Name to use in scripted expressions/functions. (No spaces or dots are allowed. Also, must not start with a symbol or digit)");
//RNA_def_property_update(prop, 0, "rna_ChannelDriver_update_data"); // XXX disabled for now, until we can turn off auto updates
/* Target Properties - ID-block to Drive */
prop= RNA_def_property(srna, "id", PROP_POINTER, PROP_NONE);
RNA_def_property_struct_type(prop, "ID");
RNA_def_property_flag(prop, PROP_EDITABLE);
RNA_def_property_editable_func(prop, "rna_DriverTarget_id_editable");
RNA_def_property_pointer_funcs(prop, NULL, NULL, "rna_DriverTarget_id_typef");
RNA_def_property_ui_text(prop, "ID", "ID-block that the specific property used can be found from");
//RNA_def_property_update(prop, 0, "rna_ChannelDriver_update_data"); // XXX disabled for now, until we can turn off auto updates
prop= RNA_def_property(srna, "id_type", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "idtype");
RNA_def_property_enum_items(prop, id_type_items);
RNA_def_property_enum_default(prop, ID_OB);
RNA_def_property_ui_text(prop, "ID Type", "Type of ID-block that can be used.");
//RNA_def_property_update(prop, 0, "rna_ChannelDriver_update_data"); // XXX disabled for now, until we can turn off auto updates
/* Target Properties - Property to Drive */
prop= RNA_def_property(srna, "rna_path", PROP_STRING, PROP_NONE);
RNA_def_property_string_funcs(prop, "rna_DriverTarget_RnaPath_get", "rna_DriverTarget_RnaPath_length", "rna_DriverTarget_RnaPath_set");
RNA_def_property_ui_text(prop, "RNA Path", "RNA Path (from Object) to property used");
//RNA_def_property_update(prop, 0, "rna_ChannelDriver_update_data"); // XXX disabled for now, until we can turn off auto updates
prop= RNA_def_property(srna, "array_index", PROP_INT, PROP_NONE);
RNA_def_property_ui_text(prop, "RNA Array Index", "Index to the specific property used (if applicable)");
//RNA_def_property_update(prop, 0, "rna_ChannelDriver_update_data"); // XXX disabled for now, until we can turn off auto updates
}
开发者ID:jinjoh,项目名称:NOOR,代码行数:40,代码来源:rna_fcurve.c
示例18: rna_def_layer_objects
static void rna_def_layer_objects(BlenderRNA *brna, PropertyRNA *cprop)
{
StructRNA *srna;
PropertyRNA *prop;
RNA_def_property_srna(cprop, "LayerObjects");
srna = RNA_def_struct(brna, "LayerObjects", NULL);
RNA_def_struct_sdna(srna, "ViewLayer");
RNA_def_struct_ui_text(srna, "Layer Objects", "Collections of objects");
prop = RNA_def_property(srna, "active", PROP_POINTER, PROP_NONE);
RNA_def_property_struct_type(prop, "Object");
RNA_def_property_pointer_funcs(prop,
"rna_LayerObjects_active_object_get",
"rna_LayerObjects_active_object_set",
NULL,
NULL);
RNA_def_property_flag(prop, PROP_EDITABLE | PROP_NEVER_UNLINK);
RNA_def_property_ui_text(prop, "Active Object", "Active object for this layer");
/* Could call: ED_object_base_activate(C, rl->basact);
* but would be a bad level call and it seems the notifier is enough */
RNA_def_property_update(prop, NC_SCENE | ND_OB_ACTIVE, NULL);
prop = RNA_def_property(srna, "selected", PROP_COLLECTION, PROP_NONE);
RNA_def_property_collection_sdna(prop, NULL, "object_bases", NULL);
RNA_def_property_struct_type(prop, "Object");
RNA_def_property_collection_funcs(prop,
"rna_LayerObjects_selected_begin",
"rna_iterator_listbase_next",
"rna_iterator_listbase_end",
"rna_ViewLayer_objects_get",
NULL,
NULL,
NULL,
NULL);
RNA_def_property_ui_text(prop, "Selected Objects", "All the selected objects of this layer");
}
开发者ID:dfelinto,项目名称:blender,代码行数:37,代码来源:rna_layer.c
|
请发表评论