Node socket values now only have soft limits, rather than hard limits, so you
can type in any value, and only when sliding the number value there is a limit. It was already possible to assign any value to a socket with node linking, so this shouldn't cause any new issues. Also raised the limits on the math nodes, with a patch by Agustin Benavidez.
This commit is contained in:
parent
953af01d2a
commit
f469e0652a
@ -687,15 +687,15 @@ static void rna_clamp_value_range(FILE *f, PropertyRNA *prop)
|
||||
if (prop->type == PROP_FLOAT) {
|
||||
FloatPropertyRNA *fprop = (FloatPropertyRNA*)prop;
|
||||
if (fprop->range) {
|
||||
fprintf(f, " float prop_clamp_min, prop_clamp_max;\n");
|
||||
fprintf(f, " %s(ptr, &prop_clamp_min, &prop_clamp_max);\n", rna_function_string(fprop->range));
|
||||
fprintf(f, " float prop_clamp_min = -FLT_MAX, prop_clamp_max = FLT_MAX, prop_soft_min, prop_soft_max;\n");
|
||||
fprintf(f, " %s(ptr, &prop_clamp_min, &prop_clamp_max, &prop_soft_min, &prop_soft_max);\n", rna_function_string(fprop->range));
|
||||
}
|
||||
}
|
||||
else if (prop->type == PROP_INT) {
|
||||
IntPropertyRNA *iprop = (IntPropertyRNA*)prop;
|
||||
if (iprop->range) {
|
||||
fprintf(f, " int prop_clamp_min, prop_clamp_max;\n");
|
||||
fprintf(f, " %s(ptr, &prop_clamp_min, &prop_clamp_max);\n", rna_function_string(iprop->range));
|
||||
fprintf(f, " int prop_clamp_min = INT_MIN, prop_clamp_max = INT_MAX, prop_soft_min, prop_soft_max;\n");
|
||||
fprintf(f, " %s(ptr, &prop_clamp_min, &prop_clamp_max, &prop_soft_min, &prop_soft_max);\n", rna_function_string(iprop->range));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -901,6 +901,7 @@ int RNA_property_array_item_index(PropertyRNA *prop, char name)
|
||||
void RNA_property_int_range(PointerRNA *ptr, PropertyRNA *prop, int *hardmin, int *hardmax)
|
||||
{
|
||||
IntPropertyRNA *iprop = (IntPropertyRNA*)rna_ensure_property(prop);
|
||||
int softmin, softmax;
|
||||
|
||||
if (prop->magic != RNA_MAGIC) {
|
||||
/* attempt to get the local ID values */
|
||||
@ -920,7 +921,10 @@ void RNA_property_int_range(PointerRNA *ptr, PropertyRNA *prop, int *hardmin, in
|
||||
}
|
||||
|
||||
if (iprop->range) {
|
||||
iprop->range(ptr, hardmin, hardmax);
|
||||
*hardmin = INT_MIN;
|
||||
*hardmax = INT_MAX;
|
||||
|
||||
iprop->range(ptr, hardmin, hardmax, &softmin, &softmax);
|
||||
}
|
||||
else {
|
||||
*hardmin = iprop->hardmin;
|
||||
@ -953,14 +957,17 @@ void RNA_property_int_ui_range(PointerRNA *ptr, PropertyRNA *prop, int *softmin,
|
||||
}
|
||||
}
|
||||
|
||||
*softmin = iprop->softmin;
|
||||
*softmax = iprop->softmax;
|
||||
|
||||
if (iprop->range) {
|
||||
iprop->range(ptr, &hardmin, &hardmax);
|
||||
*softmin = MAX2(iprop->softmin, hardmin);
|
||||
*softmax = MIN2(iprop->softmax, hardmax);
|
||||
}
|
||||
else {
|
||||
*softmin = iprop->softmin;
|
||||
*softmax = iprop->softmax;
|
||||
hardmin = INT_MIN;
|
||||
hardmax = INT_MAX;
|
||||
|
||||
iprop->range(ptr, &hardmin, &hardmax, softmin, softmax);
|
||||
|
||||
*softmin = MAX2(*softmin, hardmin);
|
||||
*softmax = MIN2(*softmax, hardmax);
|
||||
}
|
||||
|
||||
*step = iprop->step;
|
||||
@ -969,6 +976,7 @@ void RNA_property_int_ui_range(PointerRNA *ptr, PropertyRNA *prop, int *softmin,
|
||||
void RNA_property_float_range(PointerRNA *ptr, PropertyRNA *prop, float *hardmin, float *hardmax)
|
||||
{
|
||||
FloatPropertyRNA *fprop = (FloatPropertyRNA*)rna_ensure_property(prop);
|
||||
float softmin, softmax;
|
||||
|
||||
if (prop->magic != RNA_MAGIC) {
|
||||
/* attempt to get the local ID values */
|
||||
@ -988,7 +996,10 @@ void RNA_property_float_range(PointerRNA *ptr, PropertyRNA *prop, float *hardmin
|
||||
}
|
||||
|
||||
if (fprop->range) {
|
||||
fprop->range(ptr, hardmin, hardmax);
|
||||
*hardmin = -FLT_MAX;
|
||||
*hardmax = FLT_MAX;
|
||||
|
||||
fprop->range(ptr, hardmin, hardmax, &softmin, &softmax);
|
||||
}
|
||||
else {
|
||||
*hardmin = fprop->hardmin;
|
||||
@ -1025,14 +1036,17 @@ void RNA_property_float_ui_range(PointerRNA *ptr, PropertyRNA *prop, float *soft
|
||||
}
|
||||
}
|
||||
|
||||
*softmin = fprop->softmin;
|
||||
*softmax = fprop->softmax;
|
||||
|
||||
if (fprop->range) {
|
||||
fprop->range(ptr, &hardmin, &hardmax);
|
||||
*softmin = MAX2(fprop->softmin, hardmin);
|
||||
*softmax = MIN2(fprop->softmax, hardmax);
|
||||
}
|
||||
else {
|
||||
*softmin = fprop->softmin;
|
||||
*softmax = fprop->softmax;
|
||||
hardmin = -FLT_MAX;
|
||||
hardmax = FLT_MAX;
|
||||
|
||||
fprop->range(ptr, &hardmin, &hardmax, softmin, softmax);
|
||||
|
||||
*softmin = MAX2(*softmin, hardmin);
|
||||
*softmax = MIN2(*softmax, hardmax);
|
||||
}
|
||||
|
||||
*step = fprop->step;
|
||||
|
@ -180,7 +180,7 @@ static void rna_Action_active_pose_marker_index_set(PointerRNA *ptr, int value)
|
||||
act->active_marker = value+1;
|
||||
}
|
||||
|
||||
static void rna_Action_active_pose_marker_index_range(PointerRNA *ptr, int *min, int *max)
|
||||
static void rna_Action_active_pose_marker_index_range(PointerRNA *ptr, int *min, int *max, int *softmin, int *softmax)
|
||||
{
|
||||
bAction *act = (bAction*)ptr->data;
|
||||
|
||||
|
@ -321,7 +321,7 @@ static void rna_KeyingSet_active_ksPath_index_set(PointerRNA *ptr, int value)
|
||||
ks->active_path = value+1;
|
||||
}
|
||||
|
||||
static void rna_KeyingSet_active_ksPath_index_range(PointerRNA *ptr, int *min, int *max)
|
||||
static void rna_KeyingSet_active_ksPath_index_range(PointerRNA *ptr, int *min, int *max, int *softmin, int *softmax)
|
||||
{
|
||||
KeyingSet *ks = (KeyingSet *)ptr->data;
|
||||
|
||||
|
@ -151,7 +151,7 @@ static PointerRNA rna_BoidState_active_boid_rule_get(PointerRNA *ptr)
|
||||
}
|
||||
return rna_pointer_inherit_refine(ptr, &RNA_BoidRule, NULL);
|
||||
}
|
||||
static void rna_BoidState_active_boid_rule_index_range(PointerRNA *ptr, int *min, int *max)
|
||||
static void rna_BoidState_active_boid_rule_index_range(PointerRNA *ptr, int *min, int *max, int *softmin, int *softmax)
|
||||
{
|
||||
BoidState *state = (BoidState*)ptr->data;
|
||||
*min = 0;
|
||||
@ -217,7 +217,7 @@ static PointerRNA rna_BoidSettings_active_boid_state_get(PointerRNA *ptr)
|
||||
}
|
||||
return rna_pointer_inherit_refine(ptr, &RNA_BoidState, NULL);
|
||||
}
|
||||
static void rna_BoidSettings_active_boid_state_index_range(PointerRNA *ptr, int *min, int *max)
|
||||
static void rna_BoidSettings_active_boid_state_index_range(PointerRNA *ptr, int *min, int *max, int *softmin, int *softmax)
|
||||
{
|
||||
BoidSettings *boids = (BoidSettings*)ptr->data;
|
||||
*min = 0;
|
||||
|
@ -100,7 +100,7 @@ static void rna_CurveMapping_white_level_set(PointerRNA *ptr, const float *value
|
||||
curvemapping_set_black_white(cumap, NULL, NULL);
|
||||
}
|
||||
|
||||
static void rna_CurveMapping_clipminx_range(PointerRNA *ptr, float *min, float *max)
|
||||
static void rna_CurveMapping_clipminx_range(PointerRNA *ptr, float *min, float *max, float *softmin, float *softmax)
|
||||
{
|
||||
CurveMapping *cumap = (CurveMapping*)ptr->data;
|
||||
|
||||
@ -108,7 +108,7 @@ static void rna_CurveMapping_clipminx_range(PointerRNA *ptr, float *min, float *
|
||||
*max = cumap->clipr.xmax;
|
||||
}
|
||||
|
||||
static void rna_CurveMapping_clipminy_range(PointerRNA *ptr, float *min, float *max)
|
||||
static void rna_CurveMapping_clipminy_range(PointerRNA *ptr, float *min, float *max, float *softmin, float *softmax)
|
||||
{
|
||||
CurveMapping *cumap = (CurveMapping*)ptr->data;
|
||||
|
||||
@ -116,7 +116,7 @@ static void rna_CurveMapping_clipminy_range(PointerRNA *ptr, float *min, float *
|
||||
*max = cumap->clipr.ymax;
|
||||
}
|
||||
|
||||
static void rna_CurveMapping_clipmaxx_range(PointerRNA *ptr, float *min, float *max)
|
||||
static void rna_CurveMapping_clipmaxx_range(PointerRNA *ptr, float *min, float *max, float *softmin, float *softmax)
|
||||
{
|
||||
CurveMapping *cumap = (CurveMapping*)ptr->data;
|
||||
|
||||
@ -124,7 +124,7 @@ static void rna_CurveMapping_clipmaxx_range(PointerRNA *ptr, float *min, float *
|
||||
*max = 100.0f;
|
||||
}
|
||||
|
||||
static void rna_CurveMapping_clipmaxy_range(PointerRNA *ptr, float *min, float *max)
|
||||
static void rna_CurveMapping_clipmaxy_range(PointerRNA *ptr, float *min, float *max, float *softmin, float *softmax)
|
||||
{
|
||||
CurveMapping *cumap = (CurveMapping*)ptr->data;
|
||||
|
||||
|
@ -307,7 +307,7 @@ static EnumPropertyItem *rna_Constraint_target_space_itemf(bContext *UNUSED(C),
|
||||
return space_object_items;
|
||||
}
|
||||
|
||||
static void rna_ActionConstraint_minmax_range(PointerRNA *ptr, float *min, float *max)
|
||||
static void rna_ActionConstraint_minmax_range(PointerRNA *ptr, float *min, float *max, float *softmin, float *softmax)
|
||||
{
|
||||
bConstraint *con = (bConstraint*)ptr->data;
|
||||
bActionConstraint *acon = (bActionConstraint *)con->data;
|
||||
|
@ -248,7 +248,7 @@ static void rna_Curve_texspace_size_set(PointerRNA *ptr, const float *values)
|
||||
copy_v3_v3(cu->size, values);
|
||||
}
|
||||
|
||||
static void rna_Curve_material_index_range(PointerRNA *ptr, int *min, int *max)
|
||||
static void rna_Curve_material_index_range(PointerRNA *ptr, int *min, int *max, int *softmin, int *softmax)
|
||||
{
|
||||
Curve *cu = (Curve*)ptr->id.data;
|
||||
*min = 0;
|
||||
@ -256,7 +256,7 @@ static void rna_Curve_material_index_range(PointerRNA *ptr, int *min, int *max)
|
||||
*max = MAX2(0, *max);
|
||||
}
|
||||
|
||||
static void rna_Curve_active_textbox_index_range(PointerRNA *ptr, int *min, int *max)
|
||||
static void rna_Curve_active_textbox_index_range(PointerRNA *ptr, int *min, int *max, int *softmin, int *softmax)
|
||||
{
|
||||
Curve *cu = (Curve*)ptr->id.data;
|
||||
*min = 0;
|
||||
|
@ -186,7 +186,7 @@ static void rna_Surface_active_point_index_set(struct PointerRNA *ptr, int value
|
||||
return;
|
||||
}
|
||||
|
||||
static void rna_Surface_active_point_range(PointerRNA *ptr, int *min, int *max)
|
||||
static void rna_Surface_active_point_range(PointerRNA *ptr, int *min, int *max, int *softmin, int *softmax)
|
||||
{
|
||||
DynamicPaintCanvasSettings *canvas = (DynamicPaintCanvasSettings*)ptr->data;
|
||||
|
||||
|
@ -453,7 +453,7 @@ static void rna_FModifier_active_set(PointerRNA *ptr, int UNUSED(value))
|
||||
fm->flag |= FMODIFIER_FLAG_ACTIVE;
|
||||
}
|
||||
|
||||
static void rna_FModifier_start_frame_range(PointerRNA *ptr, float *min, float *max)
|
||||
static void rna_FModifier_start_frame_range(PointerRNA *ptr, float *min, float *max, float *softmin, float *softmax)
|
||||
{
|
||||
FModifier *fcm = (FModifier*)ptr->data;
|
||||
|
||||
@ -461,7 +461,7 @@ static void rna_FModifier_start_frame_range(PointerRNA *ptr, float *min, float *
|
||||
*max = (fcm->flag & FMODIFIER_FLAG_RANGERESTRICT)? fcm->efra : MAXFRAMEF;
|
||||
}
|
||||
|
||||
static void rna_FModifier_end_frame_range(PointerRNA *ptr, float *min, float *max)
|
||||
static void rna_FModifier_end_frame_range(PointerRNA *ptr, float *min, float *max, float *softmin, float *softmax)
|
||||
{
|
||||
FModifier *fcm = (FModifier*)ptr->data;
|
||||
|
||||
@ -469,7 +469,7 @@ static void rna_FModifier_end_frame_range(PointerRNA *ptr, float *min, float *ma
|
||||
*max = MAXFRAMEF;
|
||||
}
|
||||
|
||||
static void rna_FModifier_blending_range(PointerRNA *ptr, float *min, float *max)
|
||||
static void rna_FModifier_blending_range(PointerRNA *ptr, float *min, float *max, float *softmin, float *softmax)
|
||||
{
|
||||
FModifier *fcm = (FModifier*)ptr->data;
|
||||
|
||||
@ -520,7 +520,7 @@ static void rna_FModifierGenerator_coefficients_set(PointerRNA *ptr, const float
|
||||
memcpy(gen->coefficients, values, gen->arraysize * sizeof(float));
|
||||
}
|
||||
|
||||
static void rna_FModifierLimits_minx_range(PointerRNA *ptr, float *min, float *max)
|
||||
static void rna_FModifierLimits_minx_range(PointerRNA *ptr, float *min, float *max, float *softmin, float *softmax)
|
||||
{
|
||||
FModifier *fcm = (FModifier*)ptr->data;
|
||||
FMod_Limits *data = fcm->data;
|
||||
@ -529,7 +529,7 @@ static void rna_FModifierLimits_minx_range(PointerRNA *ptr, float *min, float *m
|
||||
*max = (data->flag & FCM_LIMIT_XMAX)? data->rect.xmax : MAXFRAMEF;
|
||||
}
|
||||
|
||||
static void rna_FModifierLimits_maxx_range(PointerRNA *ptr, float *min, float *max)
|
||||
static void rna_FModifierLimits_maxx_range(PointerRNA *ptr, float *min, float *max, float *softmin, float *softmax)
|
||||
{
|
||||
FModifier *fcm = (FModifier*)ptr->data;
|
||||
FMod_Limits *data = fcm->data;
|
||||
@ -538,7 +538,7 @@ static void rna_FModifierLimits_maxx_range(PointerRNA *ptr, float *min, float *m
|
||||
*max = MAXFRAMEF;
|
||||
}
|
||||
|
||||
static void rna_FModifierLimits_miny_range(PointerRNA *ptr, float *min, float *max)
|
||||
static void rna_FModifierLimits_miny_range(PointerRNA *ptr, float *min, float *max, float *softmin, float *softmax)
|
||||
{
|
||||
FModifier *fcm = (FModifier*)ptr->data;
|
||||
FMod_Limits *data = fcm->data;
|
||||
@ -547,7 +547,7 @@ static void rna_FModifierLimits_miny_range(PointerRNA *ptr, float *min, float *m
|
||||
*max = (data->flag & FCM_LIMIT_YMAX)? data->rect.ymax : FLT_MAX;
|
||||
}
|
||||
|
||||
static void rna_FModifierLimits_maxy_range(PointerRNA *ptr, float *min, float *max)
|
||||
static void rna_FModifierLimits_maxy_range(PointerRNA *ptr, float *min, float *max, float *softmin, float *softmax)
|
||||
{
|
||||
FModifier *fcm = (FModifier*)ptr->data;
|
||||
FMod_Limits *data = fcm->data;
|
||||
@ -557,7 +557,7 @@ static void rna_FModifierLimits_maxy_range(PointerRNA *ptr, float *min, float *m
|
||||
}
|
||||
|
||||
|
||||
static void rna_FModifierStepped_start_frame_range(PointerRNA *ptr, float *min, float *max)
|
||||
static void rna_FModifierStepped_start_frame_range(PointerRNA *ptr, float *min, float *max, float *softmin, float *softmax)
|
||||
{
|
||||
FModifier *fcm = (FModifier*)ptr->data;
|
||||
FMod_Stepped *data = fcm->data;
|
||||
@ -566,7 +566,7 @@ static void rna_FModifierStepped_start_frame_range(PointerRNA *ptr, float *min,
|
||||
*max = (data->flag & FCM_STEPPED_NO_AFTER)? data->end_frame : MAXFRAMEF;
|
||||
}
|
||||
|
||||
static void rna_FModifierStepped_end_frame_range(PointerRNA *ptr, float *min, float *max)
|
||||
static void rna_FModifierStepped_end_frame_range(PointerRNA *ptr, float *min, float *max, float *softmin, float *softmax)
|
||||
{
|
||||
FModifier *fcm = (FModifier*)ptr->data;
|
||||
FMod_Stepped *data = fcm->data;
|
||||
|
@ -77,12 +77,12 @@ typedef int (*PropIntGetFunc)(struct PointerRNA *ptr);
|
||||
typedef void (*PropIntSetFunc)(struct PointerRNA *ptr, int value);
|
||||
typedef void (*PropIntArrayGetFunc)(struct PointerRNA *ptr, int *values);
|
||||
typedef void (*PropIntArraySetFunc)(struct PointerRNA *ptr, const int *values);
|
||||
typedef void (*PropIntRangeFunc)(struct PointerRNA *ptr, int *min, int *max);
|
||||
typedef void (*PropIntRangeFunc)(struct PointerRNA *ptr, int *min, int *max, int *softmin, int *softmax);
|
||||
typedef float (*PropFloatGetFunc)(struct PointerRNA *ptr);
|
||||
typedef void (*PropFloatSetFunc)(struct PointerRNA *ptr, float value);
|
||||
typedef void (*PropFloatArrayGetFunc)(struct PointerRNA *ptr, float *values);
|
||||
typedef void (*PropFloatArraySetFunc)(struct PointerRNA *ptr, const float *values);
|
||||
typedef void (*PropFloatRangeFunc)(struct PointerRNA *ptr, float *min, float *max);
|
||||
typedef void (*PropFloatRangeFunc)(struct PointerRNA *ptr, float *min, float *max, float *softmin, float *softmax);
|
||||
typedef void (*PropStringGetFunc)(struct PointerRNA *ptr, char *value);
|
||||
typedef int (*PropStringLengthFunc)(struct PointerRNA *ptr);
|
||||
typedef void (*PropStringSetFunc)(struct PointerRNA *ptr, const char *value);
|
||||
|
@ -93,7 +93,7 @@ static void rna_ShapeKey_value_set(PointerRNA *ptr, float value)
|
||||
data->curval = value;
|
||||
}
|
||||
|
||||
static void rna_ShapeKey_value_range(PointerRNA *ptr, float *min, float *max)
|
||||
static void rna_ShapeKey_value_range(PointerRNA *ptr, float *min, float *max, float *softmin, float *softmax)
|
||||
{
|
||||
KeyBlock *data = (KeyBlock*)ptr->data;
|
||||
|
||||
@ -104,7 +104,7 @@ static void rna_ShapeKey_value_range(PointerRNA *ptr, float *min, float *max)
|
||||
/* epsilon for how close one end of shapekey range can get to the other */
|
||||
#define SHAPEKEY_SLIDER_TOL 0.001f
|
||||
|
||||
static void rna_ShapeKey_slider_min_range(PointerRNA *ptr, float *min, float *max)
|
||||
static void rna_ShapeKey_slider_min_range(PointerRNA *ptr, float *min, float *max, float *softmin, float *softmax)
|
||||
{
|
||||
KeyBlock *data = (KeyBlock*)ptr->data;
|
||||
|
||||
@ -115,14 +115,14 @@ static void rna_ShapeKey_slider_min_range(PointerRNA *ptr, float *min, float *ma
|
||||
static void rna_ShapeKey_slider_min_set(PointerRNA *ptr, float value)
|
||||
{
|
||||
KeyBlock *data = (KeyBlock*)ptr->data;
|
||||
float min, max;
|
||||
float min, max, softmin, softmax;
|
||||
|
||||
rna_ShapeKey_slider_min_range(ptr, &min, &max);
|
||||
rna_ShapeKey_slider_min_range(ptr, &min, &max, &softmin, &softmax);
|
||||
CLAMP(value, min, max);
|
||||
data->slidermin = value;
|
||||
}
|
||||
|
||||
static void rna_ShapeKey_slider_max_range(PointerRNA *ptr, float *min, float *max)
|
||||
static void rna_ShapeKey_slider_max_range(PointerRNA *ptr, float *min, float *max, float *softmin, float *softmax)
|
||||
{
|
||||
KeyBlock *data = (KeyBlock*)ptr->data;
|
||||
|
||||
@ -133,9 +133,9 @@ static void rna_ShapeKey_slider_max_range(PointerRNA *ptr, float *min, float *ma
|
||||
static void rna_ShapeKey_slider_max_set(PointerRNA *ptr, float value)
|
||||
{
|
||||
KeyBlock *data = (KeyBlock*)ptr->data;
|
||||
float min, max;
|
||||
float min, max, softmin, softmax;
|
||||
|
||||
rna_ShapeKey_slider_max_range(ptr, &min, &max);
|
||||
rna_ShapeKey_slider_max_range(ptr, &min, &max, &softmin, &softmax);
|
||||
CLAMP(value, min, max);
|
||||
data->slidermax = value;
|
||||
}
|
||||
|
@ -195,7 +195,7 @@ static void rna_Material_active_node_material_set(PointerRNA *ptr, PointerRNA va
|
||||
nodeSetActiveID(ma->nodetree, ID_MA, &ma_act->id);
|
||||
}
|
||||
|
||||
static void rna_MaterialStrand_start_size_range(PointerRNA *ptr, float *min, float *max)
|
||||
static void rna_MaterialStrand_start_size_range(PointerRNA *ptr, float *min, float *max, float *softmin, float *softmax)
|
||||
{
|
||||
Material *ma = (Material*)ptr->id.data;
|
||||
|
||||
@ -209,7 +209,7 @@ static void rna_MaterialStrand_start_size_range(PointerRNA *ptr, float *min, flo
|
||||
}
|
||||
}
|
||||
|
||||
static void rna_MaterialStrand_end_size_range(PointerRNA *ptr, float *min, float *max)
|
||||
static void rna_MaterialStrand_end_size_range(PointerRNA *ptr, float *min, float *max, float *softmin, float *softmax)
|
||||
{
|
||||
Material *ma = (Material*)ptr->id.data;
|
||||
|
||||
|
@ -937,7 +937,7 @@ static void rna_MeshPoly_vertices_set(PointerRNA *ptr, const int *values)
|
||||
}
|
||||
}
|
||||
|
||||
static void rna_MeshPoly_material_index_range(PointerRNA *ptr, int *min, int *max)
|
||||
static void rna_MeshPoly_material_index_range(PointerRNA *ptr, int *min, int *max, int *softmin, int *softmax)
|
||||
{
|
||||
Mesh *me = rna_mesh(ptr);
|
||||
*min = 0;
|
||||
|
@ -64,7 +64,8 @@
|
||||
return data ? CustomData_number_of_layers(data, layer_type) : 0; \
|
||||
} \
|
||||
/* index range */ \
|
||||
static void rna_Mesh_##collection_name##_index_range(PointerRNA *ptr, int *min, int *max) \
|
||||
static void rna_Mesh_##collection_name##_index_range(PointerRNA *ptr, int *min, int *max, \
|
||||
int *softmin, int *softmax) \
|
||||
{ \
|
||||
CustomData *data = rna_mesh_##customdata_type(ptr); \
|
||||
*min = 0; \
|
||||
|
@ -470,7 +470,7 @@ static void rna_WeightVGModifier_mask_uvlayer_set(PointerRNA *ptr, const char *v
|
||||
}
|
||||
}
|
||||
|
||||
static void rna_MultiresModifier_level_range(PointerRNA *ptr, int *min, int *max)
|
||||
static void rna_MultiresModifier_level_range(PointerRNA *ptr, int *min, int *max, int *softmin, int *softmax)
|
||||
{
|
||||
MultiresModifierData *mmd = (MultiresModifierData*)ptr->data;
|
||||
|
||||
|
@ -436,28 +436,28 @@ static void rna_NodeLink_update(Main *bmain, Scene *scene, PointerRNA *ptr)
|
||||
}
|
||||
#endif
|
||||
|
||||
static void rna_NodeSocketInt_range(PointerRNA *ptr, int *min, int *max)
|
||||
static void rna_NodeSocketInt_range(PointerRNA *ptr, int *min, int *max, int *softmin, int *softmax)
|
||||
{
|
||||
bNodeSocket *sock = (bNodeSocket*)ptr->data;
|
||||
bNodeSocketValueInt *val = (bNodeSocketValueInt*)sock->default_value;
|
||||
*min = val->min;
|
||||
*max = val->max;
|
||||
*softmin = val->min;
|
||||
*softmax = val->max;
|
||||
}
|
||||
|
||||
static void rna_NodeSocketFloat_range(PointerRNA *ptr, float *min, float *max)
|
||||
static void rna_NodeSocketFloat_range(PointerRNA *ptr, float *min, float *max, float *softmin, float *softmax)
|
||||
{
|
||||
bNodeSocket *sock = (bNodeSocket*)ptr->data;
|
||||
bNodeSocketValueFloat *val = (bNodeSocketValueFloat*)sock->default_value;
|
||||
*min = val->min;
|
||||
*max = val->max;
|
||||
*softmin = val->min;
|
||||
*softmax = val->max;
|
||||
}
|
||||
|
||||
static void rna_NodeSocketVector_range(PointerRNA *ptr, float *min, float *max)
|
||||
static void rna_NodeSocketVector_range(PointerRNA *ptr, float *min, float *max, float *softmin, float *softmax)
|
||||
{
|
||||
bNodeSocket *sock = (bNodeSocket*)ptr->data;
|
||||
bNodeSocketValueVector *val = (bNodeSocketValueVector*)sock->default_value;
|
||||
*min = val->min;
|
||||
*max = val->max;
|
||||
*softmin = val->min;
|
||||
*softmax = val->max;
|
||||
}
|
||||
|
||||
static void rna_Node_image_layer_update(Main *bmain, Scene *scene, PointerRNA *ptr)
|
||||
|
@ -506,7 +506,7 @@ static void rna_Object_active_vertex_group_index_set(PointerRNA *ptr, int value)
|
||||
ob->actdef = value+1;
|
||||
}
|
||||
|
||||
static void rna_Object_active_vertex_group_index_range(PointerRNA *ptr, int *min, int *max)
|
||||
static void rna_Object_active_vertex_group_index_range(PointerRNA *ptr, int *min, int *max, int *softmin, int *softmax)
|
||||
{
|
||||
Object *ob = (Object*)ptr->id.data;
|
||||
|
||||
@ -618,7 +618,7 @@ static void rna_Object_active_material_index_set(PointerRNA *ptr, int value)
|
||||
}
|
||||
}
|
||||
|
||||
static void rna_Object_active_material_index_range(PointerRNA *ptr, int *min, int *max)
|
||||
static void rna_Object_active_material_index_range(PointerRNA *ptr, int *min, int *max, int *softmin, int *softmax)
|
||||
{
|
||||
Object *ob = (Object*)ptr->id.data;
|
||||
*min = 0;
|
||||
@ -643,7 +643,7 @@ static void rna_Object_active_material_set(PointerRNA *ptr, PointerRNA value)
|
||||
assign_material(ob, value.data, ob->actcol);
|
||||
}
|
||||
|
||||
static void rna_Object_active_particle_system_index_range(PointerRNA *ptr, int *min, int *max)
|
||||
static void rna_Object_active_particle_system_index_range(PointerRNA *ptr, int *min, int *max, int *softmin, int *softmax)
|
||||
{
|
||||
Object *ob = (Object*)ptr->id.data;
|
||||
*min = 0;
|
||||
@ -1066,7 +1066,7 @@ static void rna_GameObjectSettings_used_state_get(PointerRNA *ptr, int *values)
|
||||
}
|
||||
}
|
||||
|
||||
static void rna_Object_active_shape_key_index_range(PointerRNA *ptr, int *min, int *max)
|
||||
static void rna_Object_active_shape_key_index_range(PointerRNA *ptr, int *min, int *max, int *softmin, int *softmax)
|
||||
{
|
||||
Object *ob = (Object*)ptr->id.data;
|
||||
Key *key = ob_get_key(ob);
|
||||
|
@ -225,7 +225,7 @@ static void rna_Cache_list_begin(CollectionPropertyIterator *iter, PointerRNA *p
|
||||
|
||||
rna_iterator_listbase_begin(iter, &lb, NULL);
|
||||
}
|
||||
static void rna_Cache_active_point_cache_index_range(PointerRNA *ptr, int *min, int *max)
|
||||
static void rna_Cache_active_point_cache_index_range(PointerRNA *ptr, int *min, int *max, int *softmin, int *softmax)
|
||||
{
|
||||
Object *ob = ptr->id.data;
|
||||
PointCache *cache = ptr->data;
|
||||
@ -289,7 +289,7 @@ static void rna_Cache_active_point_cache_index_set(struct PointerRNA *ptr, int v
|
||||
BLI_freelistN(&pidlist);
|
||||
}
|
||||
|
||||
static void rna_PointCache_frame_step_range(PointerRNA *ptr, int *min, int *max)
|
||||
static void rna_PointCache_frame_step_range(PointerRNA *ptr, int *min, int *max, int *softmin, int *softmax)
|
||||
{
|
||||
Object *ob = ptr->id.data;
|
||||
PointCache *cache = ptr->data;
|
||||
|
@ -470,7 +470,7 @@ static float rna_PartSetting_linelentail_get(struct PointerRNA *ptr)
|
||||
ParticleSettings *settings = (ParticleSettings*)ptr->data;
|
||||
return settings->draw_line[0];
|
||||
}
|
||||
static void rna_PartSetting_pathstartend_range(PointerRNA *ptr, float *min, float *max)
|
||||
static void rna_PartSetting_pathstartend_range(PointerRNA *ptr, float *min, float *max, float *softmin, float *softmax)
|
||||
{
|
||||
ParticleSettings *settings = (ParticleSettings*)ptr->data;
|
||||
|
||||
@ -526,7 +526,7 @@ static PointerRNA rna_ParticleSystem_active_particle_target_get(PointerRNA *ptr)
|
||||
}
|
||||
return rna_pointer_inherit_refine(ptr, &RNA_ParticleTarget, NULL);
|
||||
}
|
||||
static void rna_ParticleSystem_active_particle_target_index_range(PointerRNA *ptr, int *min, int *max)
|
||||
static void rna_ParticleSystem_active_particle_target_index_range(PointerRNA *ptr, int *min, int *max, int *softmin, int *softmax)
|
||||
{
|
||||
ParticleSystem *psys = (ParticleSystem*)ptr->data;
|
||||
*min = 0;
|
||||
@ -666,7 +666,7 @@ static PointerRNA rna_ParticleDupliWeight_active_get(PointerRNA *ptr)
|
||||
}
|
||||
return rna_pointer_inherit_refine(ptr, &RNA_ParticleTarget, NULL);
|
||||
}
|
||||
static void rna_ParticleDupliWeight_active_index_range(PointerRNA *ptr, int *min, int *max)
|
||||
static void rna_ParticleDupliWeight_active_index_range(PointerRNA *ptr, int *min, int *max, int *softmin, int *softmax)
|
||||
{
|
||||
ParticleSettings *part = (ParticleSettings*)ptr->id.data;
|
||||
*min = 0;
|
||||
|
@ -365,7 +365,7 @@ static void rna_PoseChannel_bone_group_index_set(PointerRNA *ptr, int value)
|
||||
pchan->agrp_index = value+1;
|
||||
}
|
||||
|
||||
static void rna_PoseChannel_bone_group_index_range(PointerRNA *ptr, int *min, int *max)
|
||||
static void rna_PoseChannel_bone_group_index_range(PointerRNA *ptr, int *min, int *max, int *softmin, int *softmax)
|
||||
{
|
||||
Object *ob = (Object*)ptr->id.data;
|
||||
bPose *pose = (ob) ? ob->pose : NULL;
|
||||
@ -404,7 +404,7 @@ static void rna_Pose_active_bone_group_index_set(PointerRNA *ptr, int value)
|
||||
pose->active_group = value+1;
|
||||
}
|
||||
|
||||
static void rna_Pose_active_bone_group_index_range(PointerRNA *ptr, int *min, int *max)
|
||||
static void rna_Pose_active_bone_group_index_range(PointerRNA *ptr, int *min, int *max, int *softmin, int *softmax)
|
||||
{
|
||||
bPose *pose = (bPose*)ptr->data;
|
||||
|
||||
|
@ -962,7 +962,7 @@ static void rna_RenderSettings_active_layer_index_set(PointerRNA *ptr, int value
|
||||
rd->actlay = value;
|
||||
}
|
||||
|
||||
static void rna_RenderSettings_active_layer_index_range(PointerRNA *ptr, int *min, int *max)
|
||||
static void rna_RenderSettings_active_layer_index_range(PointerRNA *ptr, int *min, int *max, int *softmin, int *softmax)
|
||||
{
|
||||
RenderData *rd = (RenderData*)ptr->data;
|
||||
|
||||
|
@ -776,7 +776,7 @@ static void rna_ConsoleLine_body_set(PointerRNA *ptr, const char *value)
|
||||
ci->cursor = len;
|
||||
}
|
||||
|
||||
static void rna_ConsoleLine_cursor_index_range(PointerRNA *ptr, int *min, int *max)
|
||||
static void rna_ConsoleLine_cursor_index_range(PointerRNA *ptr, int *min, int *max, int *softmin, int *softmax)
|
||||
{
|
||||
ConsoleLine *ci = (ConsoleLine*)ptr->data;
|
||||
|
||||
|
@ -128,7 +128,7 @@ static void rna_tracking_active_object_index_set(PointerRNA *ptr, int value)
|
||||
clip->tracking.objectnr = value;
|
||||
}
|
||||
|
||||
static void rna_tracking_active_object_index_range(PointerRNA *ptr, int *min, int *max)
|
||||
static void rna_tracking_active_object_index_range(PointerRNA *ptr, int *min, int *max, int *softmin, int *softmax)
|
||||
{
|
||||
MovieClip *clip = (MovieClip*)ptr->id.data;
|
||||
|
||||
@ -302,7 +302,7 @@ static void rna_tracking_stabTracks_active_index_set(PointerRNA *ptr, int value)
|
||||
clip->tracking.stabilization.act_track = value;
|
||||
}
|
||||
|
||||
static void rna_tracking_stabTracks_active_index_range(PointerRNA *ptr, int *min, int *max)
|
||||
static void rna_tracking_stabTracks_active_index_range(PointerRNA *ptr, int *min, int *max, int *softmin, int *softmax)
|
||||
{
|
||||
MovieClip *clip = (MovieClip*)ptr->id.data;
|
||||
|
||||
|
@ -35,8 +35,8 @@
|
||||
|
||||
/* **************** SCALAR MATH ******************** */
|
||||
static bNodeSocketTemplate sh_node_math_in[]= {
|
||||
{ SOCK_FLOAT, 1, "Value", 0.5f, 0.5f, 0.5f, 1.0f, -100.0f, 100.0f, PROP_NONE},
|
||||
{ SOCK_FLOAT, 1, "Value", 0.5f, 0.5f, 0.5f, 1.0f, -100.0f, 100.0f, PROP_NONE},
|
||||
{ SOCK_FLOAT, 1, "Value", 0.5f, 0.5f, 0.5f, 1.0f, -10000.0f, 10000.0f, PROP_NONE},
|
||||
{ SOCK_FLOAT, 1, "Value", 0.5f, 0.5f, 0.5f, 1.0f, -10000.0f, 10000.0f, PROP_NONE},
|
||||
{ -1, 0, "" }
|
||||
};
|
||||
|
||||
|
@ -36,8 +36,8 @@
|
||||
|
||||
/* **************** VECTOR MATH ******************** */
|
||||
static bNodeSocketTemplate sh_node_vect_math_in[]= {
|
||||
{ SOCK_VECTOR, 1, "Vector", 0.5f, 0.5f, 0.5f, 1.0f, 0.0f, 1.0f, PROP_NONE},
|
||||
{ SOCK_VECTOR, 1, "Vector", 0.5f, 0.5f, 0.5f, 1.0f, 0.0f, 1.0f, PROP_NONE},
|
||||
{ SOCK_VECTOR, 1, "Vector", 0.5f, 0.5f, 0.5f, 1.0f, -10000.0f, 10000.0f, PROP_NONE},
|
||||
{ SOCK_VECTOR, 1, "Vector", 0.5f, 0.5f, 0.5f, 1.0f, -10000.0f, 10000.0f, PROP_NONE},
|
||||
{ -1, 0, "" }
|
||||
};
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user