25#include "RNA_prototypes.hh"
61 if (
object->pose !=
nullptr) {
114 if (id_node ==
nullptr) {
119 if (comp_node ==
nullptr) {
132 const char *substr = strstr(prop_identifier, rna_path_component);
133 if (substr ==
nullptr) {
139 const bool start_ok = substr == prop_identifier || substr[-1] ==
'.';
144 const size_t component_len = strlen(rna_path_component);
145 const bool end_ok =
ELEM(substr[component_len],
'\0',
'.',
'[');
155 return node_identifier;
176 return node_identifier;
178 if (ptr->
type == RNA_PoseBone) {
184 if (prop !=
nullptr) {
197 else if (
STR_ELEM(prop_name,
"head",
"tail",
"length") ||
STRPREFIX(prop_name,
"matrix")) {
203 else if (
STREQ(prop_name,
"hide")) {
211 return node_identifier;
213 if (ptr->
type == RNA_Bone) {
223 node_identifier.
id = id_cast<Object *>(node_identifier.
id)->data;
225 return node_identifier;
228 const char *prop_identifier = prop !=
nullptr ?
241 if (pchan ==
nullptr) {
250 return node_identifier;
252 if (
ELEM(ptr->
type, RNA_ConstraintTarget, RNA_ConstraintTargetBone)) {
258 if (con !=
nullptr) {
259 if (pchan !=
nullptr) {
268 return node_identifier;
272 (
contains(prop_identifier,
"show_viewport") ||
273 contains(prop_identifier,
"show_render")))
277 return node_identifier;
302 return node_identifier;
304 else if (ptr->
type == RNA_Object) {
306 if (prop !=
nullptr) {
308 if (
contains(prop_identifier,
"location") ||
contains(prop_identifier,
"matrix_basis") ||
309 contains(prop_identifier,
"matrix_channel") ||
310 contains(prop_identifier,
"matrix_inverse") ||
311 contains(prop_identifier,
"matrix_local") ||
312 contains(prop_identifier,
"matrix_parent_inverse") ||
313 contains(prop_identifier,
"matrix_world") ||
314 contains(prop_identifier,
"rotation_axis_angle") ||
315 contains(prop_identifier,
"rotation_euler") ||
316 contains(prop_identifier,
"rotation_mode") ||
317 contains(prop_identifier,
"rotation_quaternion") ||
contains(prop_identifier,
"scale") ||
318 contains(prop_identifier,
"delta_location") ||
319 contains(prop_identifier,
"delta_rotation_euler") ||
320 contains(prop_identifier,
"delta_rotation_quaternion") ||
321 contains(prop_identifier,
"delta_scale"))
324 return node_identifier;
326 if (
contains(prop_identifier,
"data")) {
330 return node_identifier;
332 if (
STR_ELEM(prop_identifier,
"hide_viewport",
"hide_render")) {
334 return node_identifier;
336 if (
STREQ(prop_identifier,
"dimensions")) {
339 return node_identifier;
343 else if (ptr->
type == RNA_ShapeKey) {
349 return node_identifier;
351 else if (ptr->
type == RNA_Key) {
354 return node_identifier;
358 ELEM(ptr->
type, RNA_StripTransform, RNA_StripCrop, RNA_StripColorBalanceData))
362 return node_identifier;
366 return node_identifier;
370 return node_identifier;
372 else if (
ELEM(ptr->
type, RNA_Curve, RNA_TextCurve)) {
375 return node_identifier;
377 else if (
ELEM(ptr->
type, RNA_BezierSplinePoint, RNA_SplinePoint)) {
380 return node_identifier;
386 return node_identifier;
389 else if (
ELEM(ptr->
type, RNA_MeshVertex, RNA_MeshEdge, RNA_MeshLoop, RNA_MeshPolygon)) {
391 return node_identifier;
398 return node_identifier;
400 if (prop !=
nullptr) {
406 return node_identifier;
408 return node_identifier;
413 std::unique_ptr<RNANodeQueryIDData> &id_data =
id_data_map_.lookup_or_add_cb(
414 id, [&]() {
return std::make_unique<RNANodeQueryIDData>(
id); });
415 return id_data.get();
Object is a sort of wrapper for general info.
Map(Allocator allocator={}) noexcept
virtual bool check_pchan_has_bbone_segments(const Object *object, const bPoseChannel *pchan)
OperationCode operation_code
const char * operation_name
const char * component_name
const bPoseChannel * get_pchan_for_constraint(const bConstraint *constraint)
RNANodeQueryIDData(const ID *id)
void ensure_constraint_to_pchan_map()
Map< const bConstraint *, const bPoseChannel * > * constraint_to_pchan_map_
Node * find_node(const PointerRNA *ptr, const PropertyRNA *prop, RNAPointerSource source)
Map< const ID *, std::unique_ptr< RNANodeQueryIDData > > id_data_map_
RNANodeIdentifier construct_node_identifier(const PointerRNA *ptr, const PropertyRNA *prop, RNAPointerSource source)
static bool contains(const char *prop_identifier, const char *rna_path_component)
DepsgraphBuilder * builder_
RNANodeQuery(Depsgraph *depsgraph, DepsgraphBuilder *builder)
RNANodeQueryIDData * ensure_id_data(const ID *id)
bool rna_prop_affects_parameters_node(const PointerRNA *ptr, const PropertyRNA *prop)
BLI_assert(slot->slot_subtype.map==BMO_OP_SLOT_SUBTYPE_MAP_FLT)
bool RNA_struct_is_a(const StructRNA *type, const StructRNA *srna)
const char * RNA_property_identifier(const PropertyRNA *prop)
std::optional< AncestorPointerRNA > RNA_struct_search_closest_ancestor_by_type(const PointerRNA *ptr, const StructRNA *srna)
struct bConstraint * BKE_constraint_find_from_target(struct Object *ob, struct bConstraintTarget *tgt, struct bPoseChannel **r_pchan)
int RNA_property_flag(PropertyRNA *prop)
bool RNA_property_is_idprop(const PropertyRNA *prop)
ID_Type GS(const char *name)
@ PROP_FORCE_GEOMETRY_EVAL
ListBaseT< struct bConstraint > constraints
OperationNode * find_operation(OperationIDKey key) const
IDNode * find_id_node(const ID *id) const
ComponentNode * find_component(NodeType type, StringRef name="") const