diff options
author | Hans Goudey <h.goudey@me.com> | 2021-06-10 19:02:23 +0300 |
---|---|---|
committer | Hans Goudey <h.goudey@me.com> | 2021-06-10 19:02:23 +0300 |
commit | 45f32b43fc1c04b002246bb3d284a6adf1e2bb73 (patch) | |
tree | 05636bad05da792e27cb7c6025bb44c6db9d9e74 /source/blender/makesrna | |
parent | 12bf0af064e8bfb4f36d4f58c3c2aa43139d65d1 (diff) | |
parent | 7b62a542308db63da0e32dbacef4030a1b939b6e (diff) |
Merge branch 'master' into temp-geometry-nodes-curve-deform-node
Diffstat (limited to 'source/blender/makesrna')
-rw-r--r-- | source/blender/makesrna/RNA_types.h | 24 | ||||
-rw-r--r-- | source/blender/makesrna/intern/makesrna.c | 4 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_nodetree.c | 6 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_rna.c | 11 |
4 files changed, 32 insertions, 13 deletions
diff --git a/source/blender/makesrna/RNA_types.h b/source/blender/makesrna/RNA_types.h index 4a6d6dddec7..8e1cfafcc42 100644 --- a/source/blender/makesrna/RNA_types.h +++ b/source/blender/makesrna/RNA_types.h @@ -82,17 +82,18 @@ typedef enum PropertyType { /* also update rna_property_subtype_unit when you change this */ typedef enum PropertyUnit { PROP_UNIT_NONE = (0 << 16), - PROP_UNIT_LENGTH = (1 << 16), /* m */ - PROP_UNIT_AREA = (2 << 16), /* m^2 */ - PROP_UNIT_VOLUME = (3 << 16), /* m^3 */ - PROP_UNIT_MASS = (4 << 16), /* kg */ - PROP_UNIT_ROTATION = (5 << 16), /* radians */ - PROP_UNIT_TIME = (6 << 16), /* frame */ - PROP_UNIT_VELOCITY = (7 << 16), /* m/s */ - PROP_UNIT_ACCELERATION = (8 << 16), /* m/(s^2) */ - PROP_UNIT_CAMERA = (9 << 16), /* mm */ - PROP_UNIT_POWER = (10 << 16), /* W */ - PROP_UNIT_TEMPERATURE = (11 << 16), /* C */ + PROP_UNIT_LENGTH = (1 << 16), /* m */ + PROP_UNIT_AREA = (2 << 16), /* m^2 */ + PROP_UNIT_VOLUME = (3 << 16), /* m^3 */ + PROP_UNIT_MASS = (4 << 16), /* kg */ + PROP_UNIT_ROTATION = (5 << 16), /* radians */ + PROP_UNIT_TIME = (6 << 16), /* frame */ + PROP_UNIT_TIME_ABSOLUTE = (7 << 16), /* time in seconds (independent of scene) */ + PROP_UNIT_VELOCITY = (8 << 16), /* m/s */ + PROP_UNIT_ACCELERATION = (9 << 16), /* m/(s^2) */ + PROP_UNIT_CAMERA = (10 << 16), /* mm */ + PROP_UNIT_POWER = (11 << 16), /* W */ + PROP_UNIT_TEMPERATURE = (12 << 16), /* C */ } PropertyUnit; /** @@ -157,6 +158,7 @@ typedef enum PropertySubType { PROP_FACTOR = 15, PROP_ANGLE = 16 | PROP_UNIT_ROTATION, PROP_TIME = 17 | PROP_UNIT_TIME, + PROP_TIME_ABSOLUTE = 17 | PROP_UNIT_TIME_ABSOLUTE, /** Distance in 3d space, don't use for pixel distance for eg. */ PROP_DISTANCE = 18 | PROP_UNIT_LENGTH, PROP_DISTANCE_CAMERA = 19 | PROP_UNIT_CAMERA, diff --git a/source/blender/makesrna/intern/makesrna.c b/source/blender/makesrna/intern/makesrna.c index efe12114d55..7a9cfa79324 100644 --- a/source/blender/makesrna/intern/makesrna.c +++ b/source/blender/makesrna/intern/makesrna.c @@ -3201,6 +3201,8 @@ static const char *rna_property_subtypename(PropertySubType type) return "PROP_ANGLE"; case PROP_TIME: return "PROP_TIME"; + case PROP_TIME_ABSOLUTE: + return "PROP_TIME_ABSOLUTE"; case PROP_DISTANCE: return "PROP_DISTANCE"; case PROP_DISTANCE_CAMERA: @@ -3266,6 +3268,8 @@ static const char *rna_property_subtype_unit(PropertySubType type) return "PROP_UNIT_ROTATION"; case PROP_UNIT_TIME: return "PROP_UNIT_TIME"; + case PROP_UNIT_TIME_ABSOLUTE: + return "PROP_UNIT_TIME_ABSOLUTE"; case PROP_UNIT_VELOCITY: return "PROP_UNIT_VELOCITY"; case PROP_UNIT_ACCELERATION: diff --git a/source/blender/makesrna/intern/rna_nodetree.c b/source/blender/makesrna/intern/rna_nodetree.c index 50c38645ee6..17d60de9c1b 100644 --- a/source/blender/makesrna/intern/rna_nodetree.c +++ b/source/blender/makesrna/intern/rna_nodetree.c @@ -1985,7 +1985,9 @@ static bool switch_type_supported(const EnumPropertyItem *item) SOCK_RGBA, SOCK_GEOMETRY, SOCK_OBJECT, - SOCK_COLLECTION); + SOCK_COLLECTION, + SOCK_TEXTURE, + SOCK_MATERIAL); } static const EnumPropertyItem *rna_GeometryNodeSwitch_type_itemf(bContext *UNUSED(C), @@ -10870,6 +10872,8 @@ static void rna_def_node_socket_standard_types(BlenderRNA *brna) rna_def_node_socket_float( brna, "NodeSocketFloatTime", "NodeSocketInterfaceFloatTime", PROP_TIME); rna_def_node_socket_float( + brna, "NodeSocketFloatTimeAbsolute", "NodeSocketInterfaceFloatTimeAbsolute", PROP_TIME_ABSOLUTE); + rna_def_node_socket_float( brna, "NodeSocketFloatDistance", "NodeSocketInterfaceFloatDistance", PROP_DISTANCE); rna_def_node_socket_int(brna, "NodeSocketInt", "NodeSocketInterfaceInt", PROP_NONE); diff --git a/source/blender/makesrna/intern/rna_rna.c b/source/blender/makesrna/intern/rna_rna.c index f7a7b745493..9e7d0f99dfa 100644 --- a/source/blender/makesrna/intern/rna_rna.c +++ b/source/blender/makesrna/intern/rna_rna.c @@ -81,7 +81,16 @@ const EnumPropertyItem rna_enum_property_subtype_items[] = { {PROP_PERCENTAGE, "PERCENTAGE", 0, "Percentage", ""}, {PROP_FACTOR, "FACTOR", 0, "Factor", ""}, {PROP_ANGLE, "ANGLE", 0, "Angle", ""}, - {PROP_TIME, "TIME", 0, "Time", ""}, + {PROP_TIME, + "TIME", + 0, + "Time (Scene Relative)", + "Time specified in frames, converted to seconds based on scene frame rate"}, + {PROP_TIME_ABSOLUTE, + "TIME_ABSOLUTE", + 0, + "Time (Absolute)", + "Time specified in seconds, independent of the scene"}, {PROP_DISTANCE, "DISTANCE", 0, "Distance", ""}, {PROP_DISTANCE_CAMERA, "DISTANCE_CAMERA", 0, "Camera Distance", ""}, {PROP_POWER, "POWER", 0, "Power", ""}, |