diff options
Diffstat (limited to 'source/blender/makesrna')
-rw-r--r-- | source/blender/makesrna/RNA_access.h | 1 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_access.c | 3 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_constraint.c | 52 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_material.c | 2 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_nodetree.c | 51 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_object.c | 113 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_render.c | 4 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_scene.c | 9 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_space.c | 4 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_texture.c | 9 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_ui.c | 28 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_wm.c | 4 |
12 files changed, 202 insertions, 78 deletions
diff --git a/source/blender/makesrna/RNA_access.h b/source/blender/makesrna/RNA_access.h index 1d4aa100fce..44b36e65aa3 100644 --- a/source/blender/makesrna/RNA_access.h +++ b/source/blender/makesrna/RNA_access.h @@ -413,6 +413,7 @@ extern StructRNA RNA_SoftBodyModifier; extern StructRNA RNA_SoftBodySettings; extern StructRNA RNA_Sound; extern StructRNA RNA_SoundSequence; +extern StructRNA RNA_SplineIKConstraint; extern StructRNA RNA_Space; extern StructRNA RNA_Space3DView; extern StructRNA RNA_SpaceConsole; diff --git a/source/blender/makesrna/intern/rna_access.c b/source/blender/makesrna/intern/rna_access.c index b7120c58fef..fac18ba7942 100644 --- a/source/blender/makesrna/intern/rna_access.c +++ b/source/blender/makesrna/intern/rna_access.c @@ -903,6 +903,9 @@ void RNA_property_boolean_set(PointerRNA *ptr, PropertyRNA *prop, int value) BooleanPropertyRNA *bprop= (BooleanPropertyRNA*)prop; IDProperty *idprop; + /* just incase other values are passed */ + if(value) value= 1; + if((idprop=rna_idproperty_check(&prop, ptr))) IDP_Int(idprop)= value; else if(bprop->set) diff --git a/source/blender/makesrna/intern/rna_constraint.c b/source/blender/makesrna/intern/rna_constraint.c index 7a9a07939b1..02cf44dcc7a 100644 --- a/source/blender/makesrna/intern/rna_constraint.c +++ b/source/blender/makesrna/intern/rna_constraint.c @@ -55,6 +55,7 @@ EnumPropertyItem constraint_type_items[] ={ {CONSTRAINT_TYPE_CLAMPTO, "CLAMP_TO", ICON_CONSTRAINT_DATA, "Clamp To", ""}, {CONSTRAINT_TYPE_STRETCHTO, "STRETCH_TO",ICON_CONSTRAINT_DATA, "Stretch To", ""}, {CONSTRAINT_TYPE_KINEMATIC, "IK", ICON_CONSTRAINT_DATA, "Inverse Kinematics", ""}, + {CONSTRAINT_TYPE_SPLINEIK, "SPLINE_IK", ICON_CONSTRAINT_DATA, "Spline IK", ""}, {0, "", 0, "Relationship", ""}, {CONSTRAINT_TYPE_CHILDOF, "CHILD_OF", ICON_CONSTRAINT_DATA, "Child Of", ""}, {CONSTRAINT_TYPE_MINMAX, "FLOOR", ICON_CONSTRAINT_DATA, "Floor", ""}, @@ -147,6 +148,8 @@ static StructRNA *rna_ConstraintType_refine(struct PointerRNA *ptr) return &RNA_ShrinkwrapConstraint; case CONSTRAINT_TYPE_DAMPTRACK: return &RNA_DampedTrackConstraint; + case CONSTRAINT_TYPE_SPLINEIK: + return &RNA_SplineIKConstraint; default: return &RNA_UnknownType; } @@ -1169,7 +1172,7 @@ static void rna_def_constraint_clamp_to(BlenderRNA *brna) RNA_def_struct_sdna_from(srna, "bClampToConstraint", "data"); prop= RNA_def_property(srna, "target", PROP_POINTER, PROP_NONE); - RNA_def_property_pointer_sdna(prop, NULL, "tar"); + RNA_def_property_pointer_sdna(prop, NULL, "tar"); // TODO: curve only! RNA_def_property_ui_text(prop, "Target", "Target Object"); RNA_def_property_flag(prop, PROP_EDITABLE); RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_dependency_update"); @@ -1672,6 +1675,52 @@ static void rna_def_constraint_damped_track(BlenderRNA *brna) RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update"); } +static void rna_def_constraint_spline_ik(BlenderRNA *brna) +{ + StructRNA *srna; + PropertyRNA *prop; + + srna= RNA_def_struct(brna, "SplineIKConstraint", "Constraint"); + RNA_def_struct_ui_text(srna, "Spline IK Constraint", "Align 'n' bones along a curve."); + RNA_def_struct_sdna_from(srna, "bSplineIKConstraint", "data"); + + /* target chain */ + prop= RNA_def_property(srna, "target", PROP_POINTER, PROP_NONE); + RNA_def_property_pointer_sdna(prop, NULL, "tar"); + RNA_def_property_ui_text(prop, "Target", "Curve that controls this relationship"); + RNA_def_property_flag(prop, PROP_EDITABLE); + RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_dependency_update"); + + prop= RNA_def_property(srna, "chain_length", PROP_INT, PROP_NONE); + RNA_def_property_int_sdna(prop, NULL, "chainlen"); + RNA_def_property_range(prop, 1, 255); // TODO: this should really check the max length of the chain the constraint is attached to + RNA_def_property_ui_text(prop, "Chain Length", "How many bones are included in the chain"); + RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_dependency_update"); + + // TODO: add access to the positions array to allow more flexible aligning? + + /* settings */ + prop= RNA_def_property(srna, "affect_root", PROP_BOOLEAN, PROP_NONE); + RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", CONSTRAINT_SPLINEIK_NO_ROOT); + RNA_def_property_ui_text(prop, "Affect Root", "Include the root joint in the calculations."); + RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update"); + + prop= RNA_def_property(srna, "even_divisions", PROP_BOOLEAN, PROP_NONE); + RNA_def_property_boolean_sdna(prop, NULL, "flag", CONSTRAINT_SPLINEIK_EVENSPLITS); + RNA_def_property_ui_text(prop, "Even Divisions", "Ignore the relative lengths of the bones when fitting to the curve."); + RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update"); + + prop= RNA_def_property(srna, "keep_max_length", PROP_BOOLEAN, PROP_NONE); + RNA_def_property_boolean_sdna(prop, NULL, "flag", CONSTRAINT_SPLINEIK_SCALE_LIMITED); + RNA_def_property_ui_text(prop, "Keep Max Length", "Maintain the maximum length of the chain when spline is stretched."); + RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update"); + + prop= RNA_def_property(srna, "radius_to_thickness", PROP_BOOLEAN, PROP_NONE); + RNA_def_property_boolean_sdna(prop, NULL, "flag", CONSTRAINT_SPLINEIK_RAD2FAT); + RNA_def_property_ui_text(prop, "Radius to Thickness", "Radius of the spline affects the x/z scaling of the bones."); + RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update"); +} + /* base struct for constraints */ void RNA_def_constraint(BlenderRNA *brna) { @@ -1773,6 +1822,7 @@ void RNA_def_constraint(BlenderRNA *brna) rna_def_constraint_transform(brna); rna_def_constraint_shrinkwrap(brna); rna_def_constraint_damped_track(brna); + rna_def_constraint_spline_ik(brna); } #endif diff --git a/source/blender/makesrna/intern/rna_material.c b/source/blender/makesrna/intern/rna_material.c index fbecf2b5f07..35eab7645f3 100644 --- a/source/blender/makesrna/intern/rna_material.c +++ b/source/blender/makesrna/intern/rna_material.c @@ -991,7 +991,7 @@ static void rna_def_material_volume(BlenderRNA *brna) prop= RNA_def_property(srna, "step_size", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "stepsize"); RNA_def_property_range(prop, 0.0f, FLT_MAX); - RNA_def_property_ui_range(prop, 0.0f, 1.0f, 1, 3); + RNA_def_property_ui_range(prop, 0.001f, 1.0f, 1, 3); RNA_def_property_ui_text(prop, "Step Size", "Distance between subsequent volume depth samples."); RNA_def_property_update(prop, 0, "rna_Material_update"); diff --git a/source/blender/makesrna/intern/rna_nodetree.c b/source/blender/makesrna/intern/rna_nodetree.c index 068aa4d72d1..2c8243a4f16 100644 --- a/source/blender/makesrna/intern/rna_nodetree.c +++ b/source/blender/makesrna/intern/rna_nodetree.c @@ -59,15 +59,13 @@ static EnumPropertyItem node_blend_type_items[] = { {12, "HUE", 0, "Hue", ""}, {16, "SOFT_LIGHT", 0, "Soft Light", ""}, {17, "LINEAR_LIGHT", 0, "Linear Light",""}, - {0, NULL, 0, NULL, NULL} -}; + {0, NULL, 0, NULL, NULL}}; static EnumPropertyItem node_flip_items[] = { {0, "X", 0, "Flip X", ""}, {1, "Y", 0, "Flip Y", ""}, {2, "XY", 0, "Flip X & Y", ""}, - {0, NULL, 0, NULL, NULL} -}; + {0, NULL, 0, NULL, NULL}}; static EnumPropertyItem node_math_items[] = { { 0, "ADD", 0, "Add", ""}, @@ -87,8 +85,7 @@ static EnumPropertyItem node_math_items[] = { {14, "ROUND", 0, "Round", ""}, {15, "LESS_THAN", 0, "Less Than", ""}, {16, "GREATER_THAN", 0, "Greater Than", ""}, - {0, NULL, 0, NULL, NULL} -}; + {0, NULL, 0, NULL, NULL}}; static EnumPropertyItem node_vec_math_items[] = { {0, "ADD", 0, "Add", ""}, @@ -97,8 +94,7 @@ static EnumPropertyItem node_vec_math_items[] = { {3, "DOT_PRODUCT", 0, "Dot Product", ""}, {4, "CROSS_PRODUCT", 0, "Cross Product", ""}, {5, "NORMALIZE", 0, "Normalize", ""}, - {0, NULL, 0, NULL, NULL} -}; + {0, NULL, 0, NULL, NULL}}; static EnumPropertyItem node_filter_items[] = { {0, "SOFTEN", 0, "Soften", ""}, @@ -108,8 +104,7 @@ static EnumPropertyItem node_filter_items[] = { {4, "PREWITT", 0, "Prewitt", ""}, {5, "KIRSCH", 0, "Kirsch", ""}, {6, "SHADOW", 0, "Shadow", ""}, - {0, NULL, 0, NULL, NULL} -}; + {0, NULL, 0, NULL, NULL}}; #ifdef RNA_RUNTIME @@ -583,8 +578,7 @@ static void def_cmp_blur(StructRNA *srna) {R_FILTER_FAST_GAUSS, "FAST_GAUSS", 0, "Fast Gaussian", ""}, {R_FILTER_CATROM, "CATROM", 0, "Catrom", ""}, {R_FILTER_MITCH, "MITCH", 0, "Mitch", ""}, - {0, NULL, 0, NULL, NULL} - }; + {0, NULL, 0, NULL, NULL}}; RNA_def_struct_sdna_from(srna, "NodeBlurData", "storage"); @@ -766,8 +760,7 @@ static void def_cmp_levels(StructRNA *srna) {3, "GREEN", 0, "G", "Green Channel"}, {4, "BLUE", 0, "B", "Blue Channel"}, {5, "LUMINANCE", 0, "L", "Luminance Channel"}, - {0, NULL, 0, NULL, NULL} - }; + {0, NULL, 0, NULL, NULL}}; prop = RNA_def_property(srna, "color_space", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, "custom1"); @@ -785,8 +778,7 @@ static void def_cmp_image(StructRNA *srna) {IMA_SRC_MOVIE, "MOVIE", "Movie", ""}, {IMA_SRC_SEQUENCE, "SEQUENCE", "Sequence", ""}, {IMA_SRC_GENERATED, "GENERATED", "Generated", ""}, - {0, NULL, 0, NULL, NULL} - };*/ + {0, NULL, 0, NULL, NULL}};*/ prop = RNA_def_property(srna, "image", PROP_POINTER, PROP_NONE); RNA_def_property_pointer_sdna(prop, NULL, "id"); @@ -949,8 +941,7 @@ static void def_cmp_scale(StructRNA *srna) {0, "RELATIVE", 0, "Relative", ""}, {1, "ABSOLUTE", 0, "Absolute", ""}, {2, "SCENE_SIZE", 0, "Scene Size", ""}, - {0, NULL, 0, NULL, NULL} - }; + {0, NULL, 0, NULL, NULL}}; prop = RNA_def_property(srna, "space", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, "custom1"); @@ -1034,8 +1025,7 @@ static void def_cmp_color_spill(StructRNA *srna) {1, "R", 0, "R", "Red Spill Suppression"}, {2, "G", 0, "G", "Green Spill Suppression"}, {3, "B", 0, "B", "Blue Spill Suppression"}, - {0, NULL, 0, NULL, NULL} - }; + {0, NULL, 0, NULL, NULL}}; prop = RNA_def_property(srna, "channel", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, "custom1"); @@ -1121,8 +1111,7 @@ static void def_cmp_channel_matte(StructRNA *srna) {2, "HSV", 0, "HSV", "HSV Color Space"}, {3, "YUV", 0, "YUV", "YUV Color Space"}, {4, "YCC", 0, "YCbCr", "YCbCr Color Space"}, - {0, NULL, 0, NULL, NULL} - }; + {0, NULL, 0, NULL, NULL}}; prop = RNA_def_property(srna, "color_space", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, "custom1"); @@ -1171,8 +1160,7 @@ static void def_cmp_splitviewer(StructRNA *srna) static EnumPropertyItem axis_items[] = { {0, "X", 0, "X", ""}, {1, "Y", 0, "Y", ""}, - {0, NULL, 0, NULL, NULL} - }; + {0, NULL, 0, NULL, NULL}}; prop = RNA_def_property(srna, "axis", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, "custom2"); @@ -1221,8 +1209,7 @@ static void def_cmp_defocus(StructRNA *srna) {4, "SQUARE", 0, "Square", "4 sides"}, {3, "TRIANGLE", 0, "Triangular", "3 sides"}, {0, "CIRCLE", 0, "Circular", ""}, - {0, NULL, 0, NULL, NULL} - }; + {0, NULL, 0, NULL, NULL}}; RNA_def_struct_sdna_from(srna, "NodeDefocus", "storage"); @@ -1423,8 +1410,7 @@ static void def_cmp_premul_key(StructRNA *srna) static EnumPropertyItem type_items[] = { {0, "KEY_TO_PREMUL", 0, "Key to Premul", ""}, {1, "PREMUL_TO_KEY", 0, "Premul to Key", ""}, - {0, NULL, 0, NULL, NULL} - }; + {0, NULL, 0, NULL, NULL}}; prop = RNA_def_property(srna, "mapping", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, "custom1"); @@ -1443,15 +1429,13 @@ static void def_cmp_glare(StructRNA *srna) {2, "STREAKS", 0, "Streaks", ""}, {1, "FOG_GLOW", 0, "Fog Glow", ""}, {0, "SIMPLE_STAR", 0, "Simple Star", ""}, - {0, NULL, 0, NULL, NULL} - }; + {0, NULL, 0, NULL, NULL}}; static EnumPropertyItem quality_items[] = { {0, "HIGH", 0, "High", ""}, {1, "MEDIUM", 0, "Medium", ""}, {2, "LOW", 0, "Low", ""}, - {0, NULL, 0, NULL, NULL} - }; + {0, NULL, 0, NULL, NULL}}; RNA_def_struct_sdna_from(srna, "NodeGlare", "storage"); @@ -1530,8 +1514,7 @@ static void def_cmp_tonemap(StructRNA *srna) static EnumPropertyItem type_items[] = { {1, "RD_PHOTORECEPTOR", 0, "R/D Photoreceptor", ""}, {0, "RH_SIMPLE", 0, "Rh Simple", ""}, - {0, NULL, 0, NULL, NULL} - }; + {0, NULL, 0, NULL, NULL}}; RNA_def_struct_sdna_from(srna, "NodeTonemap", "storage"); diff --git a/source/blender/makesrna/intern/rna_object.c b/source/blender/makesrna/intern/rna_object.c index 28e4e7fc443..1e884bb6950 100644 --- a/source/blender/makesrna/intern/rna_object.c +++ b/source/blender/makesrna/intern/rna_object.c @@ -150,6 +150,25 @@ static void rna_Object_select_update(bContext *C, PointerRNA *ptr) ED_base_object_select(object_in_scene(ob, CTX_data_scene(C)), mode); } +static void rna_Base_select_update(bContext *C, PointerRNA *ptr) +{ + Base *base= (Base*)ptr->data; + short mode = base->flag & BA_SELECT ? BA_SELECT : BA_DESELECT; + ED_base_object_select(base, mode); +} + +static void rna_Object_layer_update__internal(Scene *scene, Base *base, Object *ob) +{ + /* try to avoid scene sort */ + if((ob->lay & scene->lay) && (base->lay & scene->lay)) { + /* pass */ + } else if((ob->lay & scene->lay)==0 && (base->lay & scene->lay)==0) { + /* pass */ + } else { + DAG_scene_sort(scene); + } +} + static void rna_Object_layer_update(bContext *C, PointerRNA *ptr) { Object *ob= (Object*)ptr->id.data; @@ -160,15 +179,19 @@ static void rna_Object_layer_update(bContext *C, PointerRNA *ptr) if(!base) return; - /* try to avoid scene sort */ - if((ob->lay & scene->lay) && (base->lay & scene->lay)) - base->lay= ob->lay; - else if((ob->lay & scene->lay)==0 && (base->lay & scene->lay)==0) - base->lay= ob->lay; - else { - base->lay= ob->lay; - DAG_scene_sort(scene); - } + base->lay= ob->lay; + rna_Object_layer_update__internal(scene, base, ob); +} + +static void rna_Base_layer_update(bContext *C, PointerRNA *ptr) +{ + Base *base= (Base*)ptr->id.data; + Object *ob= (Object*)base->object; + Scene *scene= CTX_data_scene(C); + + ob->lay= base->lay; + + rna_Object_layer_update__internal(scene, base, ob); } static int rna_Object_data_editable(PointerRNA *ptr) @@ -697,23 +720,47 @@ static PointerRNA rna_Object_game_settings_get(PointerRNA *ptr) return rna_pointer_inherit_refine(ptr, &RNA_GameObjectSettings, ptr->id.data); } -static void rna_Object_layer_set(PointerRNA *ptr, const int *values) + +static unsigned int rna_Object_layer_validate__internal(const int *values, unsigned int lay) { - Object *ob= (Object*)ptr->data; - int i, tot= 0; + int i, tot; /* ensure we always have some layer selected */ for(i=0; i<20; i++) if(values[i]) tot++; - + if(tot==0) - return; + return 0; for(i=0; i<20; i++) { - if(values[i]) ob->lay |= (1<<i); - else ob->lay &= ~(1<<i); + if(values[i]) lay |= (1<<i); + else lay &= ~(1<<i); } + + return lay; +} + +static void rna_Object_layer_set(PointerRNA *ptr, const int *values) +{ + Object *ob= (Object*)ptr->data; + unsigned int lay; + + lay= rna_Object_layer_validate__internal(values, ob->lay); + if(lay) + ob->lay= lay; +} + +static void rna_Base_layer_set(PointerRNA *ptr, const int *values) +{ + Base *base= (Base*)ptr->data; + + unsigned int lay; + lay= rna_Object_layer_validate__internal(values, base->lay); + if(lay) + base->lay= lay; + + /* rna_Base_layer_update updates the objects layer */ } static void rna_GameObjectSettings_state_set(PointerRNA *ptr, const int *values) @@ -1707,10 +1754,44 @@ static void rna_def_dupli_object(BlenderRNA *brna) /* TODO: DupliObject has more properties that can be wrapped */ } +static void rna_def_base(BlenderRNA *brna) +{ + StructRNA *srna; + PropertyRNA *prop; + + srna= RNA_def_struct(brna, "Base", NULL); + RNA_def_struct_sdna(srna, "Base"); + RNA_def_struct_ui_text(srna, "Object Base", "An objects instance in a scene."); + RNA_def_struct_ui_icon(srna, ICON_OBJECT_DATA); + + prop= RNA_def_property(srna, "object", PROP_POINTER, PROP_NONE); + RNA_def_property_pointer_sdna(prop, NULL, "object"); + RNA_def_property_clear_flag(prop, PROP_EDITABLE); + RNA_def_property_ui_text(prop, "Object", "Object this base links to."); + + /* same as object layer */ + prop= RNA_def_property(srna, "layers", PROP_BOOLEAN, PROP_LAYER_MEMBER); + RNA_def_property_boolean_sdna(prop, NULL, "lay", 1); + RNA_def_property_array(prop, 20); + RNA_def_property_ui_text(prop, "Layers", "Layers the object is on."); + RNA_def_property_boolean_funcs(prop, NULL, "rna_Base_layer_set"); + RNA_def_property_update(prop, NC_OBJECT|ND_DRAW, "rna_Base_layer_update"); + + prop= RNA_def_property(srna, "selected", PROP_BOOLEAN, PROP_NONE); + RNA_def_property_boolean_sdna(prop, NULL, "flag", BA_SELECT); + RNA_def_property_ui_text(prop, "Selected", "Object base selection state."); + RNA_def_property_update(prop, NC_OBJECT|ND_DRAW, "rna_Base_select_update"); + + /* could use other flags like - BA_WAS_SEL, but for now selected is enough */ + + /* TODO: DupliObject has more properties that can be wrapped */ +} + void RNA_def_object(BlenderRNA *brna) { rna_def_object(brna); rna_def_object_game_settings(brna); + rna_def_base(brna); rna_def_vertex_group(brna); rna_def_material_slot(brna); rna_def_dupli_object(brna); diff --git a/source/blender/makesrna/intern/rna_render.c b/source/blender/makesrna/intern/rna_render.c index a67831715a2..3505253b60f 100644 --- a/source/blender/makesrna/intern/rna_render.c +++ b/source/blender/makesrna/intern/rna_render.c @@ -269,11 +269,11 @@ static void rna_def_render_engine(BlenderRNA *brna) /* registration */ RNA_define_verify_sdna(0); - prop= RNA_def_property(srna, "idname", PROP_STRING, PROP_NONE); + prop= RNA_def_property(srna, "bl_idname", PROP_STRING, PROP_NONE); RNA_def_property_string_sdna(prop, NULL, "type->idname"); RNA_def_property_flag(prop, PROP_REGISTER); - prop= RNA_def_property(srna, "label", PROP_STRING, PROP_NONE); + prop= RNA_def_property(srna, "bl_label", PROP_STRING, PROP_NONE); RNA_def_property_string_sdna(prop, NULL, "type->name"); RNA_def_property_flag(prop, PROP_REGISTER); diff --git a/source/blender/makesrna/intern/rna_scene.c b/source/blender/makesrna/intern/rna_scene.c index d6dbb7cac5f..e7aeac96aef 100644 --- a/source/blender/makesrna/intern/rna_scene.c +++ b/source/blender/makesrna/intern/rna_scene.c @@ -2211,7 +2211,9 @@ void RNA_def_scene(BlenderRNA *brna) RNA_def_property_pointer_funcs(prop, "rna_Scene_active_object_get", "rna_Scene_active_object_set", NULL); RNA_def_property_flag(prop, PROP_EDITABLE); RNA_def_property_ui_text(prop, "Object", "Object to use as projector transform."); - + /* Could call: ED_base_object_activate(C, scene->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, "world", PROP_POINTER, PROP_NONE); RNA_def_property_flag(prop, PROP_EDITABLE); @@ -2225,6 +2227,11 @@ void RNA_def_scene(BlenderRNA *brna) RNA_def_property_update(prop, NC_WINDOW, NULL); /* Bases/Objects */ + prop= RNA_def_property(srna, "bases", PROP_COLLECTION, PROP_NONE); + RNA_def_property_collection_sdna(prop, NULL, "base", NULL); + RNA_def_property_struct_type(prop, "Base"); + RNA_def_property_ui_text(prop, "Bases", ""); + prop= RNA_def_property(srna, "objects", PROP_COLLECTION, PROP_NONE); RNA_def_property_collection_sdna(prop, NULL, "base", NULL); RNA_def_property_struct_type(prop, "Object"); diff --git a/source/blender/makesrna/intern/rna_space.c b/source/blender/makesrna/intern/rna_space.c index 43172f0a1e8..a12e26a7d7b 100644 --- a/source/blender/makesrna/intern/rna_space.c +++ b/source/blender/makesrna/intern/rna_space.c @@ -153,10 +153,10 @@ static PointerRNA rna_CurrentOrientation_get(PointerRNA *ptr) Scene *scene = ((bScreen*)ptr->id.data)->scene; View3D *v3d= (View3D*)ptr->data; - if (v3d->twmode < 4) + if (v3d->twmode < V3D_MANIP_CUSTOM) return rna_pointer_inherit_refine(ptr, &RNA_TransformOrientation, NULL); else - return rna_pointer_inherit_refine(ptr, &RNA_TransformOrientation, BLI_findlink(&scene->transform_spaces, v3d->twmode - 4)); + return rna_pointer_inherit_refine(ptr, &RNA_TransformOrientation, BLI_findlink(&scene->transform_spaces, v3d->twmode - V3D_MANIP_CUSTOM)); } EnumPropertyItem *rna_TransformOrientation_itemf(bContext *C, PointerRNA *ptr, int *free) diff --git a/source/blender/makesrna/intern/rna_texture.c b/source/blender/makesrna/intern/rna_texture.c index c2be65c39d6..5a18a7a987c 100644 --- a/source/blender/makesrna/intern/rna_texture.c +++ b/source/blender/makesrna/intern/rna_texture.c @@ -620,10 +620,9 @@ static void rna_def_filter_size_common(StructRNA *srna) { PropertyRNA *prop; - /* XXX: not sure about the name of this, "Min" seems a bit off */ - prop= RNA_def_property(srna, "use_filter", PROP_BOOLEAN, PROP_NONE); + prop= RNA_def_property(srna, "filter_size_minimum", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "imaflag", TEX_FILTER_MIN); - RNA_def_property_ui_text(prop, "Use Filter", "Use Filter Size as a minimal filter value in pixels"); + RNA_def_property_ui_text(prop, "Minimum Filter Size", "Use Filter Size as a minimal filter value in pixels"); RNA_def_property_update(prop, 0, "rna_Texture_update"); prop= RNA_def_property(srna, "filter_size", PROP_FLOAT, PROP_NONE); @@ -1062,7 +1061,7 @@ static void rna_def_texture_image(BlenderRNA *brna) {0, NULL, 0, NULL, NULL}}; static EnumPropertyItem prop_normal_space[] = { - {MTEX_NSPACE_CAMERA, "CAMERA", 0, "Extend", ""}, + {MTEX_NSPACE_CAMERA, "CAMERA", 0, "Camera", ""}, {MTEX_NSPACE_WORLD, "WORLD", 0, "World", ""}, {MTEX_NSPACE_OBJECT, "OBJECT", 0, "Object", ""}, {MTEX_NSPACE_TANGENT, "TANGENT", 0, "Tangent", ""}, @@ -1080,7 +1079,7 @@ static void rna_def_texture_image(BlenderRNA *brna) prop= RNA_def_property(srna, "mipmap_gauss", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "imaflag", TEX_GAUSS_MIP); - RNA_def_property_ui_text(prop, "MIP Map Gauss", "Uses Gauss filter to sample down MIP maps"); + RNA_def_property_ui_text(prop, "MIP Map Gaussian filter", "Uses Gauss filter to sample down MIP maps"); RNA_def_property_update(prop, 0, "rna_Texture_update"); prop= RNA_def_property(srna, "interpolation", PROP_BOOLEAN, PROP_NONE); diff --git a/source/blender/makesrna/intern/rna_ui.c b/source/blender/makesrna/intern/rna_ui.c index 8d6a18dd9c2..1bb7fe720a6 100644 --- a/source/blender/makesrna/intern/rna_ui.c +++ b/source/blender/makesrna/intern/rna_ui.c @@ -591,35 +591,35 @@ static void rna_def_panel(BlenderRNA *brna) RNA_def_property_string_sdna(prop, NULL, "drawname"); /* registration */ - prop= RNA_def_property(srna, "idname", PROP_STRING, PROP_NONE); + prop= RNA_def_property(srna, "bl_idname", PROP_STRING, PROP_NONE); RNA_def_property_string_sdna(prop, NULL, "type->idname"); RNA_def_property_flag(prop, PROP_REGISTER); - prop= RNA_def_property(srna, "label", PROP_STRING, PROP_NONE); + prop= RNA_def_property(srna, "bl_label", PROP_STRING, PROP_NONE); RNA_def_property_string_sdna(prop, NULL, "type->label"); RNA_def_property_flag(prop, PROP_REGISTER); - prop= RNA_def_property(srna, "space_type", PROP_ENUM, PROP_NONE); + prop= RNA_def_property(srna, "bl_space_type", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, "type->space_type"); RNA_def_property_enum_items(prop, space_type_items); RNA_def_property_flag(prop, PROP_REGISTER); - prop= RNA_def_property(srna, "region_type", PROP_ENUM, PROP_NONE); + prop= RNA_def_property(srna, "bl_region_type", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, "type->region_type"); RNA_def_property_enum_items(prop, region_type_items); RNA_def_property_flag(prop, PROP_REGISTER); - prop= RNA_def_property(srna, "context", PROP_STRING, PROP_NONE); + prop= RNA_def_property(srna, "bl_context", PROP_STRING, PROP_NONE); RNA_def_property_string_sdna(prop, NULL, "type->context"); - RNA_def_property_flag(prop, PROP_REGISTER); + RNA_def_property_flag(prop, PROP_REGISTER_OPTIONAL); /* should this be optional? - Campbell */ - prop= RNA_def_property(srna, "default_closed", PROP_BOOLEAN, PROP_NONE); + prop= RNA_def_property(srna, "bl_default_closed", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "type->flag", PNL_DEFAULT_CLOSED); - RNA_def_property_flag(prop, PROP_REGISTER); + RNA_def_property_flag(prop, PROP_REGISTER_OPTIONAL); - prop= RNA_def_property(srna, "show_header", PROP_BOOLEAN, PROP_NONE); + prop= RNA_def_property(srna, "bl_show_header", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_negative_sdna(prop, NULL, "type->flag", PNL_NO_HEADER); - RNA_def_property_flag(prop, PROP_REGISTER); + RNA_def_property_flag(prop, PROP_REGISTER_OPTIONAL); } static void rna_def_header(BlenderRNA *brna) @@ -647,11 +647,11 @@ static void rna_def_header(BlenderRNA *brna) RNA_def_property_struct_type(prop, "UILayout"); /* registration */ - prop= RNA_def_property(srna, "idname", PROP_STRING, PROP_NONE); + prop= RNA_def_property(srna, "bl_idname", PROP_STRING, PROP_NONE); RNA_def_property_string_sdna(prop, NULL, "type->idname"); RNA_def_property_flag(prop, PROP_REGISTER); - prop= RNA_def_property(srna, "space_type", PROP_ENUM, PROP_NONE); + prop= RNA_def_property(srna, "bl_space_type", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, "type->space_type"); RNA_def_property_enum_items(prop, space_type_items); RNA_def_property_flag(prop, PROP_REGISTER); @@ -691,11 +691,11 @@ static void rna_def_menu(BlenderRNA *brna) RNA_def_property_struct_type(prop, "UILayout"); /* registration */ - prop= RNA_def_property(srna, "idname", PROP_STRING, PROP_NONE); + prop= RNA_def_property(srna, "bl_idname", PROP_STRING, PROP_NONE); RNA_def_property_string_sdna(prop, NULL, "type->idname"); RNA_def_property_flag(prop, PROP_REGISTER); - prop= RNA_def_property(srna, "label", PROP_STRING, PROP_NONE); + prop= RNA_def_property(srna, "bl_label", PROP_STRING, PROP_NONE); RNA_def_property_string_sdna(prop, NULL, "type->label"); RNA_def_property_flag(prop, PROP_REGISTER); diff --git a/source/blender/makesrna/intern/rna_wm.c b/source/blender/makesrna/intern/rna_wm.c index e2e50b695fd..39c4c340b97 100644 --- a/source/blender/makesrna/intern/rna_wm.c +++ b/source/blender/makesrna/intern/rna_wm.c @@ -183,8 +183,8 @@ EnumPropertyItem event_type_items[] = { {SLASHKEY, "SLASH", 0, "/", ""}, {BACKSLASHKEY, "BACK_SLASH", 0, "\\", ""}, {EQUALKEY, "EQUAL", 0, "=", ""}, - {LEFTBRACKETKEY, "LEFT_BRACKET", 0, "]", ""}, - {RIGHTBRACKETKEY, "RIGHT_BRACKET", 0, "[", ""}, + {LEFTBRACKETKEY, "LEFT_BRACKET", 0, "[", ""}, + {RIGHTBRACKETKEY, "RIGHT_BRACKET", 0, "]", ""}, {LEFTARROWKEY, "LEFT_ARROW", 0, "Left Arrow", ""}, {DOWNARROWKEY, "DOWN_ARROW", 0, "Down Arrow", ""}, {RIGHTARROWKEY, "RIGHT_ARROW", 0, "Right Arrow", ""}, |