Newbie question about Python syntax
On Thu, Aug 22, 2019 at 9:20 PM Paul St George <email at paulstgeorge.com> wrote:
> On 22/08/2019 11:49, Cameron Simpson wrote:
> > On 22Aug2019 09:34, Paul St George <email at paulstgeorge.com> wrote:
> >> I have the Python API for the Map Value Node here:
> >> <https://docs.blender.org/api/current/bpy.types.CompositorNodeMapValue.html>.
> >> All well and good. Now I just want to write a simple line of code such
> >> as:
> >> import bpy
> >>>>> print(bpy.types.CompositorNodeMapValue.max)
> > [...]
> >> AttributeError: type object 'CompositorNodeMapValue' has no attribute
> >> 'max'
> > CompositorNodeMapValue is a class. All the attributes described are for
> > instances of the class. So you need to do something that _gives_ you an
> > instance of CompositorNodeMapValue. That instance should have a .max array.
> > Cheers,
> > Cameron Simpson <cs at cskk.id.au>
> Gulp. Thank you. I did ask for a pointer but perhaps I need a roadmap.
> I have tried to do something that gives me an instance of
> CompositorNodeMapValue. I don't think I should humiliate myself further
> by sharing my attempts so could you please show me what the code should
> look like.
Don't think of it as humiliating yourself - you're asking for fairly
specific advice, so showing your code is the best way to get that sort
of advice. We don't bite :)