2
$\begingroup$

I recently came across this question, which has an interesting detail in the accepted answer:

Also be aware that sometimes you should be checking for context.active_object rather than just context.object.

I have wondered a few times already, and also searched the API docs, but could not find a clear answer on it: What is the difference between the two? Up until now, I had always thought they would yield exactly the same thing, but the given answer indicates that there are situations in which the content can differ.

$\endgroup$
1
  • $\begingroup$ I think (not certain) they will differ in the following scenario: if you execute bpy.ops.mesh.separate() on an active object mesh in edit mode, then context.object will equal the newly separated object, not the active object currently in edit mode. $\endgroup$
    – hedgehog90
    Commented Jun 3, 2019 at 11:48

0

You must log in to answer this question.

Browse other questions tagged .