Solved SculptTag

Hello,

I tried getting a sculpting tag via

tag = op.GetTag(c4d.Tsculpt)

Unfortunately, this returns a BaseTag and I'm not able to cast it to a SculptTag in order to use GetSculptObject() from it.
Is there something wrong here with the documentation/API or does my lacking python knowledge let me oversee something?

Thanks,
Robert

Hi @mp5gosu, as suggested by @kbar - thanks dude - you've to use the GetSelectedSculptObject() because of a limitation in the BaseObject::GetTag() Python implementation.

Cheers, R

If you just want to get access to the currently selected sculpt object you can use

import c4d
from c4d.modules import sculpting as sculpt

doc = documents.GetActiveDocument()
sculptObject = sculpt.GetSelectedSculptObject(doc);

@kbar Yes, thank you. This is my current "workaround".

Hi @mp5gosu, as suggested by @kbar - thanks dude - you've to use the GetSelectedSculptObject() because of a limitation in the BaseObject::GetTag() Python implementation.

Cheers, R

@r_gigante Thanks. This is what I assumed.

The bug is fixed in S22.

Cheers,
Maxime.