waylow
(waylow)
September 16, 2010, 10:56pm
21
here is the error
Traceback (most recent call last):
File "/Users/waylow/iAnimate/Semester 1/Week1/untitled.blend/Text", line 24, in draw
AttributeError: 'NoneType' object has no attribute 'data'
line 24, is the line we are talking about
I don’t understand why it is working for you
Weird…
maybe try replacing that line with
body.prop(context.active_object.modifiers['Subsurf'], "show_viewport", toggle=True ,text="Subsurf")
but it will only work if the object you want to toggle is selected which kind of defeats the purpose of having a button to set visibility.
waylow
(waylow)
September 17, 2010, 8:40am
23
yeah - that works but yes it won’t work for my situation need this to show when the armature is selected
is this a bug? if it works for you?
I posted it on the bug tracker – it seems that bpy is being imported as None on OSX for some odd reason.
The trials & tribulations of beta software…
Hopefully it’ll be fixed soon.
–edit–
Maybe trying context.scene.objects[“Cube”] will work
waylow
(waylow)
September 17, 2010, 5:54pm
25
ahh - thanks
this might have been a bug for a while, as this is why I tried to separate this as an operator in the first place
guess I’m stuck till the bug is squashed
waylow
(waylow)
January 10, 2011, 7:40am
26
this bug has been fixed now - if anybody is following
PKHG
(PKHG)
January 12, 2011, 5:02am
27
The shortend script for subsurf of the cube works nicely!
SVN 34223 (W 32 Vista)